{"version":3,"sources":["components/Editor/Editor.jsx","components/AppLoading.jsx","contexts/AppContext.js","helpers/useInterval.js","helpers/PhoneField.js","controllers/ordersControllers/EachTableOrderRowController.js","views/orders/EachTableOrderRowView.jsx","dashboardComponents/orders/EachTableOrderRow.js","dashboardComponents/signUp/details/ImageAndLogo.jsx","dashboardComponents/signUp/details/PlaceDetails.jsx","dashboardComponents/signUp/details/SocialDetails.jsx","dashboardComponents/signUp/details/LocationDetails.jsx","dashboardComponents/signUp/details/ServiceDetails.jsx","dashboardComponents/signUp/details/SignUpDetails.jsx","controllers/ordersControllers/EachOrderController.js","views/orders/EachOrderView.jsx","dashboardComponents/orders/EachOrder.js","helpers/DateFunctions.js","helpers/FieldGroup.js","views/notifications/Notifications.jsx","components/PermissionsPopup/EachPopupServer.jsx","components/PermissionsPopup/ServersListPopup.jsx","components/Header/Header.jsx","components/SideNav/EachNav.jsx","components/SideNav/SideNav.jsx","components/Layout/Layout.jsx","Global.js","socket-client.js","assets/img/theme/team-1-800x800.jpg","registerServiceWorker.js","dashboardComponents/OrderHistory/OrderHistoryDetails.jsx","dashboardComponents/OrderHistory/EachOrderHistory.jsx","dashboardComponents/OrderHistory/OrderHistory.js","views/TimeSlot/SlotForm.jsx","views/TimeSlot/EachSlot.jsx","views/TimeSlot/SlotTemplate/TemplateForm.jsx","views/TimeSlot/SlotTemplate/EachTemplate.jsx","views/TimeSlot/SlotTemplate/TemplateModal.jsx","views/TimeSlot/TimeSlot.js","pages/Profile/NewProfile.jsx","components/OfflinePopup/OfflinePopup.jsx","pages/Loyalties/Loyalty.js","App.js","serviceWorkerRegistration.js","reportWebVitals.js","index.js"],"names":["Editor","onChange","defaultValue","disabled","editor","ClassicEditor","data","id","name","event","getData","rawText","String","replace","config","toolbar","items","shouldNotGroupWhenFull","AppLoading","style","width","textAlign","marginTop","AppContext","React","createContext","restID","token","restdata","activated","loading","io","loadRestaurantDetails","login","logout","AppContextProvider","props","ordersList","masterCategoryTable","sessionStorage","getItem","selectedRestID","state","isLoggedin","isRestDone","categoryItems","categories","categoryIDItems","categoriesList","pos_menu_types","categoryTable","menuTable","categoryChoices","itemChoices","itemTable","starredItems","selectedRestData","selectedAddress","delivery_charge","customer_preferred_time","mainrestdata","staff","suborder","activeOrder","activeTable","tables","reservations","waitList","waitListLoading","reservationsLoading","selectedStaff","staff_is_authorized","unconfirmedTotal","unconfirmedCount","unconfirmedTax","unconfirmedTaxes","unconfirmedCGST","unconfirmedSGST","unconfirmedVAT","unconfirmedServiceFee","unconfirmedFees","unconfirmedGrandTotal","unconfirmedPayTotal","unconfirmedTaxDetails","unconfirmedCreditsUsed","orderCredits","bind","getCategoryItems","signup","signupRestaurant","updateRestaurant","addServer","getServer","setContextState","removeItemInOrder","updateItemInOrder","addOrders","saveOrder","updateOrder","deleteOrder","submitOrder","clearOrder","subscribePush","unsubscribePush","setLoading","unsetLoading","getPaymentUpdates","removePaymentUpdate","paymentUpdates","changeTableDetails","selectRestaurant","verifyStripe","viewStripeDashboard","syncPrism","addPosMenu","addToCatList","fetchReservations","getAvailableTables","kumbaURL","process","rupeeSym","pageName","primaryColor","primaryTextColor","secondaryColor","dangerColor","successColor","catList","posMenuList","activePostMenu","deliveryAddress","selectedOrderType","socketConnected","socket","on","this","a","url","window","header","axios","method","headers","response","setState","Promise","resolve","reject","catItem","includes","orderID","request","jsondata","jwres","error","console","debug","log","getRestaurantDetails","newrestID","subrestdata","length","forEach","eachrest","restaurant_id","setItem","fetchRestaurantData","setNames","sub_restaurants","pArray","map","subrest","all","newState","posMenu","newList","push","type","tableTerm","itemTerm","categoryList","sort","b","orderNum","cat","category","value","label","menu_items","menuItems","Date","createdAt","tax_charges","taxes","item","subcat","sub_category","subcat_id","sub_category_id","item_id","item_tax_details","tax_group_id","filter","x","category_id","isStarred","pos_menutype","indexOf","preCatList","JSON","parse","currentCatList","Object","keys","validList","missingList","concat","email","password","code","user","restaurant","Error","alert","redirect","clear","values","address","img","logo","addressdata","google_address","apt","floor","building","zip","note","landmark","street","google_places_id","place_id","resp","rest","formData","FormData","append","restid","from","to","res","toast","serverDetails","role","access_code","server_role","eachorder","updateUnconfirmedCount","quantity","order","subtitle","options","option","choicename","trim","substr","instructions","splice","index","tabledata","orderdata","order_credits","orderTotal","item_total","taxTotal","taxInfo","itemdata","allRests","selectedRest","menu","itemTaxes","tax_on_tax","dependentTaxes","taxDetails","tax","calcTax","tax_amount","Math","round","description","actual_tax","service_fee","cgst","sgst","vat","kumba_fee","kumbapct","kumba_fixed","kumbafixed","key","parseFloat","userdata","orders","_data","order_id","order_type","server","rest_id","table_id","phone","status","credits_used","num_people","delivery_address","table","tax_info","stringify","tax_total","item_pay_total","item_specifics","options_json","us_payment_id","ind_payment_id","navigator","serviceWorker","ready","then","registration","pushManager","getSubscription","subscription","unsubscribe","delete","token_type","linkObj","open","document","getElementById","innerHTML","autoplay","src","hidden","autostart","loop","setTimeout","useOrderID","useOldTableID","newTable","old_table","new_table","Provider","children","Component","withTheme","Consumer","context","useInterval","callback","delay","savedCallback","useRef","useEffect","current","setInterval","clearInterval","countryCodes","require","PhoneField","setPhone","phoneIG","setPhoneIG","readOnly","myCountryCodesObject","customList","myCountriesOptions","phoneIGHTML","pop","val","isDisabled","noGutters","xs","pattern","placeholder","e","target","EachTableOrderRowController","clicked","toastId","autoClose","closeButton","reason","getOrder","update","render","TYPE","SUCCESS","ERROR","toastID","Wrapper","styled","article","EachTableOrderRowView","parent","useState","accessCode","setAccessCode","setError","showCancel","setShowCancel","accessLevel","server_roles","manager","handleSubmit","preventDefault","handleSelectChange","showAuth","ListGroupItem","Modal","isOpen","ModalBody","className","icon","arrowLeft","size","onClick","close","ic_lock","Form","FormGroup","Label","Input","maxLength","required","autoFocus","fontSize","fontWeight","borderColor","color","Button","managers","i","zIndex","height","ButtonToolbar","Row","handleOneClick","Col","md","bsStyle","markReject","markServed","toFixed","EachOrderRow","orderOptions","ImageAndLogo","setImg","setLogo","imgDisplay","logoDisplay","logo_image","Global","imagePlaceholder","alt","href","opacity","position","files","URL","createObjectURL","image","borderRadius","PlaceDetails","goNext","add","goPrev","edit","setName","business_name","setBusinessName","cuisine","setCuisine","setType","about_us","setDescription","html_about_us","htmlDescription","setHTMLDescription","slice","Container","FieldGroup","restTypes","text","facebookIG","instagramIG","whatsappIG","SocialDetails","facebook_url","split","facebook_handle","setFacebookHandle","instagram_url","instagram_handle","setInstagramHandle","restaurant_url","setRestaurantURL","whatsapp_url","whatsapp_num","setWhatsappNum","ig","LocationDetails","setAddress","setApt","setLandmark","setNote","apiKey","selectProps","autocompletionRequest","componentRestrictions","country","googleCountriesList","doNext","ServiceDetails","finalize","allowed_menu_types","service_list","setServiceList","qrCodeColor","svgColor","highlightColor","textColor","svgTextColor","colors","setColors","row","sm","check","menuTypes","checked","y","SignUpDetails","onEdit","step","setStep","setValues","goProfile","setGoProfile","newvalues","allvalues","Progress","multi","bar","animated","EachOrderController","showModal","showCheckoutModal","showOrderModal","showDispatchModal","showOrdModal","showCancelDeliveryModal","newTableID","selectedOption","goNewOrder","datum","discount","updateTblName","table_name","delivery_slot","start_time","toLocaleString","end_time","payment_mode","closeCheckoutModal","closeDispatchModal","paymentUpdate","closeCancelDeliveryModal","EachOrderView","orderRows","subtotal","pay_total","checkoutStatus","showReadyForPickupModal","setPickupModal","modalType","setModalType","order_from","formatteddate","waiting_orders","EachTableOrderRow","order_subtotal","kumbaAmount","order_bill","d1","now","d2","time","getTime","mintime","parseInt","hourtime","date","toString","substring","lat","lng","long","internal_order_num","openOrderModal","backgroundColor","order_status","payment_info","weekday","year","month","day","hour","minute","hour12","first_name","last_name","maxHeight","maxWidth","top","aria-labelledby","ModalHeader","closeOrderModal","openCheckoutModal","padding","ListGroup","allusers","ModalFooter","alignSelf","handle_delivery","openDispatchModal","left","razorpay_payment_id","finalizeOrder","payment_id","dispatchOrder","cancelDeliveryOrder","toUpperCase","markPrepareOrder","markReadyForPickup","showTableChangeModal","tableOptions","handleTableSelect","changeTable","EachOrder","timer","eachtable","showImgModal","showPinModal","pin","mode","closeModal","openCancelDeliveryModal","createOrder","applyDiscount","markAcceptAll","search","user_id","toLowerCase","AppEachOrder","module","exports","displayDate","dateObj","getMonth","getDate","hours","getHours","min","getMinutes","sec","getSeconds","help","valid","invalid","styleInput","validationState","controlId","addonType","NotificationsView","setNotifCount","notifiedOrders","setNotifiedOrders","getDineInPendingOrders","restIDs","subrestaurants","rest_ids","pendingOrdersTable","pendingOrders","Array","prototype","apply","rests","eachsub","notificationList","rest_info","justifyContent","div","dropDown","setDropDown","servers","setServers","getRestaurants","subrests","restaurants","setRestaurants","show_lock_screen","paddingTop","lock","onSubmit","tag","sortDown","EachPopupServer","stickyComponent","back","notification","setNotification","notifCount","subRestData","subRest","sideNav","$","slideUp","slideDown","background","display","success","backgroundImage","backgroundSize","backgroundPosition","border","ic_keyboard_backspace","ic_menu","ic_store","marginRight","ic_notifications","class","expand","right","Notifications","title","NavItem","Sidebar","hideLinks","prevProps","prevState","innerLink","Link","outterLink","Navbar","bottom","overflowY","Nav","UncontrolledDropdown","nav","DropdownToggle","Media","navbar","paddingBottom","EachNav","ic_list","history","ic_event_seat","calendar","chat","ic_add_shopping_cart","ic_restaurant","loyalty","creditCard","ic_date_range","ic_settings_power","PureComponent","memo","fixed","Header","sailsIOClient","socketIOClient","sails","isLocalhost","Boolean","location","hostname","match","register","origin","addEventListener","swUrl","fetch","get","unregister","reload","registerValidSW","catch","checkValidServiceWorker","onupdatefound","installingWorker","installing","onstatechange","controller","managerAccessLevel","supervisor","onClose","orderData","setOrderData","userInfo","setUserInfo","getUserInfo","useCallback","getOrderData","scope","toDateString","toLocaleTimeString","total_orders","prev_items","EachOrderHistory","showDetails","setShowDetails","updatedAt","EachRow","showSearch","setShowSearch","setSearch","offset","numberPerPage","pageCount","currentData","pagination","setPagination","strdate","getFullYear","setFrom","setTo","dater","getOrderHistory","tax_rate","Axios","err","Layout","previousLabel","nextLabel","breakLabel","marginPagesDisplayed","pageRangeDisplayed","onPageChange","selected","containerClassName","activeClassName","_ModalHeader","heading","onCloseModal","ic_arrow_back","btnText","slots","selectedTemplate","repeat_days","order_stop_time","maxOrders","selected_date","setData","limit","setLimit","handleLimitChage","startTime","endTime","startSplit","endSplit","setHours","setMinutes","setSeconds","postdata","item_limits","menu_template","template_id","toggle","join","for","isMulti","askDelete","deleteLoading","slot_id","Card","CardHeader","borderTopLeftRadius","borderTopRightRadius","CardBody","fadeOut","Spinner","updateList","show","getAllRestTemplate","EachTemplate","_state","_setState","confirmDelete","deleted","showEdit","ButtonGroup","TemplateForm","TemplateModal","showAdd","newItem","TimeSlot","showTemplates","getItems","toggleTemplate","marginBottom","SlotForm","updateItems","EachSlot","NewProfile","setEdit","setRestdata","toggleResturantStatus","info","settleBills","isTakeawayOpen","isDeliveryOpen","pos_type","OfflienPopup","setShow","connection","ic_refresh","phoneNumber","setPhoneNumber","orderBill","setOrderBill","userDetails","setUserDetails","sortedTiers","setSortedTiers","credits","setCredits","totalCredits","setTotalCredits","maxUsableCredits","setMaxUsableCredit","setUserTier","loyaltyId","loyalty_id","moment","format","subtract","showEditModal","setShowEditModal","setEmail","getTotalCredits","total_credits","getCredits","getUserDetails","getOrderAndBill","getTiers","tierAmountSort","tier","minimum_dollar_spent","createLoyaltyOrder","applyCredits","credit_amount","credit_type","app","addUserCredits","submitBill","derivedTier","total_order_bills","minimum_order","userOutline","credit","borderBottomStyle","SignUpFinal","lazy","Menu","Order","Chef","Accounts","Cart","Servers","Menu_Order","Offers","Tables","Events","Feedback","App","setIsLoggedin","userState","hideProgressBar","newestOnTop","closeOnClick","pauseOnVisibilityChange","draggable","pauseOnHover","alignItems","overflow","fallback","exact","path","component","Loyalty","OrderHistory","PrivateRoute","pathname","UserRoute","reportWebVitals","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","StrictMode","message","vapidPublicKey","convertedVapidKey","base64String","base64","repeat","rawData","atob","outputArray","Uint8Array","charCodeAt","urlBase64ToUint8Array","phoneCode","REACT_APP_PHONE_CODE","chef","bartender","waiter","steward","captain","director","general_manager","owner"],"mappings":"8HAAA,2CAsDeA,IAlDA,SAAC,GAIT,IAHHC,EAGE,EAHFA,SACAC,EAEE,EAFFA,aACAC,EACE,EADFA,SAEA,OACI,cAAC,WAAD,CACIC,OAAQC,IACRC,KAAMJ,EACNC,SAAUA,EAMVI,GAAG,SACHC,KAAK,SACLP,SAAU,SAACQ,EAAOL,GACd,IAAME,EAAOF,EAAOM,UACdC,EAAUC,OAAON,GAAMO,QAAQ,gBAAiB,IACtDZ,EAASK,EAAMK,EAAQE,QAAQ,SAAU,OAE7CC,OAAQ,CACJC,QAAS,CACDC,MAAO,CACH,UAAW,IACX,aAAc,WAAY,IAC1B,YAAa,IACb,YAAa,sBAAuB,IACpC,OAAQ,SAAU,gBAAiB,YAAa,YAAa,cAAe,IAC5E,UAAW,SAAU,IACrB,eAAgB,eAAgB,WAAY,IAC5C,OAAQ,YAAa,IACrB,cAAe,IACf,aAAc,IACd,OAAQ,QAEZC,wBAAwB,Q,iCCzChD,0DAGe,SAASC,IACpB,OACI,qBAAKC,MAAO,CAAEC,MAAO,OAAQC,UAAW,SAAUC,UAAW,QAA7D,SACI,cAAC,UAAD,Q,uRCDCC,EAAaC,IAAMC,cAAc,CAC1CC,OAAQ,KACRC,MAAO,KACPC,SAAU,KACVC,UAAW,KACXC,SAAS,EACTC,GAAI,KACJC,sBAAuB,aACvBC,MAAO,aACPC,OAAQ,eAGCC,EAAb,kDACI,WAAYC,GAAQ,IAAD,uBACf,cAAMA,IACDC,WAAa,GAClB,EAAKC,oBAAsB,GAC3B,IAAIZ,EAASa,eAAeC,QAAQ,UAChCb,EAAQY,eAAeC,QAAQ,SAC/BC,EAAiBF,eAAeC,QAAQ,kBAN7B,OAOf,EAAKE,MAAQ,CACThB,OAAQA,GAAU,KAClBiB,YAAY,EACZhB,MAAOA,GAAS,KAChBC,SAAU,KACVC,UAAW,KACXC,SAAS,EACTc,YAAY,EACZC,cAAe,GACfC,WAAY,GACZC,g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a3b392.chunk.js","sourcesContent":["import React, { Component, useEffect, useRef, useState } from 'react';\nimport { CKEditor } from '@ckeditor/ckeditor5-react';\nimport ClassicEditor from '@ckeditor/ckeditor5-build-classic';\n\nconst Editor = ({\n onChange,\n defaultValue,\n disabled\n}) => {\n return (\n {\n // // You can store the \"editor\" and use when it is needed.\n // setEditor(editor);\n // console.log('Editor is ready to use!', editor);\n // }}\n id=\"editor\"\n name=\"editor\"\n onChange={(event, editor) => {\n const data = editor.getData();\n const rawText = String(data).replace(/(<([^>]+)>)/gi, \"\")\n onChange(data, rawText.replace(\" \", \" \"))\n }}\n config={{\n toolbar: {\n items: [\n 'heading', '|',\n 'fontfamily', 'fontsize', '|',\n 'alignment', '|',\n 'fontColor', 'fontBackgroundColor', '|',\n 'bold', 'italic', 'strikethrough', 'underline', 'subscript', 'superscript', '|',\n 'outdent', 'indent', '|',\n 'bulletedList', 'numberedList', 'todoList', '|',\n 'code', 'codeBlock', '|',\n 'insertTable', '|',\n 'blockQuote', '|',\n 'undo', 'redo'\n ],\n shouldNotGroupWhenFull: true\n },\n }}\n // onBlur={(event, editor) => {\n // console.log('Blur.', editor);\n // }}\n // onFocus={(event, editor) => {\n // console.log('Focus.', editor);\n // }}\n />\n );\n}\n\nexport default Editor;","import React from 'react'\nimport { Spinner } from 'react-activity';\n\nexport default function AppLoading() {\n return (\n
\n \n
\n )\n}\n","import React, { Component } from 'react';\nimport io from '../socket-client';\nimport axios from 'axios';\nimport { toast } from 'react-toastify';\n\nexport const AppContext = React.createContext({\n restID: null,\n token: null,\n restdata: null,\n activated: null,\n loading: false,\n io: null,\n loadRestaurantDetails: () => { },\n login: () => { },\n logout: () => { },\n});\n\nexport class AppContextProvider extends React.Component {\n constructor(props) {\n super(props);\n this.ordersList = [];\n this.masterCategoryTable = {};\n var restID = sessionStorage.getItem('restID');\n var token = sessionStorage.getItem('token');\n let selectedRestID = sessionStorage.getItem('selectedRestID');\n this.state = {\n restID: restID || null,\n isLoggedin: false,\n token: token || null,\n restdata: null,\n activated: null,\n loading: false,\n isRestDone: false,\n categoryItems: {},\n categories: [],\n categoryIDItems: {},\n categoriesList: [],\n pos_menu_types: [],\n categoryTable: {},\n menuTable:{},\n categoryChoices: [],\n itemChoices: {},\n itemTable: {},\n starredItems: [],\n io,\n\n selectedRestID: selectedRestID || null,\n selectedRestData: null,\n\n selectedAddress : null,\n delivery_charge : 0.00,\n\n customer_preferred_time : null,\n\n mainrestdata: null,\n\n staff: null,\n\n suborder: {},\n activeOrder: null,\n activeTable: null,\n ordersList: [],\n tables:{},\n\n reservations: [],\n waitList: [],\n waitListLoading: false,\n reservationsLoading: false,\n\n selectedStaff: null,\n staff_is_authorized: false,\n\n unconfirmedTotal: null,\n unconfirmedCount: null,\n unconfirmedTax: null,\n unconfirmedTaxes: null,\n unconfirmedCGST: null,\n unconfirmedSGST: null,\n unconfirmedVAT: null,\n unconfirmedServiceFee: null,\n unconfirmedFees: null,\n unconfirmedGrandTotal: null,\n unconfirmedPayTotal: null,\n unconfirmedTaxDetails: null,\n unconfirmedCreditsUsed: null,\n orderCredits: null,\n \n\n loadRestaurantDetails: this.loadRestaurantDetails.bind(this),\n getCategoryItems: this.getCategoryItems.bind(this),\n login: this.login.bind(this),\n logout: this.logout.bind(this),\n signup: this.signup.bind(this),\n signupRestaurant: this.signupRestaurant.bind(this),\n updateRestaurant: this.updateRestaurant.bind(this),\n addServer: this.addServer.bind(this),\n getServer: this.getServer.bind(this),\n\n setContextState: this.setContextState.bind(this),\n\n removeItemInOrder: this.removeItemInOrder.bind(this),\n updateItemInOrder: this.updateItemInOrder.bind(this),\n addOrders: this.addOrders.bind(this),\n saveOrder: this.saveOrder.bind(this),\n updateOrder: this.updateOrder.bind(this),\n deleteOrder: this.deleteOrder.bind(this),\n submitOrder: this.submitOrder.bind(this),\n clearOrder: this.clearOrder.bind(this),\n\n // initializeNotificationUI: this.initializeNotificationUI.bind(this),\n subscribePush: this.subscribePush.bind(this),\n unsubscribePush: this.unsubscribePush.bind(this),\n\n setLoading: this.setLoading.bind(this),\n unsetLoading: this.unsetLoading.bind(this),\n\n getPaymentUpdates: this.getPaymentUpdates.bind(this),\n removePaymentUpdate: this.removePaymentUpdate.bind(this),\n paymentUpdates: null,\n\n changeTableDetails: this.changeTableDetails.bind(this),\n\n selectRestaurant: this.selectRestaurant.bind(this),\n\n verifyStripe: this.verifyStripe.bind(this),\n viewStripeDashboard: this.viewStripeDashboard.bind(this),\n syncPrism: this.syncPrism.bind(this),\n addPosMenu: this.addPosMenu.bind(this),\n addToCatList: this.addToCatList.bind(this),\n fetchReservations: this.fetchReservations.bind(this),\n getAvailableTables: this.getAvailableTables.bind(this),\n\n //kumbaURL : process.env.REACT_APP_BACKEND_URL_INDIA\n kumbaURL: process.env.REACT_APP_BACKEND_URL,\n rupeeSym:\n process.env.REACT_APP_COUNTRY === 'IN'\n ? '\\u20B9'\n : process.env.REACT_APP_CURRENCY_SYM,\n //loading : false,\n pageName: 'Food Bots',\n\n // Color Schemes\n primaryColor: '#1d3557',\n primaryTextColor: '#379adb',\n secondaryColor: '#E5F3F6',\n dangerColor: '#bc0d35',\n successColor: '#1dbf96',\n\n catList: [],\n posMenuList: ['All'],\n activePostMenu: 'All',\n\n deliveryAddress: null,\n selectedOrderType: null,\n\n socketConnected : false,\n\n // selectedServer : null,\n };\n\n io.socket.on(\n 'restaurantupdate',\n function (data) {\n this.loadRestaurantDetails();\n }.bind(this)\n );\n }\n\n async getPaymentUpdates() {\n try {\n let url = window.kumbaURL + '/restaurant/paymentupdates/';\n let header = { 'foodbots-header': this.state.token };\n const response = await axios({\n url,\n method: 'GET',\n headers: header,\n });\n let data = response.data;\n this.setState({ paymentUpdates: data });\n return Promise.resolve(data);\n } catch (e) {\n return Promise.reject(e);\n }\n }\n\n addToCatList(catItem) {\n if (!this.state.catList.includes(catItem)) {\n this.setState({\n catList: [...this.state.catList, catItem],\n });\n }\n }\n\n async removePaymentUpdate(orderID) {\n try {\n let url = window.kumbaURL + '/restaurant/paymentupdates/' + orderID;\n let header = { 'foodbots-header': this.state.token };\n const response = await axios({\n url,\n method: 'PUT',\n headers: header,\n });\n // return await this.getPaymentUpdates(); //To initialize socket connection\n } catch (e) {\n return new Promise((resolve, reject) => {\n return reject(e);\n });\n }\n }\n\n async componentDidMount() {\n if (this.state.restID && this.state.token) {\n await this.loadRestaurantDetails();\n // await this.getPaymentUpdates();\n await this.getAvailableTables();\n }\n\n if (this.state.selectedRestID) {\n this.selectRestaurant(this.state.selectedRestID);\n } else {\n this.selectRestaurant(this.state.restID);\n }\n\n io.socket.on(\n 'orderconfirm',\n function (data) {\n this.loadRestaurantDetails();\n }.bind(this)\n );\n }\n\n setLoading() {\n this.setState({ loading: true });\n }\n\n unsetLoading() {\n this.setState({ loading: false });\n }\n\n getRestaurantDetails() {\n if (!this.state.io) {\n console.debug('No socket connection.');\n } else if(!this.state.socketConnected){\n //this.setLoading();\n let url = window.kumbaURL + '/restaurant/' + this.state.restID;\n let header = { 'foodbots-header': this.state.token };\n this.state.io.socket.request(\n {\n url,\n headers: header,\n method: 'GET',\n },\n function (jsondata, jwres) {\n if (jwres.error) {\n this.setState({ loading: false });\n console.debug(\n \"Couldn't connect socket. Please try again.\"\n );\n //alert(JSON.stringify(jwres.error));\n //window.location = \"/restaurant\";\n } else {\n this.setState({socketConnected : true});\n ////console.log(jsondata);\n //resolve(jsondata);\n }\n }.bind(this)\n );\n }\n //console.log('context mounts----', this.state);\n }\n\n\n\n async getAvailableTables() {\n try{\n let url = window.kumbaURL + \"/resttables/getalltables/\" + this.state.restID\n let header = {\"foodbots-header\": this.state.token};\n const response = await axios({\n url,\n headers: header,\n method: \"GET\",\n });\n var data = response.data\n console.log(data)\n this.setState({ tables: data });\n return Promise.resolve(data);\n \n }catch(err){\n return new Promise((resolve, reject)=>{\n return reject(err);\n });\n \n }\n }\n\n async fetchRestaurantData(restID) {\n try {\n //console.log(restID)\n let url = this.state.kumbaURL + '/restaurant/' + restID;\n //let header={\"foodbots-header\":this.state.token};\n const response = await axios({\n url,\n method: 'GET',\n //headers : header,\n });\n this.getRestaurantDetails(); //To initialize socket connection\n var restdata = response.data;\n return await this.getCategoryItems(restdata);\n } catch (e) {\n return new Promise((resolve, reject) => {\n return reject(e);\n });\n }\n }\n\n selectRestaurant(selectedRestID) {\n var selectedRestData = null;\n var newrestID = null;\n //var selectedRestID = null;\n if (selectedRestID === this.state.restID) {\n selectedRestData = this.state.mainrestdata;\n newrestID = this.state.restID;\n } else if (\n this.state.subrestdata &&\n this.state.subrestdata.length > 0\n ) {\n this.state.subrestdata.forEach((eachrest) => {\n if (selectedRestID) {\n if (eachrest.restdata.restaurant_id === selectedRestID) {\n selectedRestData = eachrest;\n newrestID = selectedRestID;\n }\n } else {\n selectedRestData = eachrest;\n newrestID = eachrest.restdata.restaurant_id;\n }\n });\n } else {\n selectedRestData = this.state.mainrestdata;\n newrestID = this.state.restID;\n }\n\n this.setState({\n selectedRestID: newrestID,\n selectedRestData: selectedRestData,\n });\n sessionStorage.setItem('selectedRestID', newrestID);\n }\n\n async loadRestaurantDetails() {\n try {\n const data = await this.fetchRestaurantData(this.state.restID);\n this.setNames(data.restdata);\n if (\n data.restdata.sub_restaurants &&\n data.restdata.sub_restaurants.length > 0\n ) {\n const pArray = data.restdata.sub_restaurants.map(\n async (subrest) => {\n return await this.fetchRestaurantData(\n subrest.restaurant_id\n );\n }\n );\n const subrestdata = await Promise.all(pArray);\n\n //subrestdata = subrestdata;\n this.setState({\n categoryItems: data.categoryItems,\n categoryIDItems: data.categoryIDItems,\n mainrestdata: data,\n restdata: data.restdata,\n starredItems: data.starredItems,\n isRestDone: true,\n categories: data.categories,\n categoriesList: data.categoriesList,\n pos_menu_types: data.pos_menu_types,\n categoryTable: data.categoryTable,\n menuTable: data.menuTable,\n categoryChoices: data.categoryChoices,\n itemChoices: data.itemChoices,\n itemTable: data.itemTable,\n subrestdata: subrestdata,\n });\n } else {\n ////console.log(data);\n this.setState({\n categoryItems: data.categoryItems,\n categoryIDItems: data.categoryIDItems,\n mainrestdata: data,\n restdata: data.restdata,\n starredItems: data.starredItems,\n isRestDone: true,\n categories: data.categories,\n categoriesList: data.categoriesList,\n pos_menu_types: data.pos_menu_types,\n categoryTable: data.categoryTable,\n menuTable: data.menuTable,\n categoryChoices: data.categoryChoices,\n itemChoices: data.itemChoices,\n itemTable: data.itemTable,\n subrestdata: null,\n });\n }\n this.selectRestaurant(this.state.selectedRestID || null);\n } catch (err) {\n //console.log(err);\n return new Promise((resolve, reject) => {\n return reject(err);\n });\n }\n }\n\n setContextState(newState) {\n this.setState(newState);\n }\n\n addPosMenu(posMenu) {\n //console.log('added ',)\n if (!this.state.posMenuList.includes(posMenu)) {\n const newList = [...this.state.posMenuList];\n newList.push(posMenu);\n this.setState({ posMenuList: newList });\n }\n }\n\n setNames(restdata) {\n switch (restdata.type) {\n case 'restaurant':\n window.tableTerm = 'Table';\n window.itemTerm = 'Item';\n break;\n\n case 'drinksprovider':\n window.tableTerm = 'Table';\n window.itemTerm = 'Item';\n break;\n\n case 'hotel':\n window.tableTerm = 'Room';\n window.itemTerm = 'Service';\n break;\n\n case 'serviceprovider':\n window.tableTerm = 'Session';\n window.itemTerm = 'Service';\n break;\n\n case 'itemprovider':\n window.tableTerm = 'Session';\n window.itemTerm = 'Item';\n break;\n\n default:\n window.tableTerm = 'Table';\n window.itemTerm = 'Item';\n break;\n }\n }\n\n async getCategoryItems(restdata) {\n return new Promise((resolve, reject) => {\n var categoryItems = {};\n var categoryIDItems = {};\n var starredItems = [];\n var categoriesList = [];\n let categoryTable = {};\n let pos_menu_types = [];\n let menuTable = {};\n //let item_options = [];\n\n var categoryChoices = [];\n var itemChoices = {};\n let itemTable = {};\n var toggle = {};\n\n if (restdata.categoryList && restdata.categoryList.length > 0) {\n categoriesList = restdata.categoryList.sort(\n (a, b) => a.orderNum - b.orderNum\n );\n categoriesList.forEach((cat) => {\n categoryTable[cat.id] = cat;\n this.masterCategoryTable[cat.id] = cat;\n });\n categoryChoices = categoriesList.map((category) => {\n var choice = {\n value: category.id,\n label: category.name,\n };\n return choice;\n });\n } else {\n categoriesList = [];\n categoryChoices = [];\n categoryTable = {};\n }\n\n if (\n restdata &&\n restdata.menu_items &&\n restdata.menu_items.length > 0\n ) {\n var menuItems = restdata.menu_items.sort((a, b) => {\n return new Date(a.createdAt) - new Date(b.createdAt);\n });\n let tax_charges = restdata.taxes;\n\n menuItems.forEach((item) => {\n var subcat = item.sub_category || 'All';\n var subcat_id = item.sub_category_id || 'All';\n\n menuTable[item.item_id] = item;\n\n menuTable[item.item_id].item_tax_details = item.tax_group_id\n ? tax_charges.filter(\n (x) => x.tax_group_id === item.tax_group_id\n )\n : [];\n\n itemTable[item.item_id] = item;\n\n if (!itemChoices[item.category_id]) {\n itemChoices[item.category_id] = [];\n }\n\n if (!categoryItems[item.category]) {\n categoryItems[item.category] = {};\n }\n\n if (!categoryIDItems[item.category_id]) {\n categoryIDItems[item.category_id] = {};\n }\n\n if (!categoryItems[item.category][subcat]) {\n categoryItems[item.category][subcat] = [];\n }\n\n if (!categoryIDItems[item.category_id][subcat_id]) {\n categoryIDItems[item.category_id][subcat_id] = [];\n }\n\n categoryItems[item.category][subcat].push(item);\n categoryIDItems[item.category_id][subcat_id].push(item);\n\n if (item.isStarred) {\n starredItems.push(item);\n }\n\n if (\n item.pos_menutype &&\n pos_menu_types.indexOf(item.pos_menutype) === -1\n ) {\n pos_menu_types.push(item.pos_menutype);\n }\n\n itemChoices[item.category_id].push({\n value: item.item_id,\n label: item.name,\n });\n });\n\n var preCatList = restdata.categories\n ? JSON.parse(restdata.categories)\n : [];\n var currentCatList = categoryItems\n ? Object.keys(categoryItems).sort()\n : [];\n\n var validList = preCatList\n ? preCatList.filter((x) => currentCatList.indexOf(x) >= 0)\n : []; //Categories in existing list, missing in current list\n var missingList = currentCatList\n ? currentCatList.filter((x) => preCatList.indexOf(x) < 0)\n : []; //Categories in current list, missing from exisiting list\n\n var categories = validList.concat(missingList);\n\n var data = {\n restdata,\n categoryItems,\n categoryIDItems,\n categoriesList,\n categoryTable,\n categories,\n menuTable,\n starredItems,\n categoryChoices,\n itemChoices,\n itemTable,\n pos_menu_types,\n };\n return resolve(data);\n } else {\n var data = {\n restdata,\n categoryItems,\n categoryIDItems,\n categoriesList,\n categoryTable,\n categories: [],\n menuTable,\n starredItems,\n categoryChoices,\n itemChoices,\n itemTable,\n pos_menu_types,\n };\n return resolve(data);\n }\n });\n }\n\n async login(email, password, code) {\n try {\n if (email && password) {\n this.setLoading();\n let url = window.kumbaURL + '/auth/signin';\n\n\n const response = await axios({\n url,\n method: 'POST',\n data: {\n email: email,\n password: password,\n },\n });\n var data = response.data;\n this.setState({\n token: data.token,\n loading: false,\n email: email\n });\n sessionStorage.setItem('token', data.token);\n if (data.user.restaurant) {\n this.setState({\n restID: data.user.restaurant.restaurant_id,\n });\n sessionStorage.setItem(\n 'restID',\n data.user.restaurant.restaurant_id\n );\n await this.loadRestaurantDetails();\n return Promise.resolve({\n restID: data.user.restaurant.restaurant_id,\n });\n } else {\n return Promise.resolve({ restID: null });\n }\n // if (code) {\n // var staff = await this.getServer(code);\n // this.setState({ staff: staff });\n // }\n\n } else {\n return Promise.reject(new Error(\"Invalid email/password\"));\n }\n } catch (err) {\n //this.setState({signupError : err});\n alert(\n 'Something went wrong while logging you in. Please try again.'\n );\n //alert(err);\n return Promise.reject(err);\n }\n }\n\n async logout() {\n //e.preventDefault();\n this.setLoading();\n try {\n const response = await axios({\n url: window.kumbaURL + '/auth/signout',\n method: 'GET',\n });\n alert('Logged out successfully');\n this.setState({\n restID: null,\n token: null,\n redirect: true,\n restdata: null,\n loading: false,\n isRestDone: false,\n categories: [],\n categoryItems: {},\n staff: null,\n });\n sessionStorage.clear();\n } catch (err) {\n alert(\"Couldn't log out. Please try again.\");\n //alert(err);\n }\n }\n\n async signup(values) {\n // console.log('sedning --', values);\n try {\n if (values.email && values.password) {\n this.setLoading();\n let url = window.kumbaURL + '/auth/signup';\n\n\n var response = await axios({\n url,\n method: 'POST',\n data: {\n email: values.email,\n password: values.password,\n },\n });\n var data = response.data;\n var userdata = data.user;\n // console.log(userdata);\n var token = data.token;\n ////console.log(\"Image done\");\n this.setState({\n token: token,\n email: values.email\n });\n // sessionStorage.setItem('token', token);\n\n return Promise.resolve({ restID: null });\n } else {\n return Promise.reject(new Error(\"Invalid email or password. Please try again\"));\n }\n\n // if (values.manager && values.code) {\n // var staff = await this.addServer({\n // name: values.manager,\n // access_code: values.code,\n // role: 'manager',\n // restaurant: restdata.restaurant_id,\n // });\n // this.setState({ staff: staff });\n // }\n //await this.loadRestaurantDetails();\n } catch (err) {\n this.setState({ loading: false });\n alert('Something went wrong. Please try again');\n return Promise.reject(err);\n }\n }\n\n async signupRestaurant(values) {\n console.log('sedning --', values, 'WITH TOKEN --', this.state.token);\n try {\n let { address,img, logo, ...data } = values;\n let addressdata = address && address.google_address ? {\n name: values.name,\n apt: address.apt || null,\n floor: address.floor || null,\n building: address.building || null,\n zip: address.zip || null,\n note: address.note || null,\n landmark: address.landmark || null,\n google_address: address.google_address.label,\n street: address.google_address.label,\n google_places_id: address.google_address.value.place_id,\n } : null;\n\n var resp = await axios({\n url: window.kumbaURL + '/restaurant',\n method: 'POST',\n headers: { 'foodbots-header': this.state.token },\n data: {\n ...data,\n email: this.state.email,\n // address: addressdata,\n },\n });\n\n var restdata = resp.data;\n if(addressdata) {\n await axios({\n method : 'POST',\n url:\n window.kumbaURL +\n '/address/create',\n data : {\n ...addressdata,\n rest : restdata.restaurant_id\n },\n headers: { 'foodbots-header': this.state.token },\n });\n }\n if (values.img) {\n const formData = new FormData();\n formData.append('image', values.img);\n await axios({\n url:\n window.kumbaURL +\n '/image/spaces/restaurant/' +\n restdata.restaurant_id,\n method: 'POST',\n headers: { 'foodbots-header': this.state.token },\n data: formData,\n });\n }\n if (values.logo) {\n const formData = new FormData();\n formData.append('image', values.logo);\n await axios({\n url:\n window.kumbaURL +\n '/image/spaces/logos/' +\n restdata.restaurant_id,\n method: 'POST',\n headers: { 'foodbots-header': this.state.token },\n data: formData,\n });\n }\n ////console.log(\"Image done\");\n this.setState({\n restID: restdata.restaurant_id,\n loading: false,\n });\n this.setState({ token: null });\n } catch (err) {\n this.setState({ loading: false });\n alert('Something went wrong. Please try again');\n return Promise.reject(err);\n }\n }\n\n async updateRestaurant(values) {\n console.log('UPDATING ----', values);\n try {\n let { address,img, logo, ...data } = values;\n let addressdata = address && address.google_address ? {\n name: values.name,\n apt: address.apt || null,\n floor: address.floor || null,\n building: address.building || null,\n zip: address.zip || null,\n note: address.note || null,\n landmark: address.landmark || null,\n google_address: address.google_address.label,\n street: address.google_address.label,\n google_places_id: address.google_address.value.place_id,\n } : null;\n\n console.log(addressdata);\n\n let restid = this.state.selectedRestID || this.state.restID;\n // let data = \n let url = window.kumbaURL + \"/restaurant/updaterest/\" + restid;\n let header = {\n \"foodbots-header\": this.state.token,\n \"Content-Type\": \"application/json\"\n };\n // delete restData.address;\n console.log('Sending --', values);\n await axios({\n url: url,\n method: 'PUT',\n data: {\n ...data,\n // address: addressdata,\n },\n headers: header\n });\n\n if(addressdata) {\n await axios({\n method : 'DELETE',\n url : window.kumbaURL + '/address/remove/' + restid,\n headers : header\n });\n console.log(\"ADDRESS : restid\" , restid);\n await axios({\n method : 'POST',\n url:\n window.kumbaURL +\n '/address/create',\n data : {\n ...addressdata,\n rest : restid\n },\n headers: { 'foodbots-header': this.state.token },\n });\n }\n\n if (values.img) {\n const formData = new FormData();\n formData.append('image', values.img);\n await axios({\n url:\n window.kumbaURL +\n '/image/spaces/restaurant/' +\n this.state.restdata.restaurant_id,\n method: 'POST',\n headers: { 'foodbots-header': this.state.token },\n data: formData,\n });\n }\n if (values.logo) {\n const formData = new FormData();\n formData.append('image', values.logo);\n await axios({\n url:\n window.kumbaURL +\n '/image/spaces/logos/' +\n this.state.restdata.restaurant_id,\n method: 'POST',\n headers: { 'foodbots-header': this.state.token },\n data: formData,\n });\n }\n\n await this.state.loadRestaurantDetails();\n } catch (err) {\n console.log(err);\n return Promise.reject(err);\n }\n }\n\n async fetchReservations(from, to, type) {\n console.log('getting from --', from, 'to --', to, 'for ', type);\n try {\n // this.setState({\n // [type === 'reservation'\n // ? 'reservationsLoading'\n // : 'waitListLoading']: true,\n // });\n this.setState({\n reservationsLoading: true,\n });\n let url =\n window.kumbaURL +\n `/restaurant/${this.state.restdata.restaurant_id}/${type}/${from}/${to}`;\n let res = await axios(url, {\n headers: { 'foodbots-header': this.state.token },\n });\n // this.setState({\n // [type === 'reservation'\n // ? 'reservationsLoading'\n // : 'waitListLoading']: false,\n // [type === 'reservation' ? 'reservations' : 'waitList']:\n // res.data,\n // });\n this.setState({\n reservationsLoading: false,\n reservations: res.data,\n });\n return Promise.resolve(res.data);\n } catch (err) {\n // this.setState({\n // [type === 'reservation'\n // ? 'reservationsLoading'\n // : 'waitListLoading']: false,\n // });\n this.setState({\n reservationsLoading: false,\n reservations : []\n });\n toast.error('Error loading reservations');\n return Promise.reject(err);\n }\n }\n\n async addServer(serverDetails) {\n if (\n serverDetails.name &&\n serverDetails.role &&\n serverDetails.access_code\n ) {\n try {\n let url = window.kumbaURL + '/servers/';\n let header = { 'foodbots-header': this.state.token };\n const response = await axios({\n url,\n headers: header,\n method: 'POST',\n data: {\n name: serverDetails.name,\n restaurant:\n serverDetails.restaurant || this.state.restID,\n server_role: serverDetails.role,\n access_code: serverDetails.access_code,\n },\n });\n\n var data = response.data;\n\n await this.loadRestaurantDetails();\n return new Promise((resolve, reject) => {\n return resolve(data);\n });\n } catch (err) {\n //console.log(err);\n return new Promise((resolve, reject) => {\n return reject(err);\n });\n }\n }\n }\n\n async getServer(code) {\n try {\n let url = window.kumbaURL + '/servers/code/' + code;\n let header = { 'foodbots-header': this.state.token };\n const response = await axios({\n url,\n headers: header,\n method: 'GET',\n });\n\n var data = response.data;\n\n return new Promise((resolve, reject) => {\n return resolve(data);\n });\n } catch (err) {\n //console.log(err);\n return new Promise((resolve, reject) => {\n return reject(err);\n });\n }\n }\n\n removeItemInOrder(item_id) {\n this.ordersList = this.ordersList.filter(\n (eachorder) => eachorder.item_id !== item_id\n );\n this.setState({ unconfirmedCount: this.ordersList.length });\n this.updateUnconfirmedCount();\n }\n\n updateItemInOrder(item_id, quantity) {\n this.ordersList.forEach((order) => {\n if (order.item_id === item_id) {\n order.quantity = quantity;\n }\n });\n this.updateUnconfirmedCount();\n }\n\n addOrders(order) {\n order.subtitle = '';\n if (order.options && order.options.length > 0) {\n order.options.forEach((option) => {\n order.subtitle += option.choicename\n ? option.choicename + ',' : option.name + ',';\n });\n order.subtitle = order.subtitle\n .trim()\n .replace(/.$/, '.')\n .substr(0, 80);\n }\n order.subtitle += order.instructions;\n this.ordersList.push(order);\n this.updateUnconfirmedCount();\n }\n\n deleteOrder(order) {\n this.ordersList.splice(order, 1);\n this.updateUnconfirmedCount();\n }\n\n updateOrder(index, quantity) {\n if (quantity >= 1) {\n this.ordersList[index].quantity = quantity;\n }\n this.updateUnconfirmedCount();\n }\n\n saveOrder(order, tabledata) {\n this.setState({\n activeOrder: order,\n activeTable: tabledata,\n selectedOrderType : \"dine-in\"\n });\n }\n\n async updateUnconfirmedCount() {\n var unconfirmedTotal = 0.0;\n var unconfirmedCount = 0;\n var unconfirmedTax = 0.0;\n var unconfirmedTaxes = 0.0;\n var unconfirmedCGST = 0.0;\n var unconfirmedSGST = 0.0;\n var unconfirmedVAT = 0.0;\n var unconfirmedServiceFee = 0.0;\n var unconfirmedFees = 0.0;\n var unconfirmedGrandTotal = 0.0;\n\n let unconfirmedTaxDetails = {};\n\n var orderCredits =\n this.state.orderdata && this.state.orderdata.order_credits\n ? this.state.orderdata.order_credits\n : 0.0;\n\n for (let index in this.ordersList) {\n // console.log(order);\n let order = this.ordersList[index]\n if (order.options && order.options.length > 0) {\n var subtitle = '';\n order.options.forEach((option) => {\n subtitle += option.name + ', ';\n });\n }\n order.orderTotal = order.item_total * order.quantity;\n unconfirmedTotal += order.orderTotal;\n unconfirmedCount += order.quantity;\n\n order.taxTotal = 0.00;\n order.taxInfo = {};\n\n // console.log('unconfirmedOrderTotal = ' + order.orderTotal);\n\n if (order.itemdata) {\n let allRests = this.state.subrestdata\n ? this.state.subrestdata.concat([this.state.mainrestdata])\n : [this.state.mainrestdata];\n let selectedRest = allRests.filter(\n (rest) =>\n rest &&\n rest.restdata &&\n rest.restdata.restaurant_id === order.itemdata.menu\n );\n let menuTable =\n selectedRest && selectedRest.length > 0\n ? selectedRest[0].menuTable\n : null;\n\n if (\n menuTable &&\n menuTable[order.itemdata.item_id].item_tax_details\n ) {\n let item_tax_details =\n menuTable[order.itemdata.item_id].item_tax_details;\n\n let itemTaxes = item_tax_details.filter(\n (x) => x.tax_on_tax === null\n );\n let dependentTaxes = item_tax_details.filter(\n (x) => x.tax_on_tax !== null\n );\n\n //console.log(itemTaxes, dependentTaxes);\n\n let taxDetails = {};\n\n for (const index in itemTaxes) {\n let tax = itemTaxes[index];\n //console.log(tax);\n let calcTax = async (tax) => {\n let tax_amount =\n Math.round(order.orderTotal * tax.tax_amount) /\n 100;\n if (!unconfirmedTaxDetails[tax.name]) {\n unconfirmedTaxDetails[tax.name] = {\n name: tax.name,\n description: tax.description,\n tax_amount: tax.tax_amount,\n actual_tax: 0.0,\n };\n }\n if (!taxDetails[tax.id]) {\n taxDetails[tax.id] = {\n name: tax.name,\n description: tax.description,\n tax_amount: tax.tax_amount,\n actual_tax: 0.0,\n };\n }\n if (!order.taxInfo[tax.id]) {\n order.taxInfo[tax.id] = {\n name: tax.name,\n description: tax.description,\n tax_amount: tax.tax_amount,\n actual_tax: 0.0,\n };\n }\n taxDetails[tax.id].actual_tax += tax_amount;\n order.taxInfo[tax.id].actual_tax += tax_amount;\n order.taxTotal += tax_amount;\n unconfirmedTaxDetails[tax.name].actual_tax +=\n tax_amount;\n return Promise.resolve();\n };\n\n await calcTax(tax);\n //console.log()\n }\n\n for (const index in dependentTaxes) {\n let tax = dependentTaxes[index];\n let calcTax = async (tax) => {\n let tax_amount = 0.0;\n if (taxDetails[tax.tax_on_tax]) {\n tax_amount =\n Math.round(\n taxDetails[tax.tax_on_tax].actual_tax *\n tax.tax_amount\n ) / 100;\n }\n if (!unconfirmedTaxDetails[tax.name]) {\n unconfirmedTaxDetails[tax.name] = {\n name: tax.name,\n description: tax.description,\n tax_amount: tax.tax_amount,\n actual_tax: 0.0,\n };\n }\n if (!taxDetails[tax.id]) {\n taxDetails[tax.id] = {\n name: tax.name,\n description: tax.description,\n tax_amount: tax.tax_amount,\n actual_tax: 0.0,\n };\n }\n if (!order.taxInfo[tax.id]) {\n order.taxInfo[tax.id] = {\n name: tax.name,\n description: tax.description,\n tax_amount: tax.tax_amount,\n actual_tax: 0.0,\n };\n }\n taxDetails[tax.id].actual_tax += tax_amount;\n order.taxInfo[tax.id].actual_tax += tax_amount;\n order.taxTotal += tax_amount;\n unconfirmedTaxDetails[tax.name].actual_tax +=\n tax_amount;\n return Promise.resolve();\n };\n\n await calcTax(tax);\n }\n //console.log(taxDetails, unconfirmedTaxDetails)\n } else {\n if (process.env.REACT_APP_COUNTRY === 'IN') {\n if (!unconfirmedTaxDetails['CGST']) {\n unconfirmedTaxDetails['CGST'] = {\n name: 'CGST',\n description: '',\n tax_amount: 2.5,\n actual_tax: 0.0,\n };\n }\n if (!unconfirmedTaxDetails['SGST']) {\n unconfirmedTaxDetails['SGST'] = {\n name: 'SGST',\n description: '',\n tax_amount: 2.5,\n actual_tax: 0.0,\n };\n }\n if (!unconfirmedTaxDetails['VAT']) {\n unconfirmedTaxDetails['VAT'] = {\n name: 'VAT',\n description: '',\n tax_amount: 9,\n actual_tax: 0.0,\n };\n }\n let service_fee =\n this.state.restdata &&\n this.state.restdata.service_fee\n ? this.state.restdata.service_fee\n : 0;\n\n if (!unconfirmedTaxDetails['SERVICE_FEE']) {\n unconfirmedTaxDetails['SERVICE_FEE'] = {\n name: 'SERVICE FEE',\n description: '',\n tax_amount: service_fee,\n actual_tax: 0.0,\n };\n }\n\n var cgst = order.itemdata.cgst || 0;\n var sgst = order.itemdata.sgst || 0;\n var vat = order.itemdata.vat || 0;\n\n unconfirmedTaxDetails['CGST'].actual_tax +=\n (order.orderTotal * cgst) / 100;\n unconfirmedTaxDetails['SGST'].actual_tax +=\n (order.orderTotal * sgst) / 100;\n unconfirmedTaxDetails['VAT'].actual_tax +=\n (order.orderTotal * vat) / 100;\n unconfirmedTaxDetails['SERVICE_FEE'].actual_tax +=\n (order.orderTotal * service_fee * 1.05) / 100;\n } else {\n if (!unconfirmedTaxDetails['VAT']) {\n unconfirmedTaxDetails['VAT'] = {\n name: 'VAT',\n description: '',\n tax_amount: 9,\n actual_tax: 0.0,\n };\n }\n var vat = order.itemdata.vat || 0;\n unconfirmedTaxDetails['VAT'].actual_tax +=\n (order.orderTotal * vat) / 100;\n }\n }\n } else {\n if (process.env.REACT_APP_COUNTRY === 'IN') {\n if (!unconfirmedTaxDetails['CGST']) {\n unconfirmedTaxDetails['CGST'] = {\n name: 'CGST',\n description: '',\n tax_amount: 2.5,\n actual_tax: 0.0,\n };\n }\n if (!unconfirmedTaxDetails['SGST']) {\n unconfirmedTaxDetails['SGST'] = {\n name: 'SGST',\n description: '',\n tax_amount: 2.5,\n actual_tax: 0.0,\n };\n }\n if (!unconfirmedTaxDetails['VAT']) {\n unconfirmedTaxDetails['VAT'] = {\n name: 'VAT',\n description: '',\n tax_amount: 9,\n actual_tax: 0.0,\n };\n }\n let service_fee =\n this.state.restdata && this.state.restdata.service_fee\n ? this.state.restdata.service_fee\n : 0;\n\n if (!unconfirmedTaxDetails['SERVICE_FEE']) {\n unconfirmedTaxDetails['SERVICE_FEE'] = {\n name: 'SERVICE FEE',\n description: '',\n tax_amount: service_fee,\n actual_tax: 0.0,\n };\n }\n } else {\n if (!unconfirmedTaxDetails['VAT']) {\n unconfirmedTaxDetails['VAT'] = {\n name: 'VAT',\n description: '',\n tax_amount: 9,\n actual_tax: 0.0,\n };\n }\n }\n }\n }\n\n let kumba_fee =\n this.state.restdata && this.state.restdata.kumbapct\n ? this.state.restdata.kumbapct\n : 0.0;\n let kumba_fixed =\n this.state.restdata && this.state.restdata.kumbafixed\n ? this.state.restdata.kumbafixed\n : 0.0;\n unconfirmedFees =\n (unconfirmedTotal * kumba_fee * 1.18) / 100 + kumba_fixed;\n if (process.env.REACT_APP_COUNTRY === 'IN') {\n if (unconfirmedTaxDetails) {\n //console.log(unconfirmedTaxDetails)\n for (let key in unconfirmedTaxDetails) {\n // console.log(key);\n unconfirmedTax += unconfirmedTaxDetails[key].actual_tax;\n }\n }\n //console.log(unconfirmedTax);\n var total = unconfirmedTotal + unconfirmedTax + unconfirmedFees;\n unconfirmedGrandTotal = total;\n } else {\n var total = unconfirmedTotal + unconfirmedTaxes + unconfirmedFees;\n unconfirmedServiceFee =\n (total *\n (this.state.restdata\n ? this.state.restdata.service_fee\n : 0)) /\n 100;\n unconfirmedGrandTotal = total + unconfirmedServiceFee;\n }\n\n // console.log('unconfirmedTax = ' + unconfirmedTax);\n // console.log('unconfirmedGrandTotal = ' + unconfirmedGrandTotal);\n // console.log('orderCredits = ' + orderCredits);\n\n // console.log(unconfirmedGrandTotal);\n\n var unconfirmedPayTotal = 0.0;\n var unconfirmedCreditsUsed = 0.0;\n\n if (orderCredits > unconfirmedGrandTotal) {\n unconfirmedPayTotal = 0.0;\n unconfirmedCreditsUsed = unconfirmedGrandTotal;\n } else {\n unconfirmedPayTotal = parseFloat(\n unconfirmedGrandTotal - orderCredits\n );\n unconfirmedCreditsUsed = orderCredits;\n }\n\n // console.log('unconfirmedPayTotal = ' + unconfirmedPayTotal);\n\n this.setState({\n // unconfirmedCount: unconfirmedCount,\n unconfirmedTotal,\n unconfirmedCount,\n unconfirmedTax,\n unconfirmedTaxes,\n unconfirmedCGST,\n unconfirmedSGST,\n unconfirmedVAT,\n unconfirmedServiceFee,\n unconfirmedFees,\n unconfirmedGrandTotal,\n unconfirmedPayTotal,\n unconfirmedTaxDetails,\n unconfirmedCreditsUsed,\n orderCredits,\n });\n return Promise.resolve();\n }\n\n async submitOrder(userdata) {\n try {\n await this.updateUnconfirmedCount();\n let url = this.state.kumbaURL + '/mainorders/add';\n let header = { 'foodbots-header': this.state.token };\n var orders = [];\n \n // alert(\"Orders : \" + JSON.stringify(orders));\n const _data = {\n order_id: this.state.activeOrder\n ? this.state.activeOrder.order_id\n : null,\n order_type: this.state.selectedOrderType,\n server: this.state.selectedStaff\n ? this.state.selectedStaff.id\n : null,\n rest_id: this.state.selectedRestID,\n table_id:\n this.state.selectedOrderType === 'dine-in'\n ? this.state.activeTable.id\n : null,\n ordersList: orders,\n name: userdata.name || null,\n email: userdata.email || null,\n phone: this.state.activeOrder\n ? this.state.activeOrder.user\n : userdata.phone,\n status: 'accepted',\n credits_used: userdata.credits_used || 0.0,\n num_people: userdata.num_people || null,\n delivery_address: this.state.selectedAddress,\n delivery_charge : this.state.delivery_charge,\n customer_preferred_time : this.state.customer_preferred_time, \n };\n this.ordersList.forEach((order) => {\n console.log('ORDER --', order);\n // alert(JSON.stringify(order.taxInfo));\n var eachorder = {\n order_id: this.state.activeOrder\n ? this.state.activeOrder.order_id\n : null,\n item_id: order.item_id,\n quantity: order.quantity,\n rest_id: order.restID,\n table: this.state.selectedOrderType === \"dine-in\" ? this.state.activeTable.id : null,\n item_total: order.orderTotal,\n status : \"accepted\",\n // payment_mode: 'kumba',\n tax_info: JSON.stringify(order.taxInfo),\n tax_total: order.taxTotal,\n item_pay_total: order.orderTotal + order.taxTotal,\n item_specifics: order.instructions,\n options: order.options.map((option) => option.id),\n options_json: JSON.stringify(order.options),\n instructions: order.instructions,\n us_payment_id: null,\n ind_payment_id: null,\n };\n orders.push(eachorder);\n console.log('EACH ORDER --', eachorder);\n console.log('_DATA --', _data);\n });\n console.log('======= SENDING ==========', _data)\n const response = await axios({\n url,\n headers: header,\n method: 'POST',\n data: _data\n });\n var data = response.data;\n\n this.setState({\n activeTable: null,\n selectedOrderType: null,\n deliveryAddress: null,\n staff : null,\n });\n\n /*Important : To reset all state variables for next order use */\n this.clearOrder();\n return new Promise((resolve, reject) => {\n return resolve(data);\n });\n } catch (err) {\n this.setState({ error: err });\n console.log(err);\n return new Promise((resolve, reject) => {\n return reject(err);\n });\n //alert(\"Could not add '\" + this.props.itemdata.name + \"' to cart\");\n //alert(\"Couldn't complete the operation\");\n }\n }\n\n async clearOrder() {\n this.setState({ activeOrder: null, suborder: null, activeTable: null });\n this.ordersList = [];\n }\n\n /* Service Worker for PushNotifications related code */\n\n unsubscribePush() {\n navigator.serviceWorker.ready.then(async function (registration) {\n try {\n //Find the registered push subscription in the service worker\n var subscription =\n await registration.pushManager.getSubscription();\n if (!subscription) {\n return;\n //If there isn't a subscription, then there's nothing to do\n } else {\n await subscription.unsubscribe();\n await axios.delete(window.kumbaURL + '/push/unregister');\n }\n } catch (err) {\n console.error(err);\n }\n });\n }\n\n async subscribePush(token) {\n try {\n return await axios({\n url: window.kumbaURL + '/push/register',\n method: 'POST',\n data: {\n token: token,\n type: 'restaurant',\n id: this.state.restID,\n token_type: 'fcm',\n },\n });\n } catch (err) {\n //Do nothing\n console.log(err);\n return Promise.reject(err);\n }\n }\n\n async registerSubKumba(subscription) {\n try {\n var response = await axios({\n url: window.kumbaURL + '/push/register',\n method: 'POST',\n data: {\n subscription: subscription,\n restID: this.state.restID,\n staff: this.state.staff ? this.state.staff.id : null,\n role: this.state.staff\n ? this.state.staff.server_role\n : null,\n },\n });\n return new Promise((resolve, reject) => {\n return resolve(response.data);\n });\n } catch (e) {\n //console.log(e);\n return new Promise((resolve, reject) => {\n return reject(e);\n });\n }\n }\n\n async verifyStripe(code) {\n try {\n var response = await axios({\n url: window.kumbaURL + '/stripe/connect/oauth',\n method: 'PUT',\n data: {\n code: code,\n restID: this.state.restID,\n },\n });\n return new Promise((resolve, reject) => {\n return resolve(response.data);\n });\n } catch (e) {\n //console.log(e);\n return new Promise((resolve, reject) => {\n return reject(e);\n });\n }\n }\n\n async viewStripeDashboard() {\n try {\n let header = { 'foodbots-header': this.state.token };\n var response = await axios({\n url:\n window.kumbaURL +\n '/stripe/dashboard/' +\n this.state.restdata.restaurant_id,\n method: 'GET',\n headers: header,\n });\n var linkObj = response.data;\n window.open(linkObj.url);\n return new Promise((resolve, reject) => {\n return resolve(response.data);\n });\n } catch (e) {\n //console.log(e);\n return new Promise((resolve, reject) => {\n return reject(e);\n });\n }\n }\n\n playSound() {\n document.getElementById('notify_sound').innerHTML = (\n \n );\n\n setTimeout(() => {\n document.getElementById('notify_sound').innerHTML = '';\n }, 4000);\n }\n\n async changeTableDetails(useOrderID, useOldTableID, newTable) {\n try {\n if (useOrderID) {\n let url = window.kumbaURL + '/changetable';\n let header = { 'foodbots-header': this.state.token };\n const response = await axios({\n url,\n method: 'PUT',\n headers: header,\n data: {\n old_table: useOldTableID,\n new_table: newTable,\n order_id: useOrderID,\n staff : this.state.selectedStaff ? this.state.selectedStaff.id : null\n },\n });\n var jsondata = response.data;\n return Promise.resolve(jsondata);\n } else {\n return Promise.resolve(null);\n }\n } catch (err) {\n //console.log(err);\n return Promise.reject(err);\n }\n }\n\n async syncPrism() {\n try {\n let url = window.kumbaURL + '/prizmatec/sync';\n let header = { 'foodbots-header': this.state.token };\n alert('Please wait for 2-3 minutes for the sync to be completed.');\n const response = await axios({\n url,\n method: 'POST',\n headers: header,\n data: {\n rest_id: this.state.restID,\n },\n });\n return Promise.resolve(null);\n } catch (err) {\n console.log(err);\n return Promise.resolve(null);\n //alert(\"Please wait for 2-3 minutes for the sync to be completed.\")\n }\n }\n\n render() {\n return (\n \n {this.props.children}\n \n );\n }\n}\n\nexport function withTheme(Component) {\n // ...and returns another component...\n return function ThemedComponent(props) {\n // ... and renders the wrapped component with the context!\n // Notice that we pass through any additional props as well\n return (\n \n {(context) => }\n \n );\n };\n}\n","import React, { useState, useEffect, useRef } from 'react';\n\nfunction useInterval(callback, delay) {\n const savedCallback = useRef();\n\n // Remember the latest callback.\n useEffect(() => {\n savedCallback.current = callback;\n }, [callback]);\n\n // Set up the interval.\n useEffect(() => {\n function tick() {\n savedCallback.current();\n }\n if (delay !== null) {\n let id = setInterval(tick, delay);\n return () => clearInterval(id);\n }\n }, [delay]);\n}\n\nexport default useInterval;","import React, {useState} from 'react';\nimport { Row, Col, Label, Input } from 'reactstrap';\nimport Select from 'react-select';\n\n\nconst countryCodes = require('country-codes-list');\n\nconst PhoneField = ({phone, setPhone, phoneIG, setPhoneIG, readOnly}) => {\n\n const myCountryCodesObject = countryCodes.customList(('countryCallingCode'), '+{countryCallingCode}');\n // console.log(myCountryCodesObject);\n\n const myCountriesOptions = [];\n\n Object.keys(myCountryCodesObject).forEach(x => {\n myCountriesOptions.push({\n value : \"+\" + x,\n label : myCountryCodesObject[x]\n })\n });\n\n let phoneIGHTML = \n rest.value ===\n phoneIG\n )\n .pop()}\n onChange={(val) => setPhoneIG(val.value)}\n options={myCountriesOptions}\n isDisabled={readOnly}\n />\n\n return(\n <>\n \n \n \n {phoneIGHTML}\n \n \n setPhone(e.target.value)}\n readOnly={readOnly}\n />\n \n \n \n )\n}\n\nexport default PhoneField;","import React from 'react'\nimport axios from 'axios';\nimport {toast} from 'react-toastify';\n\nexport default class EachTableOrderRowController {\n static handleOneClick() {\n // if(this.props.canCancel) {\n this.setState({ clicked: !this.state.clicked });\n // }\n }\n\n static async handleSelectChange() {\n try {\n let url =\n window.kumbaURL + '/orders/delete/' + this.props.orderdata.id;\n let header = { 'foodbots-header': this.props.token };\n var toastId = toast('Cancelling ....', {\n autoClose: false,\n closeButton: false,\n });\n var response = await axios({\n url,\n headers: header,\n method: 'DELETE',\n data: {\n staff: this.props.selectedStaff\n ? this.props.selectedStaff.id\n : null,\n reason : this.state.reason\n },\n });\n this.props.getOrder(this.props.orderID);\n toast.update(toastId, {\n render: 'Cancelled Item.',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n } catch (err) {\n this.setState({ error: err });\n toast.update(toastId, {\n render: 'Could not cancel.',\n type: toast.TYPE.ERROR,\n autoClose: 3000,\n closeButton: true,\n });\n }\n }\n\n static async markServed(id) {\n let header = { 'foodbots-header': this.props.token };\n var toastID = toast('Completing order ...', {\n autoClose: false,\n closeButton: false,\n });\n try {\n var response = await axios({\n url: window.kumbaURL + '/orders/markserved/' + id,\n headers: header,\n method: 'PUT',\n data: {\n staff: this.props.selectedStaff\n ? this.props.selectedStaff.id\n : null,\n },\n });\n var jsondata = response.data;\n toast.update(toastID, {\n render: 'Finalized order successfully',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n } catch (error) {\n this.setState({ error: error });\n toast.update(toastID, {\n render: 'Failed to finalize order',\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true,\n });\n }\n }\n}\n","import React, { useState, useEffect } from 'react';\nimport { Row, Col, ListGroupItem, Button, Modal, ModalBody, Form, FormGroup, Label, Input, ButtonGroup, ButtonToolbar } from 'reactstrap';\n//import '../../dashboardComponents/OrderHistory/OrderHistory.css';\nimport { Icon } from 'react-icons-kit';\nimport { ic_lock } from \"react-icons-kit/md/ic_lock\";\nimport { user } from \"react-icons-kit/icomoon/user\";\nimport { arrowLeft } from \"react-icons-kit/icomoon/arrowLeft\";\nimport { close } from \"react-icons-kit/fa/close\";\nimport styled from 'styled-components';\nimport { toast } from 'react-toastify';\nimport { precacheAndRoute } from 'workbox-precaching';\n\nconst Wrapper = styled.article`\n background-color: white;\n padding: 10px;\n h4,\n h5 {\n margin: 0px;\n margin-top: 0px !important;\n text-align: left;\n }\n`;\n\nconst EachTableOrderRowView = ({parent}) => {\n const [accessCode, setAccessCode] = useState(null);\n const [error, setError] = useState(false);\n const { context } = parent.props;\n\n const [showCancel, setShowCancel] = useState(false);\n\n let order = parent.props.orderdata;\n var subtitle = \"\";\n let options = order.options_json ? JSON.parse(order.options_json) : null;\n if (options && options.length > 0) {\n options.forEach(option => {\n subtitle += option.name + \", \";\n });\n }\n\n const accessLevel = window.server_roles.manager;\n const handleSubmit = async (e) => {\n try {\n e.preventDefault();\n if (accessCode === parent.state.selectedStaff.access_code) {\n await parent.handleSelectChange();\n parent.setState({\n showAuth: false,\n selectedStaff : null\n });\n return Promise.resolve();\n } else {\n toast.error(\"Invalid Access Code\");\n return Promise.reject(new Error(\"Invalid access code\"));\n }\n } catch(err) {\n return Promise.reject(err);\n }\n };\n\n useEffect(() => {\n if (accessCode && accessCode.length > 4) {\n setError(\"Access Code Should Be 4 Digits\");\n } else {\n setError(false);\n }\n }, [accessCode]);\n\n if (order) {\n console.log({order})\n return (\n \n \n \n
\n
\n {parent.state.selectedStaff && {\n parent.setState({ selectedStaff: null})\n }} />}\n

Select Manager

\n
\n parent.setState({\n showAuth: false\n })} />\n
\n
\n {\n parent.state.selectedStaff &&
\n \n
\n \n \n\n {\n setAccessCode(`${e.target.value}`);\n }}\n style={{\n fontSize: \"30px\",\n fontWeight: 800,\n borderColor: error ? \"red\" : \"gray\",\n color: error ? \"#ff8099\" : \"gray\",\n }}\n />\n \n \n {error ? (\n
\n {error}\n
\n ) : null}\n
\n
\n }\n {\n !parent.state.selectedStaff && parent.props.managers && parent.props.managers.length > 0 && parent.props.managers.map((val, i) => {\n return (\n \n parent.setState({\n selectedStaff: val,\n })\n }\n >\n \n
\n

{val.name}

\n
\n {val.email}\n
\n
\n \n );\n })\n }\n
\n
\n
\n \n \n \n \n {\n parent.setState({reason : e.target.value})\n }}\n style={{\n fontSize: \"15px\",\n fontWeight: 800,\n borderColor: error ? \"red\" : \"gray\",\n color: error ? \"#ff8099\" : \"gray\",\n height: \"2em\",\n }}\n />\n \n {setShowCancel(false); parent.handleSelectChange()}}\n >Cancel Item\n setShowCancel(false)}\n >Close\n \n \n \n \n \n \n {order.quantity}\n \n \n {order.item_id ? order.item_id.name : \"Item Deleted from DB\"}\n

{subtitle}

\n {order.item_specifics ? {\"Instructions : \" + order.item_specifics} : null}\n \n\n \n {order.status === \"waiting\" ? \n : \n parent.state.clicked ?\n <>\n \n {order.status === \"readytoserve\" ? \n : null}\n \n :\n

{window.rupeeSym + parseFloat(order.item_total).toFixed(2)}

\n }\n \n
\n
\n )\n } else {\n return (

Loading ...

)\n }\n}\n\nexport default EachTableOrderRowView;\n","import React, { Component } from 'react';\nimport { withTheme } from '../../contexts/AppContext';\nimport EachTableOrderRowController from '../../controllers/ordersControllers/EachTableOrderRowController';\nimport EachTableOrderRowView from '../../views/orders/EachTableOrderRowView';\n\nclass EachOrderRow extends Component {\n constructor(props) {\n super(props);\n //alert(JSON.stringify(this.props.restdata))\n this.state = {\n //orderdata : this.props.orderdata || null,\n orderOptions: [\n {\n value: 'accepted',\n label: 'Order Received',\n color: 'default',\n },\n //{ value : \"cooking\", label : \"Sent to Chef\", color : \"primary\"},\n //{ value : \"readytoserve\", label : \"Ready to Serve\", color : \"warning\"},\n { value: 'served', label: 'Served', color: 'success' },\n ],\n //status : this.props.orderdata ? this.props.orderdata.status : \"\",\n clicked: false,\n showAuth: false,\n reason : null,\n\n selectedStaff : null,\n };\n\n // defined in EachTableOrderRowController.js\n this.handleOneClick = EachTableOrderRowController.handleOneClick.bind(this)\n this.handleSelectChange = EachTableOrderRowController.handleSelectChange.bind(this)\n this.markServed = EachTableOrderRowController.markServed.bind(this);\n }\n\n render() {\n return(\n \n )\n }\n}\n\nexport default withTheme(EachOrderRow);","import React from 'react'\nimport Global from '../../../Global';\nimport { Button, Input } from 'reactstrap';\n\n\nexport default function ImageAndLogo({\n values,\n setImg,\n setLogo,\n isDisabled\n}) {\n\n const [state, setState] = React.useState({\n img: null,\n logo: null,\n imgDisplay: null,\n logoDisplay: null\n });\n\n React.useEffect(() => {\n setImg(state.img)\n setLogo(state.logo)\n }, [state.img, state.logo])\n\n console.log('IMAGE --', values)\n\n return (\n <>\n \n
\n
\n
\n {/* */}\n \n {\n setLogo(\n e.target.files[0]\n );\n setState({\n ...state,\n logoDisplay:\n URL.createObjectURL(\n e.target\n .files[0]\n ),\n });\n }}\n />\n Change Logo\n \n
\n
\n
\n {/* */}\n \n {\n setImg(\n e.target.files[0]\n );\n setState({\n ...state,\n imgDisplay:\n URL.createObjectURL(\n e.target\n .files[0]\n ),\n });\n }}\n />\n Change Image\n \n
\n
\n \n )\n}\n","import React, {useState, useEffect} from 'react';\nimport { Container, Form, Row, Col, Button, Label, FormGroup, ButtonToolbar, Input } from 'reactstrap';\nimport { FieldGroup } from '../../../helpers/FieldGroup';\nimport Global from '../../../Global';\nimport Select from 'react-select';\nimport Editor from \"../../../components/Editor/Editor\";\nimport ImageAndLogo from './ImageAndLogo';\nimport { next } from 'react-icons-kit/icomoon';\nimport PhoneField from '../../../helpers/PhoneField';\n\nconst countryCodes = require('country-codes-list');\n\n\nconst PlaceDetails = ({values, goNext, goPrev, add, edit}) => {\n let [name, setName] = useState(values.name || null);\n let [business_name, setBusinessName] = useState(values.business_name || null);\n let [phone, setPhone] = useState(values.phone ? values.phone.substr(-10) : null);\n let [cuisine, setCuisine] = useState(values.cuisine ? values.cuisine : null);\n let [type, setType] = useState(values.type || \"foodndrinksprovider\");\n let [description, setDescription] = useState(values.about_us || null);\n let [htmlDescription, setHTMLDescription] = useState(values.html_about_us || null);\n let [img, setImg] = useState(null);\n let [logo, setLogo] = useState(null);\n\n let [phoneIG, setPhoneIG] = useState(values.phone ? values.phone.slice(0, -10) : null);\n\n useEffect(() => {\n console.log(name, business_name, cuisine, phone, type, description);\n }, [name, business_name, cuisine, phone, type, description, htmlDescription]);\n\n useEffect(() => {\n setName(values.name || null)\n setBusinessName(values.business_name || null);\n setPhone(values.phone ? values.phone.substr(-10) : null);\n setCuisine(values.cuisine ? values.cuisine : null);\n setType(values.type || null);\n setDescription(values.about_us || null);\n setHTMLDescription(values.html_about_us || null);\n setPhoneIG(values.phone ? values.phone.slice(0, -10) : null);\n }, [values]);\n\n let doNext = () => {\n let values = {\n name : name,\n business_name : business_name,\n phone : phoneIG + phone,\n cuisine : cuisine,\n type : type,\n about_us : description,\n html_about_us : htmlDescription,\n img : img,\n logo : logo\n }\n goNext(values);\n \n // setName(null);\n // setBusinessName(null);\n // setPhone(null);\n // setCuisine(null);\n // setDescription(null);\n // setHTMLDescription(null);\n // setType(null);\n }\n\n return(\n \n
\n {\"Step(1 of 4) : PLACE DETAILS\"}\n
\n
\n setName(e.target.value)}\n />\n setBusinessName(e.target.value)}\n />\n \n \n \n \n \n \n \n \n \n rest.value ===\n type\n )\n .pop()}\n onChange={(val) => setType(val.value)}\n options={Global.restTypes}\n placeholder=\"Select One: \"\n isDisabled={!add && !edit}\n />\n \n \n \n setCuisine(e.target.value)}\n readOnly={!add && !edit}\n />\n \n \n {/*

{parent.state.description}

*/}\n {\n setHTMLDescription(data);\n setDescription(text.replace(\" \", \" \"))\n }}\n defaultValue={htmlDescription || description}\n disabled={!add && !edit}\n />\n
\n \n {add || edit ?\n \n \n : null\n }\n \n
\n )\n}\n\nexport default PlaceDetails;","import React, {useState, useEffect} from 'react';\nimport { Container, Form, Row, Col, Button, Label, FormGroup, ButtonToolbar } from 'reactstrap';\nimport { FieldGroup } from '../../../helpers/FieldGroup';\nimport Global from '../../../Global';\nimport Select from 'react-select';\nimport Editor from \"../../../components/Editor/Editor\";\n\n const facebookIG = \"https://www.facebook.com/\";\n const instagramIG = \"https://www.instagram.com/\";\n const whatsappIG = \"https://www.wa.me/91\";\n\nconst SocialDetails = ({values, goNext, goPrev, add, edit}) => {\n let [facebook_handle, setFacebookHandle] = useState(values.facebook_url ? values.facebook_url.split(facebookIG)[1] : null);\n let [instagram_handle, setInstagramHandle] = useState(values.instagram_url ? values.instagram_url.split(instagramIG)[1] : null);\n let [restaurant_url, setRestaurantURL] = useState(values.restaurant_url || null);\n let [whatsapp_num, setWhatsappNum] = useState(values.whatsapp_url ? values.whatsapp_url.split(whatsappIG)[1] : null);\n\n let doNext = () => {\n let values = {\n facebook_url : facebook_handle ? facebookIG + facebook_handle : null,\n instagram_url : instagram_handle ? instagramIG + instagram_handle : null,\n restaurant_url : restaurant_url,\n whatsapp_url : whatsapp_num ? whatsappIG + whatsapp_num : null\n }\n goNext(values);\n }\n\n useEffect(() => {\n setFacebookHandle(values.facebook_url ? values.facebook_url.split(facebookIG)[1] : null);\n setInstagramHandle(values.instagram_url ? values.instagram_url.split(instagramIG)[1] : null);\n setRestaurantURL(values.restaurant_url || null);\n setWhatsappNum(values.whatsapp_url ? values.whatsapp_url.split(whatsappIG)[1] : null);\n }, [values]);\n\n return(\n \n
\n {\"Step(2 of 4) : SOCIAL DETAILS\"}\n
\n
\n setRestaurantURL(e.target.value)}\n readOnly={!add && !edit}\n />\n setFacebookHandle(e.target.value)}\n ig={facebookIG}\n readOnly={!add && !edit}\n />\n setInstagramHandle(e.target.value)}\n ig={instagramIG}\n readOnly={!add && !edit}\n />\n {/* setWhatsappNum(e.target.value)}\n ig={whatsappIG}\n readOnly={!add && !edit}\n /> */}\n {add || edit ?\n \n \n \n : null\n }\n \n
\n )\n}\n\nexport default SocialDetails;","import React, {useState, useEffect} from 'react';\nimport { Container, Form, Row, Col, Button, Label, FormGroup, ButtonToolbar } from 'reactstrap';\nimport { FieldGroup } from '../../../helpers/FieldGroup';\nimport Global from '../../../Global';\nimport GooglePlacesAutocomplete from 'react-google-places-autocomplete';\n\nconst LocationDetails = ({values, goNext, goPrev, add, edit}) => {\n let [google_address, setAddress] = useState(null);\n let [apt, setApt] = useState(null);\n let [landmark, setLandmark] = useState(null);\n let [note, setNote] = useState(null);\n\n\n let doNext = () => {\n let values = {\n address : {\n google_address : google_address,\n apt : apt,\n landmark : landmark,\n note : note\n }\n };\n console.log('LOCATION STATE CHANGE ---', values);\n goNext(values);\n }\n\n return(\n \n
\n {\"Step(3 of 4) : LOCATION DETAILS\"}\n
\n
\n {add || edit ?\n \n \n setAddress(e),\n }}\n autocompletionRequest={{\n componentRestrictions: {\n country: window.googleCountriesList,\n }\n }}\n isDisabled={!add && !edit}\n />\n : values.address ?

{values.address.street}

:

No address to display

\n }\n {google_address ? (\n <>\n setApt(e.target.value)}\n readOnly={!add && !edit}\n />\n setLandmark(e.target.value)}\n readOnly={!add && !edit}\n />\n setNote(e.target.value)}\n readOnly={!add && !edit}\n />\n \n ) : null\n }\n
\n {add || edit ?\n \n \n \n : null}\n \n
\n )\n}\n\nexport default LocationDetails;","import React, { useState, useEffect } from 'react';\nimport { Container, Form, Row, Col, Button, Label, FormGroup, Input, ButtonToolbar } from 'reactstrap';\nimport { FieldGroup } from '../../../helpers/FieldGroup';\nimport Editor from \"../../../components/Editor/Editor\";\nimport Global from '../../../Global';\n\nconst ServiceDetails = ({ values, goPrev, goNext, finalize, add, edit }) => {\n let [service_list, setServiceList] = useState(values.allowed_menu_types || []);\n\n const [colors, setColors] = useState({\n qrCodeColor: values.qrCodeColor || \"#426f76\",\n svgColor: values.svgColor || '#7ab1c1',\n highlightColor: values.highlightColor || \"#EBF5F2\",\n textColor: values.textColor || \"#000000\",\n svgTextColor: values.svgTextColor || \"#ffffff\"\n });\n\n\n let doNext = () => {\n let values = {\n allowed_menu_types: service_list,\n ...colors\n }\n finalize(values);\n };\n\n useEffect(() => {\n console.log('COLORS PROPS ---', values)\n setColors({\n qrCodeColor: values.qrCodeColor,\n svgColor: values.svgColor,\n highlightColor: values.highlightColor,\n textColor: values.textColor,\n svgTextColor: values.svgTextColor});\n setServiceList(values.allowed_menu_types || []);\n },[values])\n\n return (\n \n
\n {\"Step(4 of 4) : SERVICE DETAILS\"}\n
\n
\n \n \n \n \n {Global.menuTypes.map(x =>\n \n \n \n )}\n \n \n \n\n
\n\n \n
\n\n
\n
\n \n - {' '}\n {\n setColors({ ...colors, qrCodeColor: e.target.value })\n }} />\n \n
\n
\n \n - {' '}\n {\n setColors({ ...colors, svgTextColor: e.target.value })\n }} />\n \n\n
\n
\n \n - {' '}\n {\n setColors({ ...colors, svgColor: e.target.value })\n }} />\n \n
\n
\n \n - {' '}\n {\n setColors({ ...colors, highlightColor: e.target.value })\n }} />\n \n
\n
\n \n - {' '}\n {\n setColors({ ...colors, textColor: e.target.value })\n }} />\n \n
\n
\n\n
\n
\n {/* {service_list.includes(\"delivery\") ?\n \n \n \n \n \n {Global.menuTypes.map(x => \n \n \n \n )}\n \n \n \n
: null} */}\n {add || edit ?\n \n \n \n : null}\n \n
\n )\n}\n\nexport default ServiceDetails;","import React, { useState, useEffect } from 'react';\nimport { withTheme } from '../../../contexts/AppContext';\nimport PlaceDetails from './PlaceDetails';\nimport SocialDetails from './SocialDetails';\nimport LocationDetails from './LocationDetails';\nimport ServiceDetails from './ServiceDetails';\nimport { ButtonToolbar, Container, Progress, Button } from 'reactstrap';\nimport { Redirect } from 'react-router';\nimport { toast } from 'react-toastify';\n\nconst SignUpDetails = withTheme(({ context, add = true, edit = false, onEdit = null }) => {\n\n\n let [step, setStep] = useState(0);\n let [values, setValues] = useState({\n name: context.selectedRestData ? context.selectedRestData.restdata.name : context.restdata ? context.restdata.name : null,\n business_name: context.selectedRestData ? context.selectedRestData.restdata.business_name : null,\n phone: context.selectedRestData ? context.selectedRestData.restdata.phone : null,\n cuisine: context.selectedRestData ? context.selectedRestData.restdata.cuisine : null,\n type: context.selectedRestData ? context.selectedRestData.restdata.type : null,\n about_us: context.selectedRestData ? context.selectedRestData.restdata.about_us : null,\n html_about_us: context.selectedRestData ? context.selectedRestData.restdata.html_about_us : null,\n facebook_url: context.selectedRestData ? context.selectedRestData.restdata.facebook_url : null,\n instagram_url: context.selectedRestData ? context.selectedRestData.restdata.instagram_url : null,\n restaurant_url: context.selectedRestData ? context.selectedRestData.restdata.restaurant_url : null,\n whatsapp_url: context.selectedRestData ? context.selectedRestData.restdata.whatsapp_url : null,\n address: context.selectedRestData ? context.selectedRestData.restdata.address : null,\n allowed_menu_types: context.selectedRestData ? context.selectedRestData.restdata.allowed_menu_types : [],\n qrCodeColor: context.selectedRestData ? context.selectedRestData.restdata.qrCodeColor : null,\n svgColor: context.selectedRestData ? context.selectedRestData.restdata.svgColor : null,\n highlightColor: context.selectedRestData ? context.selectedRestData.restdata.highlightColor : null,\n textColor: context.selectedRestData ? context.selectedRestData.restdata.textColor : null,\n svgTextColor: context.selectedRestData ? context.selectedRestData.restdata.svgTextColor : null,\n image: context.selectedRestData ? context.selectedRestData.restdata.image : null,\n logo_image: context.selectedRestData ? context.selectedRestData.restdata.logo_image : null,\n })\n\n useEffect(() => {\n setValues({\n // ...values,\n name: context.selectedRestData ? context.selectedRestData.restdata.name : null,\n business_name: context.selectedRestData ? context.selectedRestData.restdata.business_name : null,\n phone: context.selectedRestData ? context.selectedRestData.restdata.phone : null,\n cuisine: context.selectedRestData ? context.selectedRestData.restdata.cuisine : null,\n type: context.selectedRestData ? context.selectedRestData.restdata.type : null,\n about_us: context.selectedRestData ? context.selectedRestData.restdata.about_us : null,\n html_about_us: context.selectedRestData ? context.selectedRestData.restdata.html_about_us : null,\n facebook_url: context.selectedRestData ? context.selectedRestData.restdata.facebook_url : null,\n instagram_url: context.selectedRestData ? context.selectedRestData.restdata.instagram_url : null,\n restaurant_url: context.selectedRestData ? context.selectedRestData.restdata.restaurant_url : null,\n whatsapp_url: context.selectedRestData ? context.selectedRestData.restdata.whatsapp_url : null,\n address: context.selectedRestData ? context.selectedRestData.restdata.address : null,\n allowed_menu_types: context.selectedRestData ? context.selectedRestData.restdata.allowed_menu_types : [],\n qrCodeColor: context.selectedRestData ? context.selectedRestData.restdata.qrCodeColor : null,\n svgColor: context.selectedRestData ? context.selectedRestData.restdata.svgColor : null,\n highlightColor: context.selectedRestData ? context.selectedRestData.restdata.highlightColor : null,\n textColor: context.selectedRestData ? context.selectedRestData.restdata.textColor : null,\n svgTextColor: context.selectedRestData ? context.selectedRestData.restdata.svgTextColor : null,\n image: context.selectedRestData ? context.selectedRestData.restdata.image : null,\n logo_image: context.selectedRestData ? context.selectedRestData.restdata.logo_image : null,\n })\n\n }, [context.selectedRestData])\n\n let [goProfile, setGoProfile] = useState(false);\n // let [edit, setEdit] = useState(false);\n\n useEffect(() => {\n console.log('VALUES ----', context.selectedRestData);\n }, [values])\n\n let goNext = (newvalues) => {\n // console.log(newvalues);\n if (add || edit) {\n setValues({ ...values, ...newvalues });\n }\n if (step !== 3) {\n setStep(step + 1);\n }\n }\n\n let finalize = async (newvalues) => {\n try {\n let allvalues = { ...values, ...newvalues };\n console.log('FINISHED ----', allvalues);\n setValues(allvalues);\n let data;\n if (add) {\n data = await context.signupRestaurant(allvalues);\n toast(\"Signup Successful. Please login again\");\n setTimeout(() => {\n setGoProfile(true);\n }, 2000);\n } else if (edit) {\n data = await context.updateRestaurant(allvalues);\n onEdit();\n }\n return Promise.resolve(data);\n } catch (e) {\n return Promise.resolve(e);\n }\n }\n\n let goPrev = () => {\n setStep(step - 1);\n }\n\n if (goProfile) {\n return ();\n } else {\n return (\n \n {add ?

Restaurant Details

: null}\n {add || edit ? \n \n \n : null\n }\n {add || edit ?\n (step === 0 ?\n :\n step === 1 ?\n :\n step === 2 ?\n :\n step === 3 ?\n \n : null)\n :\n <>\n \n \n \n \n \n }\n
\n )\n }\n});\n\nexport default SignUpDetails;","import React from 'react'\nimport { toast } from \"react-toastify\";\nimport axios from \"axios\";\n\nexport default class EachOrderController {\n static closeModal(e) {\n e.preventDefault();\n this.setState({ showModal: false });\n }\n\n static closeCheckoutModal() {\n this.setState({ showCheckoutModal: false });\n }\n\n static openCheckoutModal() {\n if (this.state.showOrderModal) {\n this.setState({ showCheckoutModal: true, showOrderModal: false });\n } else {\n this.setState({ showCheckoutModal: true });\n }\n }\n\n static closeDispatchModal() {\n this.setState({ showDispatchModal: false });\n }\n\n static openDispatchModal() {\n if (this.state.showOrdModal) {\n this.setState({ showDispatchModal: true, showOrderModal: false });\n } else {\n this.setState({ showDispatchModal: true });\n }\n }\n\n static closeCancelDeliveryModal() {\n this.setState({ showCancelDeliveryModal: false });\n }\n\n static openCancelDeliveryModal() {\n if (this.state.showOrderModal) {\n this.setState({\n showCancelDeliveryModal: true,\n showOrderModal: false,\n });\n } else {\n this.setState({ showCancelDeliveryModal: true });\n }\n }\n\n static closeOrderModal() {\n this.setState({ showOrderModal: false });\n }\n\n static openOrderModal() {\n this.setState({ showOrderModal: true });\n }\n\n static onChange(e) {\n this.setState({ [e.target.name]: e.target.value });\n }\n\n static async changeTable() {\n //console.log(this.state.orderdata.order_id, this.state.orderdata.table_id.id, this.state.newTableID);\n await this.props.context.changeTableDetails(\n this.state.orderdata.order_id,\n this.state.orderdata.table_id.id,\n this.state.newTableID\n );\n this.setState({ newTableID: null });\n this.props.context.loadRestaurantDetails()\n }\n\n static handleTableSelect(selectedOption) {\n //console.log(selectedOption);\n //var options = selectedOptions.map(opt => opt.value);\n this.setState({ newTableID: selectedOption.value });\n }\n\n static createOrder() {\n var filtered = this.props.context.restdata.tables.filter(\n (x) => x.id === this.state.orderdata.table_id.id\n );\n var tabledata = filtered[0];\n this.props.saveOrder(this.state.orderdata, tabledata);\n this.setState({ goNewOrder: true });\n }\n\n static async getOrder() {\n await new Promise((resolve, reject) => {\n if (this.props.orderID) {\n let url =\n window.kumbaURL +\n '/mainorders/sorted/' +\n this.props.orderID;\n //console.log(this.props.orderID)\n //console.log(url)\n //console.log(this.props.context.io.socket)\n let header = { 'foodbots-header': this.props.token };\n axios({\n url,\n headers: header,\n method: 'GET',\n }).then((datum) => {\n let data = datum.data;\n //console.log(data);\n this.setState({\n orderdata: data,\n discount: data.discount,\n });\n if (data.table_id && this.props.updateTblName) {\n this.props.updateTblName(\n data.table_id.table_name,\n 'tables'\n );\n }\n if (data.delivery_slot && this.props.updateTblName) {\n this.props.updateTblName(\n ' (' +\n new Date(\n data.delivery_slot.start_time\n ).toLocaleString('en-IN') +\n '-' +\n new Date(\n data.delivery_slot.end_time\n ).toLocaleString('en-IN') +\n ')',\n 'slots'\n );\n }\n });\n //var data = response.data;\n\n this.props.context.io.socket.request(\n {\n url,\n headers: header,\n method: 'GET',\n },\n function (data, jwres) {\n console.log(data, jwres);\n if (jwres.error) {\n console.log(jwres.error);\n toast(\n 'Error fetching order #' + this.props.orderID\n );\n } else {\n console.log(data.table_id);\n this.setState({\n orderdata: data,\n discount: data.discount,\n });\n if (data.table_id && this.props.updateTblName) {\n this.props.updateTblName(\n data.table_id.table_name,\n 'tables'\n );\n }\n if (\n data.delivery_slot &&\n this.props.updateTblName\n ) {\n this.props.updateTblName(\n data.delivery_slot.name +\n ' (' +\n new Date(\n data.delivery_slot.start_time\n ).toLocaleString('en-IN') +\n '-' +\n new Date(\n data.delivery_slot.end_time\n ).toLocaleString('en-IN') +\n ')',\n 'slots'\n );\n }\n }\n }.bind(this)\n );\n return resolve();\n } else {\n this.setState({ orderdata: null, discount: 0.0 });\n resolve();\n }\n });\n }\n\n static async applyDiscount() {\n try {\n if (this.props.orderID) {\n let url = window.kumbaURL + '/mainorders/discount/';\n let header = { 'foodbots-header': this.props.token };\n var toastID = toast('Applying Discount', {\n autoClose: false,\n closeButton: false,\n });\n var response = await axios({\n url,\n headers: header,\n method: 'PUT',\n data: {\n order_id: this.props.orderID,\n discount: this.state.discount,\n },\n });\n var data = response.data;\n //console.log(data);\n toast.update(toastID, {\n render: 'Applied discount successsfully.',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n this.getOrder();\n }\n } catch (err) {\n //console.log(err);\n toast.update(toastID, {\n render: 'Something went wrong. Please try again.',\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true,\n });\n }\n }\n\n static async finalizeOrder(payment_mode) {\n var data = {};\n try {\n if (this.state.orderdata) {\n this.closeCheckoutModal();\n var toastID = toast(\n 'Checking out ' + window.tableTerm + ' .....',\n {\n autoClose: false,\n closeButton: false,\n }\n );\n let header = { 'foodbots-header': this.props.token };\n let url =\n window.kumbaURL + process.env.REACT_APP_CHECKOUT_ORDER_URI; // \"/razorpay/checkout/\"; \"/mainorders/pay\"\n if(payment_mode) {\n data = {\n order_id: this.props.orderID,\n payment_mode: payment_mode,\n credits_used: 0.0,\n };\n } else {\n data = {\n order_id: this.props.orderID,\n credits_used: 0.0,\n };\n }\n \n\n const response = await axios({\n url,\n method: 'PUT',\n headers: header,\n data: data,\n });\n\n toast.update(toastID, {\n render: 'Checked out successsfully.',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n //this.setState({redirect : true, dialogOpen : false});\n this.setState({ orderdata: null, order_id: null });\n return await this.props.loadRestaurantDetails();\n } else {\n return Promise.resolve();\n }\n } catch (error) {\n toast.update(toastID, {\n render: 'Something went wrong. Please try again.',\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true,\n });\n return new Promise((resolve, reject) => {\n return reject(error);\n });\n }\n }\n\n static async dispatchOrder(payment_mode) {\n var data = {};\n try {\n if (this.state.orderdata) {\n this.closeDispatchModal();\n var toastID = toast('Dispatching order .....', {\n autoClose: false,\n closeButton: false,\n });\n let header = { 'foodbots-header': this.props.token };\n let url = window.kumbaURL + '/delivery/create'; // \"/razorpay/checkout/\"; \"/mainorders/pay\"\n\n data = {\n order_id: this.props.orderID,\n payment_mode: payment_mode,\n };\n\n const response = await axios({\n url,\n method: 'POST',\n headers: header,\n data: data,\n });\n\n if (this.props.paymentUpdate) {\n await this.props.context.removePaymentUpdate(\n this.props.orderID\n );\n }\n\n toast.update(toastID, {\n render: 'Dispatched successsfully.',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n //this.setState({redirect : true, dialogOpen : false});\n this.setState({ orderdata: null, order_id: null });\n return await this.props.loadRestaurantDetails();\n }\n } catch (error) {\n toast.update(toastID, {\n render: 'Something went wrong. Please try again.',\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true,\n });\n return Promise.reject(error);\n }\n }\n\n static async cancelDeliveryOrder() {\n var data = {};\n try {\n if (this.state.orderdata) {\n this.closeCancelDeliveryModal();\n var toastID = toast('Canceling order .....', {\n autoClose: false,\n closeButton: false,\n });\n let header = { 'foodbots-header': this.props.token };\n let url =\n window.kumbaURL + '/delivery/cancel/' + this.props.orderID; // \"/razorpay/checkout/\"; \"/mainorders/pay\"\n\n // data = {\n // order_id: this.props.orderID,\n // payment_mode: payment_mode,\n // };\n\n const response = await axios({\n url,\n method: 'DELETE',\n headers: header,\n });\n\n if (this.props.paymentUpdate) {\n await this.props.context.removePaymentUpdate(\n this.props.orderID\n );\n }\n\n toast.update(toastID, {\n render: 'Canceled successsfully.',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n //this.setState({redirect : true, dialogOpen : false});\n this.setState({ orderdata: null, order_id: null });\n return await this.props.loadRestaurantDetails();\n }\n } catch (error) {\n toast.update(toastID, {\n render: 'Something went wrong. Please try again.',\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true,\n });\n return Promise.reject(error);\n }\n }\n\n static async markAcceptAll() {\n let header = { 'foodbots-header': this.props.token };\n var toastID = toast('Confirming order ...', {\n autoClose: false,\n closeButton: false,\n });\n try {\n var response = await axios({\n url: window.kumbaURL + '/orders/confirmed',\n headers: header,\n method: 'PUT',\n data: {\n orderID: this.props.orderID,\n },\n });\n var jsondata = response.data;\n // this.props.clearOTP();\n // await this.props.getActiveOrders();\n toast.update(toastID, {\n render: 'Confirmed order successfully',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n } catch (error) {\n this.setState({ error: error });\n toast.update(toastID, {\n render: 'Failed to confirm order',\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true,\n });\n // alert('Failed from waiting');\n }\n }\n\n static async markReject(id) {\n let header = { 'foodbots-header': this.props.token };\n var toastID = toast('Rejecting order ...', {\n autoClose: false,\n closeButton: false,\n });\n try {\n var response = await axios({\n url: window.kumbaURL + '/orders/markreject/' + id,\n headers: header,\n method: 'PUT',\n });\n var jsondata = response.data;\n // await this.props.getActiveOrders();\n toast.update(toastID, {\n render: 'Notified waiters.',\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true,\n });\n } catch (error) {\n this.setState({ error: error });\n toast.update(toastID, {\n render: 'Failed to notify waiters',\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true,\n });\n }\n }\n\n static async markReadyForPickup() {\n let header = { \"foodbots-header\": this.props.token };\n var toastID = toast(\"Updating ...\", { autoClose: false, closeButton: false });\n try {\n var response = await axios({\n url: window.kumbaURL + \"/orders/readyforpickup/\",\n headers: header,\n method: \"PUT\",\n data: {\n orderID: this.props.orderID,\n }\n });\n var jsondata = response.data;\n toast.update(toastID, {\n render: \"Updated.\",\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true\n });\n return Promise.resolve(jsondata);\n } catch (error) {\n this.setState({ error: error });\n toast.update(toastID, {\n render: \"Failed to update.\",\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true\n });\n return Promise.reject(error);\n }\n }\n\n static async markPrepareOrder() {\n let header = { \"foodbots-header\": this.props.token };\n var toastID = toast(\"Updating ...\", { autoClose: false, closeButton: false });\n try {\n var response = await axios({\n url: window.kumbaURL + \"/mainorders/acceptorder/\" + this.props.orderID,\n headers: header,\n method: \"PUT\",\n });\n var jsondata = response.data;\n // await this.props.getActiveOrders();\n toast.update(toastID, {\n render: \"Updated.\",\n type: toast.TYPE.SUCCESS,\n autoClose: 1000,\n closeButton: true\n });\n return Promise.resolve(jsondata);\n } catch (error) {\n this.setState({ error: error });\n toast.update(toastID, {\n render: \"Failed to update.\",\n type: toast.TYPE.ERROR,\n autoClose: 1000,\n closeButton: true\n });\n return Promise.reject(error);\n }\n }\n}\n","import React, { Fragment, useState } from \"react\";\nimport {\n Row,\n Col,\n Button,\n ButtonGroup,\n Modal,\n ListGroup,\n ListGroupItem,\n ListGroupItemHeading,\n ModalBody,\n ModalHeader,\n ModalFooter,\n Badge,\n} from \"reactstrap\";\nimport Select from \"react-select\";\nimport EachTableOrderRow from \"../../dashboardComponents/orders/EachTableOrderRow\";\nimport { Redirect } from \"react-router\";\nimport { FieldGroup } from \"../../helpers/FieldGroup\";\nimport AppLoading from \"../../components/AppLoading\";\n// import _Badge from \"../../components/_Badge\";\n//import Button from \"../../components/Button\";\n//import CheckMarkIcon from \"../../img/checkmark.png\";\n//import MultiplyIcon from \"../../img/multiply.png\";\n//import '../../dashboardComponents/OrderHistory/OrderHistory.css';\nimport { displayDate } from \"../../helpers/DateFunctions\";\nimport moment from \"moment\";\nimport { Marker } from \"react-google-maps\";\n\nconst EachOrderView = ({ parent, orderdata }) => {\n var orderRows = [];\n var subtotal = 0.0;\n var tax = 0.0;\n var cgst = 0.0;\n var sgst = 0.0;\n let vat = 0.0;\n var service_fee = 0.0;\n let kumba_fee = 0.0;\n var total = 0.0;\n let pay_total = 0.0;\n let delivery_charge = 0.0;\n\n var checkoutStatus = true;\n\n var hours = 0;\n var minutes = 0;\n var seconds = 0;\n var days = 0;\n\n let primaryColor = parent.props.context.primaryColor;\n let successColor = parent.props.context.successColor;\n let dangerColor = parent.props.context.dangerColor;\n\n let [showReadyForPickupModal, setPickupModal] = useState(false);\n let [modalType, setModalType] = useState(null);\n\n // let orderdata = orderdata;\n let order_from = parent.props.from;\n let formatteddate = null;\n\n let waiting_orders = [];\n\n if (orderdata && orderdata.orders && orderdata.orders.length > 0) {\n orderdata.orders\n .sort((a, b) => {\n return new Date(a.createdAt) - new Date(b.createdAt);\n })\n .forEach((order, index) => {\n if (\n order.status !== \"unconfirmed\" &&\n order.status !== \"rejected\" &&\n order.status !== \"cancelled\"\n ) {\n orderRows.push(\n \n );\n //subtotal += order.item_total * order.quantity;\n if (order.status === \"accepted\") {\n checkoutStatus = false;\n } else if (order.status === \"waiting\") {\n waiting_orders.push(order);\n }\n }\n });\n\n subtotal = orderdata.order_subtotal;\n\n kumba_fee = orderdata.kumbaAmount;\n tax = orderdata.tax_total;\n pay_total = orderdata.order_bill - orderdata.discount;\n delivery_charge = orderdata.delivery_charge || 0.0;\n total = orderdata.order_bill;\n\n var d1 = parent.state.now;\n var d2 = new Date(orderdata.createdAt);\n var time = (d1.getTime() - d2.getTime()) / 1000;\n\n var mintime = parseInt(time / 60);\n seconds = parseInt(time % 60);\n\n var hourtime = parseInt(mintime / 60);\n minutes = parseInt(mintime % 60);\n\n days = parseInt(hourtime / 24);\n hours = parseInt(hourtime % 24);\n\n var date = d2.toString();\n\n formatteddate = date.substring(0, date.indexOf(\" GMT\"));\n }\n\n // parent.props.context.paymentUpdates &&\n // parent.props.context.paymentUpdates[0].table_name;\n // console.log(parent.props.context && parent.props.context);\n // console.log(parent.props.context.restdata);\n\n // parent.props.context.restdata.menu_items.forEach((item, index) => {\n // console.log(item.name);\n\n // })\n //console.log(orderdata);\n\n if (parent.state.goNewOrder) {\n return ;\n } else if (orderdata && orderdata.order_id) {\n console.log({ index: parent.props.index });\n return (\n \n {\n parent.props.type === \"map\" ?\n orderdata.delivery_address ?\n : null :\n \n \n {orderdata.internal_order_num}\n \n \n {orderdata.payment_mode + (orderdata.payment_info ? \" (\" + orderdata.payment_info + \")\" : \"\")}\n \n \n {orderdata.customer_preferred_time ? (new Date(orderdata.customer_preferred_time)).toLocaleString(\"en-IN\", {weekday : \"short\", year : \"2-digit\", month : \"2-digit\", day : \"2-digit\", hour : \"2-digit\", minute : \"2-digit\", hour12 : true}) : \"\"}\n \n \n {window.rupeeSym + orderdata.order_bill.toFixed(2)}\n \n \n {orderdata.user ? orderdata.user.first_name + (orderdata.user.last_name ? \" \" + orderdata.user.last_name : \"\") : \"\"}\n \n \n {orderdata.user ? orderdata.user.phone : null}\n \n \n {orderdata.delivery_address ? orderdata.delivery_address.landmark + \", \" + orderdata.delivery_address.street + (orderdata.delivery_address.building ? \" \" + orderdata.delivery_address.building : \"\") + (orderdata.delivery_address.note ? \" \" + orderdata.delivery_address.note : \"\") : null}\n \n \n {/* {orderdata.delivery_address ? Link : null} */}\n {orderdata.delivery_address ? \"https://www.google.com/maps/search/?api=1&query=\" + orderdata.delivery_address.lat + \"%2C\" + orderdata.delivery_address.long : null}\n \n \n \n \n {orderdata.order_id}\n \n }\n\n\n\n \n \n \n \n \n \n \n
\n \n
\n
\n
\n \n \n \n
\n \n \n \n \n Qty\n \n \n {window.itemTerm}\n \n \n Price\n \n \n \n \n\n
\n {orderRows}\n
\n\n \n \n
Sub - Total:
\n \n\n \n {window.rupeeSym + (Math.round(subtotal * 100) / 100).toFixed(2)}\n \n
\n\n \n \n
{\"Tax\"}
\n \n\n \n {window.rupeeSym + (Math.round(tax * 100) / 100).toFixed(2)}\n \n
\n\n \n \n
Discount
\n \n \n \n {window.rupeeSym +\n Math.round(\n orderdata.discount\n ).toFixed(2)}\n \n
\n \n \n \n

Total

\n \n \n

{window.rupeeSym + (pay_total - delivery_charge).toFixed(2)}

\n \n
\n
\n \n \n
\n \n \n
\n

Contact:

\n
\n
\n {orderdata.allusers && orderdata.allusers.length>0 ? orderdata.allusers.map(x => \n

\n {x.first_name + \", \" + x.phone}\n

) : \"NA\"}\n
\n
\n \n \n \n
\n

Order Time:

\n
\n
\n

{formatteddate}

\n
\n \n
\n
\n \n
\n

Order ID:

\n
\n
\n

{`#${orderdata.order_id}`}

\n
\n
\n \n
\n

Payment Mode:

\n
\n
\n

{orderdata.payment_mode}

\n
\n
\n {orderdata.order_type === \"delivery\" ? \n \n
\n

Delivery Address:

\n
\n
\n

{orderdata.delivery_address ? orderdata.delivery_address.apt ? orderdata.delivery_address.apt + \",\" + orderdata.delivery_address.street : orderdata.delivery_address.street : \"Not Available\"}

\n
\n
: null\n }\n
\n
\n \n
\n
\n \n {parent.props.paymentUpdate || (!parent.props.paymentUpdate && orderdata.order_status !== \"finished\") || order_from === \"orderhistory\" ? \n
\n
\n \n
\n {order_from === \"orderhistory\" ? null : orderdata && orderdata.order_type === \"delivery\" ?\n orderdata.handle_delivery ? \n (\n orderdata.order_status === \"accepted\"\n ? (\n
\n \n
) : (orderdata.order_status === \"delivery-created\" ||\n orderdata.order_status === \"delivery-accepted\" ?\n
\n \n
: null)\n ) : (\n
\n \n
\n ) : \n orderdata.order_type === \"takeaway\" ? (\n orderdata.order_status === \"received\" ? \n
\n \n
\n : \n orderdata.order_status === \"accepted\" ? \n
\n \n
\n : orderdata.order_status === \"ready-for-pickup\" ? \n
\n \n
\n : null\n ) :\n
\n \n
\n }\n
: null\n }\n
\n
\n\n \n \n

{\"Checkout\"}

\n
\n \n {checkoutStatus ? (\n

\n {\n \"NOTE : There are pending orders that haven't been served to the customer yet.\"\n }\n

\n ) : null}\n

\n {\"Do you want to checkout the order #\" +\n parent.props.orderID +\n \" ?\"}\n

\n {orderdata.razorpay_payment_id ? \n parent.finalizeOrder(null)}\n >\n Yes\n : \n
\n parent.finalizeOrder(\"cash\")}\n >\n Paid by Cash\n \n parent.finalizeOrder(\"card\")}\n >\n Paid by Card\n \n parent.finalizeOrder(\"offline\")}\n >\n Paid by Other\n \n
\n }\n
\n \n Close\n \n
\n \n\n \n \n

{\"Dispatch\"}

\n
\n \n

\n {\"Do you want to dispatch the order #\" +\n parent.props.orderID +\n \" for delivery ?\"}\n

\n {orderdata.payment_id ? (\n parent.dispatchOrder(\"kumba\")}\n >\n Yes\n \n ) : (\n \n parent.dispatchOrder(\"cash\")}\n >\n Paid by Cash\n \n parent.dispatchOrder(\"card\")}\n >\n Paid by Card\n \n parent.dispatchOrder(\"offline\")}\n >\n Paid by Other\n \n \n )}\n \n Close\n \n
\n \n\n \n \n

{\"Cancel Delivery\"}

\n
\n \n

\n {\"Do you want to cancel the delivery for order #\" +\n parent.props.orderID +\n \" ? \"}\n

\n parent.cancelDeliveryOrder()}\n >\n Yes\n \n \n No\n \n
\n \n\n \n \n

{modalType ? modalType.toUpperCase() : \"\"}

\n
\n \n

\n {\"Do you want to update for order #\" +\n parent.props.orderID +\n \" ? \"}\n

\n {\n if (modalType) {\n if (modalType === \"prepare order\") {\n parent.markPrepareOrder();\n } else if (modalType === \"ready for pickup\") {\n parent.markReadyForPickup();\n }\n }\n setPickupModal(false);\n setModalType(null);\n }}\n >\n Yes\n \n {\n setPickupModal(false);\n setModalType(null);\n }}\n >\n No\n \n
\n \n\n \n \n x.value === parent.state.newTableID)\n .pop()}\n onChange={parent.handleTableSelect.bind(parent)}\n options={parent.tableOptions}\n placeholder=\"Select New Table : \"\n />\n \n Change Table\n \n {\n parent.setState({ showTableChangeModal: false });\n }}\n >\n Cancel\n \n \n \n
\n );\n } else {\n return ;\n }\n};\n\nexport default EachOrderView;\n","// file: Registration.jsx\n\nimport React, { Component } from 'react';\nimport { AppContext, withTheme } from '../../contexts/AppContext';\nimport io from '../../socket-client';\nimport EachOrderController from '../../controllers/ordersControllers/EachOrderController';\nimport EachOrderView from '../../views/orders/EachOrderView';\n// import Axios from 'axios';\n\nclass EachOrder extends Component {\n constructor(props) {\n super(props);\n this.timer = null;\n this.tableOptions =\n this.props.context &&\n this.props.context.restdata &&\n this.props.context.restdata.tables &&\n this.props.context.restdata.tables.map((eachtable) => {\n let tabOption = {\n label: eachtable.table_name,\n value: eachtable.id,\n };\n return tabOption;\n });\n\n this.state = {\n edit: false,\n orderdata: null,\n showModal: false,\n showImgModal: false,\n showCheckoutModal: false,\n showDispatchModal: false,\n showCancelDeliveryModal: false,\n showOrderModal: false,\n showPinModal: false,\n checkoutStatus: false,\n goNewOrder: false,\n\n img: null,\n io,\n server: null,\n pin: null,\n mode: 'assign',\n\n newTableID: null,\n showTableChangeModal: false,\n\n discount: 0.0,\n\n now: new Date(),\n };\n\n // this.props.context.io.socket.on(\n // 'orderupdate',\n // function (data) {\n // if (data === this.props.orderID) {\n // this.getOrder();\n // }\n // }.bind(this)\n // );\n\n this.props.context.io.socket.on(\n 'ordercheckout',\n function (data) {\n if (data === this.props.orderID) {\n this.props.loadRestaurantDetails();\n this.setState({ orderdata: null });\n }\n }.bind(this)\n );\n\n this.props.context.io.socket.on(\n 'orderconfirm',\n function (data) {\n if (data === this.props.orderID) {\n this.getOrder();\n }\n }.bind(this)\n );\n\n // defined in EachOrderController.js\n this.closeModal = EachOrderController.closeModal.bind(this);\n this.closeCheckoutModal = EachOrderController.closeCheckoutModal.bind(\n this\n );\n this.openCheckoutModal = EachOrderController.openCheckoutModal.bind(\n this\n );\n this.closeDispatchModal = EachOrderController.closeDispatchModal.bind(\n this\n );\n this.openDispatchModal = EachOrderController.openDispatchModal.bind(\n this\n );\n this.closeCancelDeliveryModal = EachOrderController.closeCancelDeliveryModal.bind(\n this\n );\n this.openCancelDeliveryModal = EachOrderController.openCancelDeliveryModal.bind(\n this\n );\n this.closeOrderModal = EachOrderController.closeOrderModal.bind(this);\n this.openOrderModal = EachOrderController.openOrderModal.bind(this);\n this.onChange = EachOrderController.onChange.bind(this);\n this.changeTable = EachOrderController.changeTable.bind(this);\n this.handleTableSelect = EachOrderController.handleTableSelect.bind(\n this\n );\n this.createOrder = EachOrderController.createOrder.bind(this);\n this.getOrder = EachOrderController.getOrder.bind(this);\n this.applyDiscount = EachOrderController.applyDiscount.bind(this);\n this.finalizeOrder = EachOrderController.finalizeOrder.bind(this);\n this.dispatchOrder = EachOrderController.dispatchOrder.bind(this);\n this.cancelDeliveryOrder = EachOrderController.cancelDeliveryOrder.bind(\n this\n );\n this.markReject = EachOrderController.markReject.bind(this);\n this.markAcceptAll = EachOrderController.markAcceptAll.bind(this);\n this.markReadyForPickup = EachOrderController.markReadyForPickup.bind(this);\n this.markPrepareOrder = EachOrderController.markPrepareOrder.bind(this);\n }\n\n // componentDidUpdate(prevProps) {\n // if (prevProps.refresh !== this.props.refresh) {\n // this.getOrder();\n // }\n // }\n\n componentDidMount() {\n this.getOrder();\n // Axios(window.kumbaURL).then((fooddata) => {\n // let alldata = fooddata;\n // console.log(alldata)\n // });\n\n // this.timer = setInterval(() => {\n // this.setState({ now: new Date() });\n // }, 1000);\n }\n\n render() {\n if (\n\t\t\t\t\tthis.state.orderdata &&\n\t\t\t\t\t(!this.props.search ||\n\t\t\t\t\t\tthis.props.search === '' ||\n\t\t\t\t\t\t(this.props.search &&\n\t\t\t\t\t\t\t(this.state.orderdata.user.user_id.includes(\n\t\t\t\t\t\t\t\tthis.props.search.toLowerCase()\n\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t\tthis.state.orderdata.user.first_name.toLowerCase().includes(\n\t\t\t\t\t\t\t\t\tthis.props.search.toLowerCase()\n\t\t\t\t\t\t\t\t))))\n\t\t\t\t) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t} else {\n\t\t\t\t\treturn null\n\t\t\t\t}\n }\n}\n\nvar AppEachOrder = withTheme(EachOrder);\nexport default AppEachOrder;\n","const displayDate = (date) => {\n // console.log(date);\n let dateObj = new Date(date);\n let month = dateObj.getMonth() + 1;\n let day = dateObj.getDate();\n //let time = dateObj.getTime();\n\n var hours = dateObj.getHours();\n var min = dateObj.getMinutes();\n var sec = dateObj.getSeconds();\n\n // console.log(hours, min, dateObj.toLocaleDateString())\n\n let hour = hours > 12 ? hours - 12 : hours;\n let ampm = hours >= 12 ? 'pm' : 'am';\n\n month = (month < 10 ? '0' : '') + month;\n day = (day < 10 ? '0' : '') + day;\n hour = (hour < 10 ? '0' : '') + hour;\n min = (min < 10 ? '0' : '') + min;\n sec = (sec < 10 ? '0' : '') + sec;\n\n let time = hour + ':' + min + ampm;\n\n return day + '/' + month + ' ' + time;\n};\n\nmodule.exports = {\n displayDate : displayDate\n};\n","import React, { Component, useState } from 'react';\nimport { Input, FormGroup, InputGroup, InputGroupAddon, Label, FormFeedback } from 'reactstrap';\n\nexport const FieldGroup = function ({ id, label, help, color, ig, valid, invalid, style, styleInput, required, ...props }) {\n\tvar validationState = valid || true\n\treturn (\n\t\t\n\t\t\t\n\t\t\t{ig ?\n\t\t\t\t\n\t\t\t\t\t{ig}\n\t\t\t\t\t\n\t\t\t\t : \n\t\t\t}\n\t\t\t{help && {help}}\n\n\t\t\n\t);\n}","\nimport React, { Suspense, useState } from 'react';\nimport { Button, ListGroupItem } from 'reactstrap';\nimport { withTheme } from '../../contexts/AppContext';\nimport axios from 'axios';\nimport { useEffect } from 'react';\n// const EachOrder_orders = React.lazy(() => import('../../dashboardComponents/orders/EachOrder'));\nimport useInterval from '../../helpers/useInterval';\n\n\nconst NotificationsView = withTheme(({ context, setNotifCount }) => {\n\n const [notifiedOrders, setNotifiedOrders] = useState({});\n\n const getDineInPendingOrders = async () => {\n\t\ttry {\n\t\t\tif (context.restdata) {\n let restIDs = context.subrestaurants && context.subrestaurants.length > 0 ? context.subrestaurants.map(eachrest => eachrest.restdata.restaurant_id) : [];\n restIDs.push(context.restdata.restaurant_id);\n\t\t\t\tlet url =\n\t\t\t\t\twindow.kumbaURL +\n\t\t\t\t\t// '/mainorders/restpending/' +\n\t\t\t\t\t'/mainorders/assistance';\n\t\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\t\tlet response = await axios({\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\turl,\n\t\t\t\t\theaders: header,\n data : {\n rest_ids : restIDs\n }\n\t\t\t\t});\n\n\t\t\t\tlet pendingOrdersTable = response.data;\n let pendingOrders = Array.prototype.concat.apply(\n\t\t\t\t\t[],\n\t\t\t\t\tObject.values(pendingOrdersTable)\n\t\t\t\t)\n console.log({pendingOrdersTable})\n\t\t\t\tsetNotifiedOrders(pendingOrdersTable);\n setNotifCount(pendingOrders.length);\n\t\t\t\treturn Promise.resolve(pendingOrdersTable);\n\t\t\t} else {\n\t\t\t\treturn Promise.resolve(null)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn Promise.reject(e)\n\t\t}\n\t}\n\n useEffect(() => {\n getDineInPendingOrders();\n }, []);\n\n useInterval(() => {\n getDineInPendingOrders();\n }, 15000);\n\n let rests = [context.restdata].concat(context.subrestaurants && context.subrestaurants.length > 0 ? context.subrestaurants.map(eachsub => eachsub.restdata) : [])\n let notificationList = Object.keys(notifiedOrders) && Object.keys(notifiedOrders).length > 0 ? Object.keys(notifiedOrders).map(eachrest => {\n let rest_info = rests.filter(x => x.restaurant_id === eachrest).pop();\n return(\n <>\n

{rest_info.name}

\n {notifiedOrders[eachrest].map(eachorder => eachorder.order_status === \"bill_required\" ?\n \n

{\"Bill requested on table : \" + eachorder.table_name}

\n
: null\n )}\n \n )\n }) :

No Notifications

\n\n return(\n
\n {notificationList}\n
\n )\n});\n\nexport default NotificationsView;","import React from \"react\";\nimport styled from \"styled-components\";\nimport { user } from \"react-icons-kit/icomoon/user\";\nimport { Icon } from \"react-icons-kit\";\nimport { withTheme } from \"../../contexts/AppContext\";\n\nconst Wrapper = styled.article`\n background-color: white;\n padding: 10px;\n h4,\n h5 {\n margin: 0px;\n margin-top: 0px !important;\n }\n`;\n\nexport default withTheme(({ context, staff }) => {\n return (\n \n context.setContextState({\n selectedStaff: staff,\n })\n }\n >\n \n
\n

{staff.name}

\n
{staff.email}
\n
\n \n );\n});\n","import React, { useEffect, useState } from \"react\";\nimport {\n Button,\n Collapse,\n Form,\n FormGroup,\n Input,\n Label,\n Modal,\n ModalBody,\n ModalHeader,\n} from \"reactstrap\";\nimport EachPopupServer from \"./EachPopupServer\";\nimport { sortDown } from \"react-icons-kit/fa/sortDown\";\nimport { lock } from \"react-icons-kit/fa/lock\";\nimport { Icon } from \"react-icons-kit\";\nimport styled from \"styled-components\";\nimport { withTheme } from \"../../contexts/AppContext\";\nimport Select from 'react-select';\n\nconst Wrapper = styled.div`\n height: 100vh;\n z-index: 100;\n`;\n\nconst ServersListPopup = ({ context }) => {\n const [dropDown, setDropDown] = useState(true);\n const [accessCode, setAccessCode] = useState(null);\n const [error, setError] = useState(false);\n const [step, setStep] = useState(1);\n\n let [servers, setServers] = useState([]);\n\n const getRestaurants = () => {\n let rests = [];\n let subrests = [];\n if(context.subrestdata && context.subrestdata.length > 0) {\n subrests = context.subrestdata.filter(x => x.restdata && x.restdata.servers && x.restdata.servers.length > 0).map(x => x.restdata);\n }\n if(context.restdata && context.restdata.servers && context.restdata.servers.length > 0) {\n rests = [context.restdata];\n }\n rests = [...rests, ...subrests];\n return rests;\n }\n\n const showRestaurants = () => {\n setRestaurants(getRestaurants());\n }\n\n let [restaurants, setRestaurants] = useState(getRestaurants());\n\n// showRestaurants();\n\n useEffect(() => {\n showRestaurants();\n }, [context.restdata, context.subrestdata]);\n\n// useEffect(() => {\n// showRestaurants();\n// }, []);\n\n// useEffect(() => {\n// let rests = [];\n// if(context.subrestdata && context.subrestdata.length > 0) {\n// rests.concat(context.subrestdata.map(x => x.restdata && x.restdata.servers && x.restdata.servers.length > 0 ? x.restdata : null));\n// }\n// if(context.restdata && context.restdata.servers && context.restdata.servers.length > 0) {\n// rests.concat([context.restdata]);\n// }\n// setRestaurants(rests);\n// }, []);\n\n const handleSubmit = (e) => {\n e.preventDefault();\n if (accessCode === context.selectedStaff.access_code) {\n context.setContextState({\n staff_is_authorized: true,\n });\n setStep(1);\n } else {\n setError(\"Invalid Access Code\");\n setTimeout(() => {\n setError(false);\n }, 4000);\n }\n };\n\n useEffect(() => {\n if (accessCode && accessCode.length > 4) {\n setError(\"Access Code Should Be 4 Digits\");\n } else {\n setError(false);\n }\n }, [accessCode]);\n\n useEffect(() => {\n if(context.selectedRestData) {\n setServers(context.selectedRestData.restdata.servers);\n }\n }, [context.selectedRestData]);\n\n\n if (context && context.selectedRestData && !context.staff_is_authorized && context.selectedRestData.restdata.show_lock_screen) {\n if (!context.selectedStaff) {\n \n return (\n \n \n
\n

Identify Yourself

\n
\n \n\n {step === 1 ? \n
\n \n {\n \n restaurants.map(val => (\n \n {\n context.selectRestaurant(val.restaurant_id);\n setStep(2);\n }}\n className={`card p-2 col-md-2 m-2 text-center pt-3 border-info`}\n >\n
{val.name}
\n
\n )\n \n )\n }\n \n {/* ({ value: val.restdata.restaurant_id, label: val.restdata.name }))) : context.restdata ? [{value: context.restdata.restaurant_id, label: context.restdata.name}] : []}\n placeholder=\"Select Restaurant\"\n onChange={e => {\n context.selectRestaurant(e.value);\n setStep(2);\n }}\n /> */}\n \n : null}\n {step === 2 ?\n Object.keys(window.server_roles).filter(x => [\"captain\", \"manager\", \"chef\", \"bartender\", \"supervisor\"]).map((val) => {\n return (\n <>\n {servers.filter(\n (x) => x.server_role === val\n ).length > 0 ? (\n <>\n setDropDown(!dropDown)}\n >\n

\n {val.toUpperCase()}S\n

\n \n \n
\n {servers.sort((a,b) => a.name > b.name ? 1 : -1)\n .filter((x) => x.server_role === val)\n .map((val, i) => {\n return ;\n })}\n
\n \n ) : null}\n \n );\n }) : null\n }\n
\n
\n
\n
\n );\n }\n if (context && context.selectedStaff) {\n return (\n \n \n \n \n
\n \n \n\n {\n setAccessCode(`${e.target.value}`);\n }}\n style={{\n fontSize: \"30px\",\n fontWeight: 800,\n borderColor: error ? \"red\" : \"gray\",\n color: error ? \"#ff8099\" : \"gray\",\n height: \"2em\",\n }}\n />\n \n \n {\n setStep(1);\n context.setContextState({\n selectedStaff: null,\n staff_is_authorized: false,\n });\n \n }}\n >\n Go Back\n \n {error ? (\n
\n {error}\n
\n ) : null}\n \n
\n
\n
\n );\n }\n } else {\n return null;\n }\n};\n\nexport default withTheme(ServersListPopup);\n","import React, { useEffect, useState } from \"react\";\n\nimport { Icon } from \"react-icons-kit\";\nimport { ic_menu } from \"react-icons-kit/md/ic_menu\";\nimport { withTheme } from \"../../contexts/AppContext\";\nimport { ic_notifications } from \"react-icons-kit/md/ic_notifications\";\nimport { ic_lock } from \"react-icons-kit/md/ic_lock\";\nimport $ from \"jquery\";\nimport { Button, Modal, ModalBody } from \"reactstrap\";\nimport Notifications from \"../../views/notifications/Notifications\";\nimport { ic_keyboard_backspace } from \"react-icons-kit/md/ic_keyboard_backspace\";\nimport { ic_store } from \"react-icons-kit/md/ic_store\";\nimport { toast } from \"react-toastify\";\nimport ServersListPopup from '../../components/PermissionsPopup/ServersListPopup';\n\n\n\nexport default withTheme(({ pageName, context, stickyComponent, back }) => {\n const [notification, setNotification] = useState(false);\n const [notifCount, setNotifCount] = useState(null);\n\n const subRestData = context.restdata\n ? context.restdata.sub_restaurants\n : null;\n const [state, setState] = useState({\n subRest: false,\n });\n\n // if(process.env.NODE_ENV === \"production\"){\n // document.addEventListener(\"visibilitychange\", () => {\n // if (context.selectedStaff && context.staff_is_authorized) {\n // context.setContextState({\n // selectedStaff: null,\n // staff_is_authorized: false,\n // });\n // }\n // });\n // }\n\n useEffect(() => {\n if (context.sideNav) {\n $(\"#sticky\").slideUp(100);\n } else {\n $(\"#sticky\").slideDown(100);\n }\n }, [context.sideNav]);\n\n return (\n \n \n\n \n \n \n
\n

Switch Restaurant

\n \n setState({\n ...state,\n subRest: false,\n })\n }\n color=\"danger\"\n >\n Close\n \n
\n {subRestData && subRestData.length === 0 ? (\n
No Sub Restaurant
\n ) : null}\n {context.mainrestdata ? (\n {\n setState({ ...state, subRest: false });\n context.selectRestaurant(\n context.mainrestdata.restdata.restaurant_id\n );\n toast.success(\n \"Switched to \" + context.mainrestdata.restdata.name\n );\n }}\n className={`rounded p-4 ${\n context.selectedRestID ===\n context.mainrestdata.restdata.restaurant_id\n ? \"border-warning\"\n : \"\"\n } mb-3 text-center bg-default `}\n style={{\n backgroundImage: `url(${context.mainrestdata.restdata.image})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"10px\",\n border: \"4px solid\",\n }}\n >\n

\n {context.mainrestdata.restdata.name}\n

\n \n ) : null}\n {subRestData\n ? subRestData.map((val, i) => {\n return (\n {\n setState({ ...state, subRest: false });\n context.selectRestaurant(val.restaurant_id);\n toast.success(\"Switched to \" + val.name);\n }}\n key={i}\n className={`${\n context.selectedRestID === val.restaurant_id\n ? \"border-warning\"\n : \"\"\n } rounded p-4 mb-3 text-center bg-default `}\n style={{\n backgroundImage: `url(${val.image})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"10px\",\n border: \"4px solid\",\n }}\n >\n

\n {val.name}\n

\n \n );\n })\n : null}\n
\n
\n
\n {back ? (\n \n ) : (\n {\n context.setContextState({\n sideNav: !context.sideNav,\n });\n }}\n />\n )}\n\n
{pageName}
\n
\n {\n context && context.restdata && context.restdata.show_lock_screen ? \n context.setContextState({\n selectedStaff: null,\n staff_is_authorized: false,\n })\n }\n />:null\n }\n
\n {subRestData && subRestData.length === 0 ? null : (\n \n setState({\n ...state,\n subRest: true,\n })\n }\n />\n )}\n setNotification(!notification)}\n >\n \n \n {notifCount || 0}\n \n \n {notification ? (\n \n
\n {/* setNotification(!notification)} /> */}\n setNotification(!notification)}\n >\n Close\n \n
\n
\n\n \n
\n ) : null}\n \n \n {stickyComponent ? (\n
\n {stickyComponent}\n
\n ) : null}\n \n );\n});\n","import React from 'react'\nimport { NavItem } from 'reactstrap'\nimport { Link } from 'react-router-dom'\nimport { Icon } from 'react-icons-kit'\nimport { withTheme } from '../../contexts/AppContext'\n\nexport default withTheme(({\n to,\n title,\n icon,\n context\n}) => {\n return (\n {\n context.setContextState({\n sideNav: !context.sideNav\n })\n }}>\n \n \n \n \n

{title}

\n \n
\n )\n})\n","import React from \"react\";\nimport { NavLink as NavLinkRRD, Link } from \"react-router-dom\";\n// nodejs library to set properties for components\n\n// reactstrap components\nimport {\n UncontrolledDropdown,\n DropdownToggle,\n Media,\n Navbar,\n Nav,\n} from \"reactstrap\";\nimport EachNav from \"./EachNav\";\nimport { user } from \"react-icons-kit/icomoon/user\";\nimport { ic_restaurant } from \"react-icons-kit/md/ic_restaurant\";\nimport { ic_event_seat } from \"react-icons-kit/md/ic_event_seat\";\nimport { ic_local_offer } from \"react-icons-kit/md/ic_local_offer\";\nimport { withTheme } from \"../../contexts/AppContext\";\nimport { ic_date_range } from \"react-icons-kit/md/ic_date_range\";\nimport { ic_settings_power } from \"react-icons-kit/md/ic_settings_power\";\nimport { calendar } from \"react-icons-kit/icomoon/calendar\";\nimport { ic_list } from \"react-icons-kit/md/ic_list\";\nimport { ic_people } from \"react-icons-kit/md/ic_people\";\nimport { ic_access_time } from \"react-icons-kit/md/ic_access_time\";\nimport { history } from \"react-icons-kit/icomoon/history\";\nimport { ic_add_shopping_cart } from \"react-icons-kit/md/ic_add_shopping_cart\";\nimport { creditCard } from \"react-icons-kit/icomoon/creditCard\";\nimport { megaphone, chat } from 'react-icons-kit/entypo'\n\nclass Sidebar extends React.PureComponent {\n state = {\n hideLinks: false,\n };\n\n componentDidUpdate(prevProps, prevState) {\n if (\n !this.props.context.selectedStaff ||\n (this.props.context.selectedStaff &&\n window.server_roles[this.props.context.selectedStaff.server_role] >= 6)\n ) {\n this.setState({ hideLinks: false });\n } else {\n this.setState({ hideLinks: true });\n }\n }\n\n render() {\n const { logo, context } = this.props;\n const { selectedRestData } = context;\n // const { type } = selectedRestData.restdata || null;\n // const isHomeChef = type === 'homechef';\n // console.log('SIDE_NAV ', context.selectedRestData.restdata)\n let navbarBrandProps;\n if (logo && logo.innerLink) {\n navbarBrandProps = {\n to: logo.innerLink,\n tag: Link,\n };\n } else if (logo && logo.outterLink) {\n navbarBrandProps = {\n href: logo.outterLink,\n target: \"_blank\",\n };\n }\n if (context.sideNav) {\n return (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t{/* Collapse */}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{/* Collapse header */}\n\t\t\t\t\t\t\t{/*
\n \n {logo ? (\n \n {logo.innerLink ? (\n \n {logo.imgAlt}\n \n ) : (\n \n {logo.imgAlt}\n \n )}\n \n ) : null}\n \n \n \n \n \n \n \n
*/}\n\t\t\t\t\t\t\t{/* */}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{/*
Documentation
*/}\n\t\t\t\t\t\t\t{selectedRestData ? (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{this.state.hideLinks ? null : (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{/* {selectedRestData.restdata.type !== 'homechef' ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t) : null} */}\n\n\t\t\t\t\t\t\t\t\t\t\t{selectedRestData.restdata.type !== 'homechef' ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t{selectedRestData.restdata.type === 'homechef' ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t{!this.props.context.selectedStaff ||\n\t\t\t\t\t\t\t\t\t(this.props.context.selectedStaff &&\n\t\t\t\t\t\t\t\t\t\t!(\n\t\t\t\t\t\t\t\t\t\t\tthis.props.context.selectedStaff.server_role === 'chef' ||\n\t\t\t\t\t\t\t\t\t\t\tthis.props.context.selectedStaff.server_role ===\n\t\t\t\t\t\t\t\t\t\t\t\t'bartender'\n\t\t\t\t\t\t\t\t\t\t)) ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : null}\n\n\t\t\t\t\t\t\t\t\t{selectedRestData.restdata.type !== 'homechef' &&\n\t\t\t\t\t\t\t\t\t(!this.props.context.selectedStaff ||\n\t\t\t\t\t\t\t\t\t\t(this.props.context.selectedStaff &&\n\t\t\t\t\t\t\t\t\t\t\t(this.props.context.selectedStaff.server_role ===\n\t\t\t\t\t\t\t\t\t\t\t\t'chef' ||\n\t\t\t\t\t\t\t\t\t\t\t\tthis.props.context.selectedStaff.server_role ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t'bartender' ||\n\t\t\t\t\t\t\t\t\t\t\t\twindow.server_roles[\n\t\t\t\t\t\t\t\t\t\t\t\t\tthis.props.context.selectedStaff.server_role\n\t\t\t\t\t\t\t\t\t\t\t\t] >= 5))) ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : null}\n\n\t\t\t\t\t\t\t\t\t{selectedRestData.restdata.loyalty ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : null}\n\n\t\t\t\t\t\t\t\t\t{!this.props.context.selectedStaff ||\n\t\t\t\t\t\t\t\t\t(this.props.context.selectedStaff &&\n\t\t\t\t\t\t\t\t\t\t!(\n\t\t\t\t\t\t\t\t\t\t\tthis.props.context.selectedStaff.server_role === 'chef' ||\n\t\t\t\t\t\t\t\t\t\t\tthis.props.context.selectedStaff.server_role ===\n\t\t\t\t\t\t\t\t\t\t\t\t'bartender'\n\t\t\t\t\t\t\t\t\t\t)) ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{/* */}\n\t\t\t\t\t\t\t\t\t{/* {selectedRestData.restdata.type !== 'homechef' ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t{selectedRestData.restdata.type !== 'homechef' ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : null} */}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t)\n } else {\n return null;\n }\n }\n}\n\nexport default withTheme(Sidebar);\n","import React from 'react'\nimport Header from '../Header/Header';\nimport Sidenav from '../SideNav/SideNav'\n\nexport default React.memo(function Layout({\n children,\n pageName,\n stickyComponent,\n back,\n fixed\n}) {\n return (\n <>\n \n \n {/*
*/}\n
\n {children}\n
\n \n )\n});\n","export default {\n restTypes: [\n { value: \"restaurant\", label: \"Food Only\" },\n { value: \"drinksprovider\", label: \"Drinks Only\" },\n { value: \"foodndrinksprovider\", label: \"Food & Drink\" },\n { value: \"hotel\", label: \"Hotel\" },\n { value: \"serviceprovider\", label: \"Services\" },\n { value: \"homechef\", label: \"Home Chef\" },\n { value: \"itemprovider\", label: \"Items\" }\n ],\n menuTypes : [\n {value : \"dine-in\", label : \"Walk-in\"},\n {value : \"takeaway\", label : \"Takeaway\"},\n {value : \"delivery\", label : \"Delivery\"}\n ],\n imagePlaceholder: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTGcXaN1eANzJpV2p02f3Up6BqJ8I46Zc4BonvdyCvldGnrDLoAZ3E9lHH7ZGFr_-0F0LQ&usqp=CAU'\n}","import sailsIOClient from 'sails.io.js';\n//var sailsIOClient = require('sails.io.js');\nimport socketIOClient from 'socket.io-client';\n\n//var io = sailsIOClient.sails.connect('https://api.foodbots.co');\n\nvar io = sailsIOClient(socketIOClient);\n\nio.sails.url = process.env.REACT_APP_BACKEND_URL;\n//io.sails.url\"https://api.foodbots.net\" = 'http://localhost:1447';\n\nexport default io;","export default __webpack_public_path__ + \"static/media/team-1-800x800.fa5a7ac2.jpg\";","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport default function register() {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\n //console.log(publicUrl);\n //console.log(window.location);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n return;\n }\n\n \n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Lets check if a service worker still exists or not.\n //console.log(\"CHeck for localhost\");\n checkValidServiceWorker(swUrl);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\n );\n });\n } else {\n // Is not local host. Just register service worker\n //console.log(\"Registering direcly\");\n registerValidSW(swUrl);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n //console.log('New content is available; please refresh.');\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n //console.log('Content is cached for offline use.');\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type').indexOf('javascript') === -1\n ) {\n //console.log(\"CHecking Valid SW for unregistering\");\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n //console.log(\"Check Invalid so registering\");\n registerValidSW(swUrl);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import axios from 'axios'\nimport React, { useCallback, useEffect } from 'react'\nimport { useState } from 'react'\nimport { Spinner } from 'react-activity'\nimport {\n\tCol,\n\tListGroup,\n\tListGroupItem,\n\tModal,\n\tModalBody,\n\tModalHeader,\n\tRow,\n} from 'reactstrap'\nimport { withTheme } from '../../contexts/AppContext'\n\nconst managerAccessLevel = window?.server_roles?.supervisor\n\nfunction OrderHistoryDetails({ data, onClose, context }) {\n\tconst [loading, setLoading] = useState(true)\n\tconst [orderData, setOrderData] = useState(null)\n\tconst [userInfo, setUserInfo] = useState(null)\n\n\n\tconst getUserInfo = useCallback(async () => {\n\t\ttry {\n\t\t\tlet url =\n\t\t\t\twindow.kumbaURL +\n\t\t\t\t'/mainorders/getuserorders/' +\n\t\t\t\torderData?.user?.user_id +\n\t\t\t\t'/' +\n\t\t\t\tcontext.restID\n\t\t\tlet res = await axios({\n\t\t\t\turl: url,\n\t\t\t\theaders: { 'foodbots-header': context.token },\n\t\t\t})\n\t\t\t// console.log('USER DATA --', res.data)\n\t\t\tsetLoading(false)\n\t\t\tsetUserInfo(res.data)\n\t\t\treturn Promise.resolve(res.data)\n\t\t} catch (error) {\n\t\t\tsetLoading(false)\n\t\t\treturn Promise.reject(error)\n\t\t}\n\t}, [context.restID, context.token, orderData?.user?.user_id])\n\n\tconst getOrderData = useCallback(async () => {\n\t\ttry {\n\t\t\tlet url = window.kumbaURL + '/mainorders/sorted/' + data?.order_id\n\t\t\tlet header = { 'foodbots-header': context?.token }\n\n\t\t\tlet response = await axios({\n\t\t\t\turl: url,\n\t\t\t\theaders: header,\n\t\t\t\tmethod: 'GET',\n\t\t\t})\n\t\t\tsetOrderData(response.data)\n\t\t\t// getUserInfo()\n\t\t} catch (error) {\n\t\t\tsetLoading(false)\n\t\t\treturn Promise.reject(error)\n\t\t}\n\t}, [context?.token, data?.order_id, getUserInfo])\n\n\tuseEffect(() => {\n\t\tgetOrderData()\n\t}, [getOrderData])\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t{loading ? (\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
Just a moment..
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t) : (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{orderData?.orders &&\n\t\t\t\t\t\t\t\t\t\t\t\torderData?.orders\n\t\t\t\t\t\t\t\t\t\t\t\t\t?.sort((a, b) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn new Date(a.createdAt) - new Date(b.createdAt)\n\t\t\t\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\t\t\t\t?.map((order, index) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconsole.log('ORDER - ', order)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
QtyItemPrice
{order?.quantity}{order?.item_id?.name}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{window.rupeeSym +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tparseFloat(order?.item_total).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
Sub - Total:
\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{window.rupeeSym +\n\t\t\t\t\t\t\t\t\t\t(Math.round(orderData?.order_subtotal * 100) / 100).toFixed(\n\t\t\t\t\t\t\t\t\t\t\t2\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
{'Tax'}
\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t{window.rupeeSym +\n\t\t\t\t\t\t\t\t\t\t(Math.round(orderData?.tax_total * 100) / 100).toFixed(2)}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t{orderData && orderData.discount ? (\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
Discount
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t{window.rupeeSym +\n\t\t\t\t\t\t\t\t\t\t\tMath.round(orderData?.discount).toFixed(2)}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t) : null}\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

Total

\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

{window.rupeeSym + orderData?.order_bill.toFixed(2)}

\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t

Contact:

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{orderData.allusers && orderData.allusers.length > 0\n\t\t\t\t\t\t\t\t\t\t\t\t? orderData.allusers.map((x) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(x ? x.first_name + ' ' : '') +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(!context.selectedStaff ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(context.selectedStaff &&\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twindow.server_roles[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontext.selectedStaff.server_role\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t] >= managerAccessLevel)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? x\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? x.phone\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: '')}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t ))\n\t\t\t\t\t\t\t\t\t\t\t\t: 'NA'}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLast Order Time:\n\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{new Date(orderData?.createdAt).toDateString() +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t' at ' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\torderData?.createdAt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t).toLocaleTimeString()}\n\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t

Order ID:

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t

{`#${orderData?.order_id}`}

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t

Payment Mode:

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t

{orderData?.payment_mode}

\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\t{orderData.order_type === 'delivery' ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t

Delivery Address:

\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t{orderData.delivery_address\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? orderData.delivery_address.apt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? orderData.delivery_address.apt +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ',' +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t orderData.delivery_address.street\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: orderData.delivery_address.street\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Not Available'}\n\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t) : null}\n\n\t\t\t\t\t\t\t\t\t{userInfo ? (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t

Total Orders

\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t

{userInfo.total_orders}

\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t{userInfo.prev_items.length > 0 ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMost Ordered :\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{userInfo.prev_items.map((x) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

{x.name}

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t)}\n\t\t\t\n\t\t\n\t)\n}\n\nexport default withTheme(OrderHistoryDetails)\n","import React from 'react'\nimport { useState } from 'react'\nimport OrderHistoryDetails from './OrderHistoryDetails'\n\nexport default function EachOrderHistory({ data, parent }) {\n\t// console.log('DATA --', data)\n\n const [showDetails, setShowDetails] = useState(false)\n\n\treturn (\n\t\t
\n\t\t\t{data && showDetails && (\n\t\t\t\t setShowDetails(false)}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t
setShowDetails(true)}>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t)\n}\n\nconst EachRow = ({ label, value }) => {\n\treturn (\n\t\t
\n\t\t\t\n\t\t\t{value}\n\t\t
\n\t)\n}\n","import Axios from 'axios'\n\nimport React, { useState, useEffect } from 'react'\nimport {\n\tButton,\n\tModal,\n\tModalHeader,\n\tModalBody,\n\tRow,\n\tCol,\n\tListGroupItem,\n\tListGroup,\n} from 'reactstrap'\nimport { AppContext, withTheme } from '../../contexts/AppContext'\nimport ReactPaginate from 'react-paginate'\nimport './OrderHistory.css'\nimport EachOrder from '../../dashboardComponents/orders/EachOrder'\n//import Button from '../../components/Button';\nimport { Dots } from 'react-activity'\nimport Layout from '../../components/Layout/Layout'\nimport EachOrderHistory from './EachOrderHistory'\n\nexport default withTheme((props) => {\n\tconst [showSearch, setShowSearch] = useState(true)\n\tconst [search, setSearch] = useState('')\n\tconst [orders, setOrder] = useState({})\n\tconst [pagination, setPagination] = useState({\n\t\t// data: new Array(1000).fill().map((value, index) => (({\n\t\t// id: index,\n\t\t// title: faker.lorem.words(5),\n\t\t// body: faker.lorem.sentences(8)\n\t\t// }))),\n\t\tdata: [],\n\t\toffset: 0,\n\t\tnumberPerPage: 52,\n\t\tpageCount: 0,\n\t\tcurrentData: [],\n\t})\n\n\tconst date = new Date()\n\tlet strdate =\n\t\tdate.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()\n\n\tconst [from, setFrom] = useState(strdate)\n\tconst [to, setTo] = useState(strdate)\n\tconst [loading, setLoading] = useState(true)\n\n\tvar dater = new Date(orders.createdAt).toString()\n\n\tvar formatteddate = dater.substring(0, dater.indexOf(' GMT'))\n\tvar total =\n\t\torders.order_bill +\n\t\torders.order_bill * (0.01 * orders.tax_rate) +\n\t\torders.service_fee -\n\t\torders.discount\n\n\tconst getOrderHistory = () => {\n\t\tsetLoading(true)\n\t\t//console.log(props)\n\t\tprops.context.setContextState({ pageName: 'Orders History' })\n\t\t//console.log('History Props -----', props.context.mainrestdata.restdata.restaurant_id)\n\t\tconst restID = props.context.mainrestdata\n\t\t\t? props.context.mainrestdata.restdata.restaurant_id\n\t\t\t: null\n\t\tlet header = { 'foodbots-header': props.context.token }\n\t\tlet url =\n\t\t\twindow.kumbaURL +\n\t\t\t'/mainorders/history/' +\n\t\t\tprops.context.selectedRestID +\n\t\t\t'/' +\n\t\t\tfrom +\n\t\t\t'/' +\n\t\t\tto\n\t\tAxios({\n\t\t\tmethod: 'GET',\n\t\t\theaders: header,\n\t\t\turl: url,\n\t\t})\n\t\t\t.then((res) => {\n\t\t\t\tsetPagination({\n\t\t\t\t\t...pagination,\n\t\t\t\t\tdata: res.data.sort((a, b) => a.createdAt - b.createdAt),\n\t\t\t\t})\n\t\t\t\tsetLoading(false)\n\t\t\t\tsetPagination((prevState) => ({\n\t\t\t\t\t...prevState,\n\t\t\t\t\tpageCount: prevState.data.length / prevState.numberPerPage,\n\t\t\t\t\tcurrentData: prevState.data.slice(\n\t\t\t\t\t\tpagination.offset,\n\t\t\t\t\t\tpagination.offset + pagination.numberPerPage\n\t\t\t\t\t),\n\t\t\t\t}))\n\t\t\t})\n\t\t\t.catch((err) => {\n\t\t\t\tsetLoading(false)\n\t\t\t\t// this.setState({\n\t\t\t\t// hasError: true,\n\t\t\t\t// isLoading: false\n\t\t\t\t// })\n\t\t\t})\n\t}\n\n\tuseEffect(() => {\n\t\tgetOrderHistory()\n\t}, [pagination.numberPerPage, pagination.offset])\n\n\tconst handlePageClick = (event) => {\n\t\tconst selected = event.selected\n\t\tconst offset = selected * pagination.numberPerPage\n\t\tsetPagination({ ...pagination, offset })\n\t}\n\treturn (\n\t\t\n\t\t\t\t\t setShowSearch(!showSearch)}\n\t\t\t\t\t\tclassName={`btn btn-sm btn-${\n\t\t\t\t\t\t\tshowSearch ? 'danger' : 'success'\n\t\t\t\t\t\t} position-absolute`}\n\t\t\t\t\t\tstyle={{ right: 0, top: '-7px' }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{showSearch ? `Hide` : 'Show'}\n\t\t\t\t\t\n\t\t\t\t\t{showSearch && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\tFrom \n\t\t\t\t\t\t\t\t setFrom(e.target.value)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t To \n\t\t\t\t\t\t\t\t setTo(e.target.value)}\n\t\t\t\t\t\t\t\t/>{' '}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t getOrderHistory()}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tGet Orders\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\t\t\t\t\n\t\t\t}\n\t\t>\n\t\t\t{loading ? (\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t) : (\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t setSearch(e.target.value)}\n\t\t\t\t\t\t\t\tclassName=\"form-control\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{pagination.currentData && pagination.currentData.length === 0 ? (\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t

No Data Found

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t{pagination.currentData &&\n\t\t\t\t\t\t\tpagination.currentData\n\t\t\t\t\t\t\t\t.sort(\n\t\t\t\t\t\t\t\t\t(a, b) =>\n\t\t\t\t\t\t\t\t\t\tnew Date(b.createdAt).getTime() -\n\t\t\t\t\t\t\t\t\t\tnew Date(a.createdAt).getTime()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.map((order, index) =>\n\t\t\t\t\t\t\t\t\tsearch === '' ||\n\t\t\t\t\t\t\t\t\torder?.table_id?.table_name\n\t\t\t\t\t\t\t\t\t\t.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t.includes(search.toLowerCase()) ? (\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t) : null\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t)}\n\t\t\n\t)\n})\n","import React, { useState, useEffect } from 'react'\nimport { Col, Row, Button, Input, FormGroup, Label } from 'reactstrap';\nimport Axios from 'axios';\nimport { withTheme } from '../../contexts/AppContext';\nimport Select from 'react-select';\n// import _Select from '../../components/_Select';\nimport _Select from 'react-select';\nimport { toast } from 'react-toastify';\nimport { Icon } from 'react-icons-kit'\nimport { ic_arrow_back } from 'react-icons-kit/md/ic_arrow_back';\nimport axios from 'axios';\nimport { Spinner } from 'react-activity'\n\nexport const _ModalHeader = ({\n back,\n heading,\n onCloseModal,\n className\n}) => {\n return
\n
\n {back && }\n {heading &&

{heading}

}\n
\n {\n onCloseModal && \n }\n
\n}\n\nexport default withTheme(props => {\n // console.log('PROPS ----', props.context.restdata);\n let header = { 'foodbots-header': props.context.token };\n const [state, setState] = useState({\n items: [],\n categories: [],\n loading: false,\n display: 'form',\n btnText: 'Next',\n slots: [],\n });\n const [data, setData] = useState({\n rest_id: props.context.selectedRestID,\n start_time: null,\n selectedTemplate: null,\n repeat_days: null,\n end_time: null,\n order_stop_time: null,\n maxOrders: null,\n type: 'single',\n selected_date : null,\n });\n const [limit, setLimit] = useState([]);\n\n console.log({\n // state,\n data\n })\n\n const daysOfTheWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ]\n\n // const sendLimitData = () => {\n // setState({ ...state, loading: false });\n // alert('Sending Order Limit Data'+JSON.stringify(limit))\n // }\n\n const addSlot = () => {\n console.log('Sending ----', data);\n let startTime = new Date();\n let endTime = new Date();\n let startSplit = data.start_time.split(\":\");\n let endSplit = data.end_time.split(\":\");\n console.log(startSplit, endSplit);\n startTime.setHours(parseInt(startSplit[0]))\n startTime.setMinutes(parseInt(startSplit[1]))\n startTime.setSeconds(0)\n \n endTime.setHours(parseInt(endSplit[0]))\n endTime.setMinutes(parseInt(endSplit[1]))\n endTime.setSeconds(0)\n\n let postdata = {\n start_time : startTime,\n end_time : endTime,\n order_stop_time : parseInt(data.order_stop_time),\n type : data.type,\n rest_id : props.context.selectedRestID,\n item_limits : limit,\n selected_date : data.selected_date,\n repeat_days : data.repeat_days ? data.repeat_days.map(x => x.value) : null,\n menu_template : data.selectedTemplate.template_id\n }\n console.log(postdata);\n if (data.start_time) {\n let header = { \"foodbots-header\": props.context.token };\n Axios(window.kumbaURL + '/deliveryslots/create', {\n method: 'POST',\n headers: header,\n data: postdata\n })\n .then(res => {\n toast.success('Delivery slots added')\n props.toggle()\n // props.updateItems(res.data)\n // sendLimitData()\n })\n .catch(err => {\n setState({ ...state, loading: false })\n console.log(err)\n })\n } else {\n toast.error('Name or Max Orders is empty')\n }\n }\n\n const handleLimitChage = (e, val) => {\n if (e.target.value) {\n setLimit({ ...limit, [val.item_id]: e.target.value })\n // setLimit([...limit, ...{ item_id: val.item_id, max_limit: e.target.value }])\n //limit.push({ item_id: val.item_id, max_limit: e.target.value })\n }\n console.log('LIMIT ---', limit)\n }\n\n const getRestSlotTemplates = () => {\n axios(window.kumbaURL + '/menutemplate/rest/' + props.context.restdata.restaurant_id, {\n headers: header\n })\n .then(res => {\n // console.log('RES ---', res);\n setState({\n ...state,\n slots: res.data\n })\n })\n .catch(err => {\n console.log(err)\n })\n }\n\n useEffect(() => {\n if (state.display === 'slots' && state.slots.length === 0) {\n getRestSlotTemplates();\n }\n }, [state.display]);\n\n return (\n
\n {\n state.display === \"options\" ?\n
\n <_ModalHeader\n heading='Options'\n back={() => setState({ ...state, display: 'slots' })}\n className='mb-3'\n />\n {\n data.selectedTemplate.categories ?\n
\n {/*
{val.label}
*/}\n
\n \n \n \n \n \n \n \n \n {data.selectedTemplate.categories.map((val, i) =>\n props.context.restdata.menu_items.filter(x => x.category_id === val.id).map((item, i) => {\n // console.log('ITEMS ---', val)\n return \n \n \n \n \n \n \n }))}\n
NameCategoryOrder Limit
{item.name}{props.context.categoryTable[item.category_id].name} handleLimitChage(e, item)}\n />
\n
\n
\n : null\n }\n {\n data.selectedTemplate.items ?\n
\n {/*
{val.label}
*/}\n
\n \n \n \n \n \n \n \n \n\n {data.selectedTemplate.items.map((val, i) =>\n props.context.restdata.menu_items.filter(x => x.item_id === val.item_id).map((item, i) => {\n console.log('ITEMS ---', item)\n return \n \n \n \n {/* */}\n \n \n \n }))}\n
NameCategoryOrder Limit
{item.name}{item.category_id}{props.context.categoryTable[item.category_id].name} handleLimitChage(e, item)}\n />
\n
\n
\n : null\n }\n
\n \n
: null\n }\n {\n state.display === 'slots' ?
\n <_ModalHeader\n heading='Select Slot Template'\n className='mb-3'\n back={() => setState({ ...state, display: 'form' })}\n />\n {\n state.slots.length === 0 ?
\n \n
: null\n }\n {\n state.slots.map(val => {\n return {\n setData({ ...data, selectedTemplate: val })\n }}\n >\n
\n

{val.name}

\n

{\"Included Categories : \" + (val.categories.map(x => x.name).join(\",\"))}

\n

{\"Included Items : \" + (val.items.map(x => x.name).join(\",\"))}

\n
\n
\n })\n }\n
\n \n
: null\n }\n {\n state.display === 'form' ?
\n <_ModalHeader\n heading='Delivery Slot Form'\n className='mb-3'\n />\n \n
\n \n
\n
\n \n <_Select\n options={daysOfTheWeek.map((val, i) => ({ value: i, label: val }))}\n isMulti\n isDisabled={data.type === 'single'}\n onChange={e => {\n setData({ ...data, repeat_days: e })\n }}\n value={data.repeat_days}\n />\n
\n
\n
\n
\n \n {\n setData({\n ...data,\n selected_date: e.target.value\n })\n }}\n />\n
\n
\n
\n \n
\n
\n \n {\n setData({\n ...data,\n start_time: e.target.value\n })\n }}\n />\n
\n
\n
\n
\n \n {\n setData({\n ...data,\n end_time: e.target.value\n })\n }}\n />\n
\n
\n
\n \n
\n
\n \n {\n setData({\n ...data,\n order_stop_time: e.target.value\n })\n }}\n />\n
\n
\n
\n \n
: null\n }\n \n )\n});\n","import React, { useEffect, useState } from 'react'\nimport { Card, CardBody, CardHeader, Col, Spinner, Modal, ModalBody, Button } from 'reactstrap';\nimport { Icon } from 'react-icons-kit'\nimport { ic_group, ic_phone, ic_chat_bubble, ic_check_box } from 'react-icons-kit/md'\nimport { withTheme } from '../../contexts/AppContext';\nimport $ from 'jquery'\n\nimport Axios from 'axios';\n\nexport default withTheme(({ val, context }) => {\n\n const [state, setState] = useState({\n askDelete: false,\n deleteLoading: false\n });\n\n const handleDelete = () => {\n setState({ ...state, deleteLoading: true })\n //console.log('deleting ---', val);\n let header = { \"foodbots-header\": context.token };\n Axios(window.kumbaURL + '/deliveryslots/delete/' + val.slot_id, {\n headers: header,\n method: 'DELETE'\n })\n .then(res => {\n //console.log('res', res)\n setState({ ...state, deleteLoading: false });\n $(`#${val.slot_id}`).fadeOut(1000)\n })\n .catch(err => {\n setState({ ...state, deleteLoading: false })\n console.log('error --', err)\n })\n };\n\n return (\n
\n \n {\n state.askDelete ? null : \n
\n
\n
\n {displayDate(val.start_time)}\n
\n
\n {/* {' '} */}\n {\"to\"}\n
\n
\n {/* {' '} */}\n {displayDate(val.end_time)}\n
\n
\n
\n
\n }\n \n
\n {\n state.askDelete ?
\n

Are you sure you want to delete?

\n
:\n \n
\n
\n {\"Max Orders : \" + val.maxOrders}
\n {\"Selected Categories : \" + (val.categories.map(i => i.name + \", \"))}
\n {\"Selected Items : \" + (val.items.map(i => i.name + \", \"))}

\n {\"Order ends at : \" + displayDate(val.order_stop_time)}
\n
\n }\n
\n {\n state.askDelete ?
\n \n {\n \n }\n
:\n
\n \n {/* {\n \n } */}\n
\n }\n\n
\n
\n
\n
\n )\n});\n\n\nconst displayDate = (date) => {\n // console.log(date);\n let dateObj = new Date(date);\n let month = dateObj.getMonth() + 1;\n let day = dateObj.getDate();\n //let time = dateObj.getTime();\n\n var hours = dateObj.getHours();\n var min = dateObj.getMinutes();\n var sec = dateObj.getSeconds();\n\n // console.log(hours, min, dateObj.toLocaleDateString())\n\n let hour = hours > 12 ? hours - 12 : hours;\n let ampm = hours >= 12 ? \"pm\" : \"am\";\n\n month = (month < 10 ? \"0\" : \"\") + month;\n day = (day < 10 ? \"0\" : \"\") + day;\n hour = (hour < 10 ? \"0\" : \"\") + hour;\n min = (min < 10 ? \"0\" : \"\") + min;\n sec = (sec < 10 ? \"0\" : \"\") + sec;\n\n let time = hour + \":\" + min + ampm;\n\n return day + \"/\" + month + \" \" + time;\n}\n","import React, { useState } from 'react';\nimport { toast } from 'react-toastify'\nimport { Spinner } from 'react-activity'\nimport _Select from 'react-select'\nimport { Modal, ModalBody, Row } from 'reactstrap'\nimport { withTheme } from '../../../contexts/AppContext'\nimport axios from 'axios'\n\nexport default withTheme((props) => {\n const { context, updateList, show, toggle, getAllRestTemplate } = props;\n\n // console.log('TEMPLATE FORM ----', props);\n let header = { 'foodbots-header': context.token };\n\n const [_data, set_Date] = useState(props._data)\n\n const [state, setState] = useState({\n loading: false,\n });\n\n const [data, setData] = useState({\n name: !_data ? null : _data.name,\n categories: !_data ? [] : _data.categories.map(val => { return { value: val.id, label: val.name } }),\n items: !_data ? [] : _data.items.map(val => { return { value: val.item_id, label: val.name } }),\n rest_id: context.selectedRestData.restdata.restaurant_id\n })\n\n const handleSubmit = e => {\n e.preventDefault()\n setState({\n ...state,\n loading: true\n })\n // console.log('SENDING ---', {\n // ...data,\n // categories: data.categories.map(val => val.value),\n // items: data.items.map(val => val.value)\n // })\n axios(window.kumbaURL + '/menutemplate/create', {\n method: 'POST',\n headers: header,\n data: {\n ...data,\n categories: data.categories.map(val => val.value),\n items: data.items.map(val => val.value)\n }\n })\n .then(res => {\n setState({\n ...state,\n loading: false,\n });\n toast.success('Template Created')\n setData({\n ...data,\n name: '',\n categories: [],\n items: []\n })\n // console.log('Template Created ---', res)\n updateList(res.data)\n })\n .catch(err => {\n setState({\n ...state,\n loading: false\n })\n toast.success('Error, Please try again')\n // console.log('ERR ---', err);\n })\n }\n\n const updateTemplate = (e) => {\n e.preventDefault();\n setState({\n ...state,\n loading: true\n })\n const url = window.kumbaURL + \"/menutemplate/\" + _data.template_id;\n // console.log('SENDING ---', {\n // ...data,\n // categories: data.categories.map(val => val.value),\n // items: data.items.map(val => val.value)\n // }, 'to ---', url);\n axios(url, {\n method: 'PUT',\n headers: header,\n data: {\n ...data,\n categories: data.categories.map(val => val.value),\n items: data.items.map(val => val.value)\n }\n })\n .then(res => {\n console.log(res)\n setState({\n ...state,\n loading: false\n });\n toast.success('Template Updated')\n getAllRestTemplate()\n })\n .catch(err => {\n // console.log('ERROR ----', err)\n setState({\n ...state,\n loading: false\n });\n toast.error('Update Error')\n })\n\n }\n\n // console.log('_DATA ----', data);\n return \n
\n \n
\n \n
\n
\n \n {\n setData({\n ...data,\n name: e.target.value\n })\n }} />\n
\n \n
\n
\n \n <_Select\n disabled={state.loading}\n label='Categories'\n options={\n props.context.selectedRestData.restdata.categoryList.map(item => {\n return { value: item.id, label: item.name }\n })\n }\n isMulti={true}\n onChange={e => {\n //console.log('cat ', e)\n setData({\n ...data,\n categories: e\n });\n }}\n value={data.categories}\n />\n
\n
\n
\n
\n \n <_Select\n disabled={state.loading}\n label='Items'\n options={props.context.selectedRestData.restdata.menu_items.map(item => {\n return { value: item.item_id, label: item.name }\n })}\n\n isMulti={true}\n onChange={e => {\n console.log('item -', e);\n setData({\n ...data,\n items: e\n })\n }}\n value={data.items}\n />\n
\n
\n
\n
\n \n
\n
\n
\n
\n});\n","import axios from \"axios\";\nimport React, { useState } from 'react';\nimport { Modal, ModalBody, ButtonGroup, Button } from 'reactstrap'\nimport { Spinner } from 'react-activity'\nimport { toast } from \"react-toastify\";\nimport { withTheme } from \"../../../contexts/AppContext\";\nimport TemplateForm from \"./TemplateForm\";\n\n\nconst EachTemplate = withTheme(({ data, context, _state, _setState, getAllRestTemplate }) => {\n let header = { 'foodbots-header': context.token };\n const [state, setState] = useState({\n deleteLoading: false,\n confirmDelete: false,\n deleted: false,\n showEdit: false,\n data\n });\n // console.log('each template ---', data);\n\n const handleDelete = () => {\n setState({ ...state, deleteLoading: true })\n axios(window.kumbaURL + '/menutemplate/' + data.template_id, {\n headers: header,\n method: 'DELETE'\n })\n .then(res => {\n setState({ ...state, deleteLoading: false, confirmDelete: false });\n toast.success('Template Deleted')\n // console.log('DELETED --', res)\n _setState({ ..._state, data: _state.data.filter(x => x.template_id !== data.template_id) })\n })\n .catch(err => {\n toast.error('Something went wrong please try again')\n setState({ ...state, deleteLoading: false })\n // console.log('ERROR --', err);\n })\n }\n\n return
\n \n \n
\n

Are you sure you want to delete?

\n \n \n \n \n
\n
\n
\n {/* setState({ ...state, showEdit: false })}\n \n /> */}\n setState({ ...state, showEdit: false })}\n getAllRestTemplate={getAllRestTemplate}\n />\n
\n
\n

{data.name}

\n
\n \n \n
\n
\n
\n
\n});\n\nexport default React.memo(EachTemplate);\n","import React, { useState, useEffect } from 'react'\nimport { Modal, ModalBody, Row } from 'reactstrap'\nimport _Select from 'react-select'\nimport { withTheme } from '../../../contexts/AppContext'\nimport axios from 'axios'\nimport EachTemplate from './EachTemplate';\nimport TemplateForm from './TemplateForm'\n\n\n\nconst TemplateModal = withTheme(({\n toggle,\n show,\n context\n}) => {\n\n const [state, setState] = useState({\n loading: false,\n data: [],\n showAdd: false\n })\n\n const getAllRestTemplate = () => {\n setState({ ...state, loading: true })\n console.log('GETING TEMPLATES')\n let header = { 'foodbots-header': context.token };\n axios(window.kumbaURL + '/menutemplate/rest/' + context.selectedRestData.restdata.restaurant_id, {\n headers: header\n })\n .then(res => {\n console.log(res)\n setState({ ...state, data: res.data, loading: false })\n })\n .catch(err => {\n setState({ ...state, loading: false })\n console.log(err)\n })\n }\n\n useEffect(() => {\n getAllRestTemplate()\n }, [])\n\n return (\n \n
\n

Manage Templates

\n \n
\n \n setState({\n ...state,\n data: [...state.data, newItem]\n })}\n show={state.showAdd}\n toggle={() => setState({ ...state, showAdd: false })}\n \n />\n
\n \n
\n
\n {\n state.data.map((val, i) => {\n return \n })\n }\n
\n
\n )\n})\n\nexport default TemplateModal;\n","import React, { useState, useEffect } from 'react';\nimport { Modal, ModalBody } from 'reactstrap';\nimport SlotForm from './SlotForm';\nimport Axios from 'axios';\nimport { withTheme } from '../../contexts/AppContext';\nimport EachSlot from './EachSlot';\nimport Layout from '../../components/Layout/Layout'\nimport AppLoading from '../../components/AppLoading';\nimport TemplateModal from './SlotTemplate/TemplateModal';\n\nconst TimeSlot = withTheme(props => {\n const [state, setState] = useState({\n showAdd: false,\n loading: false,\n items: [],\n showTemplates: false\n });\n\n const getItems = async () => {\n // console.log('getting..')\n setState({ ...state, loading: true })\n Axios({\n method: \"GET\",\n url: window.kumbaURL + '/deliveryslots/all/' + props.context.selectedRestID,\n headers: { 'foodbots-header': props.context.token }\n })\n .then(res => {\n //console.log(res.data)\n setState({\n ...state,\n loading: false,\n items: res.data\n })\n })\n .catch(err => {\n setState({ ...state, loading: false })\n console.log(err)\n })\n\n }\n\n const updateItems = data => {\n setState({ items: [...state.items, data] })\n }\n\n const toggleTemplate = () => {\n setState({ ...state, showTemplates: !state.showTemplates })\n }\n\n useEffect(() => {\n getItems();\n }, [props.context.selectedRestID]);\n\n return (\n \n \n \n \n }\n >\n
\n \n \n setState({\n ...state,\n showAdd: !state.showAdd\n })} updateItems={updateItems} />\n
\n \n
\n
\n
\n setState({\n ...state,\n showAdd: !state.showAdd\n })}\n >+\n
\n
\n
\n {\n state.items.sort((a,b) => new Date(a.start_time) - new Date(b.start_time)).map((val, i) => )\n }\n
\n
\n
\n \n )\n});\n\nexport default TimeSlot;\n","import React, { useState, useEffect } from 'react';\nimport { withTheme } from '../../contexts/AppContext';\nimport Layout from '../../components/Layout/Layout';\nimport SignUpDetails from '../../dashboardComponents/signUp/details/SignUpDetails';\nimport { Button } from 'reactstrap';\nimport axios from 'axios';\nimport { toast } from 'react-toastify';\n// import NotificationsView from '../../views/notifications/Notifications_FCM';\nimport './stripe.css';\n\nconst NewProfile = withTheme(({ context, add = false }) => {\n\n let [edit, setEdit] = useState(0);\n let [restdata, setRestdata] = useState(null);\n\n let [accountLink, setAccountLink] = useState(null);\n let [stripeStatus, setStripeStatus] = useState(\"connected\");\n\n const toggleResturantStatus = async () => {\n toast.info(\"Loading...\")\n try {\n let header = {\n \"foodbots-header\": context.token,\n \"Content-Type\": \"application/json\"\n };\n let res = await axios(window.kumbaURL + `/restaurant/${restdata.isOpen ? 'close' : 'open'}/${restdata.restaurant_id}`, {\n method: 'PUT',\n headers: header\n })\n toast[res.data.isOpen ? \"success\" : 'error'](`Restaurant has ${res.data.isOpen ? \"opened\" : \"closed\"}`);\n await context.loadRestaurantDetails();\n } catch(err) {\n toast.error('Error, Please try again')\n }\n };\n\n const toggleDeliveryStatus = () => {\n toast.info(\"Loading...\")\n let header = {\n \"foodbots-header\": context.token,\n \"Content-Type\": \"application/json\"\n };\n axios(window.kumbaURL + `/restaurant/${restdata.isDeliveryOpen ? 'closedelivery' : 'opendelivery'}/${restdata.restaurant_id}`, {\n method: 'PUT',\n headers: header\n })\n .then(res => {\n toast[res.data.isDeliveryOpen ? \"success\" : 'error'](`Delivery has ${res.data.isDeliveryOpen ? \"opened\" : \"closed\"}`)\n })\n .catch(err => {\n toast.error('Error, Please try again')\n })\n }\n\n const settleBills = async () => {\n try {\n var toastID = toast(\"Settling bills ...\", { autoClose: false, closeButton: false });\n let header = {\n \"foodbots-header\": context.token,\n \"Content-Type\": \"application/json\"\n }; \n let res = await axios({\n method: 'POST',\n headers: header,\n url : window.kumbaURL + '/restaurant/settlebills/' + restdata.restaurant_id\n });\n \n toast.update(toastID, {\n render: 'All Bills Cleared',\n type: toast.TYPE.SUCCESS,\n autoClose: 500,\n closeButton: true\n });\n return Promise.resolve();\n // toast.success();\n } catch (error) {\n // toast.error('');\n toast.update(toastID, {\n render: 'Error, Please try again',\n type: toast.TYPE.ERROR,\n autoClose: 800,\n closeButton: true\n });\n return Promise.reject(error);\n }\n }\n\n const toggleTakeAwayStatus = () => {\n toast.info(\"Loading...\")\n let header = {\n \"foodbots-header\": context.token,\n \"Content-Type\": \"application/json\"\n };\n axios(window.kumbaURL + `/restaurant/${restdata.isTakeawayOpen ? 'closetakeaway' : 'opentakeaway'}/${restdata.restaurant_id}`, {\n method: 'PUT',\n headers: header\n })\n .then(res => {\n console.log('RES ---', res)\n toast[res.data.isTakeawayOpen ? \"success\" : 'error'](`Takeaway has ${res.data.isTakeawayOpen ? \"opened\" : \"closed\"}`)\n })\n .catch(err => {\n toast.error('Error, Please try again')\n })\n }\n\n const connectStripe = async () => {\n try {\n let response = await axios({\n method : 'POST',\n url : window.kumbaURL + \"/stripe/accountlink\",\n headers : { \"foodbots-header\" : context.token },\n data : {\n rest_id : context.selectedRestID,\n return_url : process.env.REACT_APP_DASHBOARD_URL,\n refresh_url : process.env.REACT_APP_DASHBOARD_URL\n }\n });\n let data = response.data;\n console.log(data);\n setAccountLink(data.accountLink);\n setStripeStatus(data.status);\n return Promise.resolve(data);\n } catch(e) {\n return Promise.reject(e);\n }\n }\n\n const onClick = async () => {\n try {\n let data = await connectStripe();\n if(stripeStatus === \"not-connected\") {\n window.open(accountLink.url);\n } else {\n toast(\"Bank Account already connected\");\n }\n return Promise.resolve(data);\n } catch(err) {\n return Promise.reject(err);\n }\n }\n\n useEffect(() => {\n if (context.selectedRestData) {\n console.log('SELECTED ----', context.selectedRestData.restdata)\n setRestdata(context.selectedRestData.restdata)\n }\n }, [context.selectedRestData])\n\n useEffect(() => {\n if(process.env.REACT_APP_COUNTRY !== \"IN\") {\n connectStripe();\n }\n }, [context.selectedRestID])\n\n\n\n return (\n \n {\n restdata ?
\n {restdata.allowed_menu_types.includes(\"dine-in\") ? : null}\n {restdata.allowed_menu_types.includes(\"takeaway\") ? : null}\n {restdata.allowed_menu_types.includes(\"delivery\") ? : null}\n {restdata.allowed_menu_types.includes(\"dine-in\") && !restdata.isOpen ? : null}\n {restdata.pos_type && restdata.pos_type === \"prizmatec\" ? : null}\n
: null\n }\n \n }\n >\n {/* */}\n
\n {!add && !edit ? : }\n {process.env.REACT_APP_COUNTRY !== \"IN\" ? \n stripeStatus === \"not-connected\" ? \n Connect with \n : \n : null\n }\n setEdit(false)} />\n
\n \n )\n});\n\nexport default NewProfile;","import React, { useState } from \"react\";\nimport { Button, Modal } from \"reactstrap\";\nimport { Icon } from \"react-icons-kit\";\nimport { connection } from \"react-icons-kit/icomoon/connection\";\nimport { ic_refresh } from \"react-icons-kit/md/ic_refresh\";\n\nexport default function OfflienPopup() {\n const [show, setShow] = useState(false);\n window.addEventListener(\"offline\", () => {\n setShow(true);\n });\n return (\n \n
\n
\n \n

Seems Like You've Gone Offline

\n \n
\n
\n
\n );\n}\n","import axios from 'axios'\nimport React, { useEffect, useState } from 'react'\nimport Layout from '../../components/Layout/Layout'\nimport { withTheme } from '../../contexts/AppContext'\nimport moment from 'moment'\nimport { ListGroup, ListGroupItem, Modal } from 'reactstrap'\nimport { Icon } from 'react-icons-kit'\nimport { userOutline } from 'react-icons-kit/typicons/userOutline'\n\nfunction Loyalty({ context }) {\n\tconst [phoneNumber, setPhoneNumber] = useState(null)\n\tconst [orderBill, setOrderBill] = useState(null)\n\tconst [userDetails, setUserDetails] = useState(null)\n\tconst [sortedTiers, setSortedTiers] = useState([])\n\tconst [credits, setCredits] = useState([])\n\tconst [totalCredits, setTotalCredits] = useState(0)\n\tconst [maxUsableCredits, setMaxUsableCredit] = useState(0)\n\tconst [userTier, setUserTier] = useState('Default')\n\tconst { restdata } = context\n\tlet loyaltyId = restdata?.loyalty.loyalty_id\n\tlet to = moment().add(1, 'day').format('YYYY-MM-DD')\n\tlet from = moment().subtract(90, 'day').format('YYYY-MM-DD')\n\tconst [showEditModal, setShowEditModal] = useState(false)\n\tconst [name, setName] = useState('')\n\tconst [email, setEmail] = useState('')\n\n\tconst getTotalCredits = async () => {\n\t\ttry {\n\t\t\tlet url = `${window.kumbaURL}/gettotalcredits/${phoneNumber}/${loyaltyId}`\n\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\tlet res = await axios(url, {\n\t\t\t\theaders: header,\n\t\t\t})\n\t\t\tconsole.log({ getTotalCredits: res.data })\n\t\t\tsetTotalCredits(res.data.total_credits)\n\n\t\t\treturn res.data\n\t\t} catch (err) {\n\t\t\tconsole.log(err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\tconst getCredits = async () => {\n\t\ttry {\n\t\t\tlet url = `${window.kumbaURL}/getcreditsbyuser/${phoneNumber}/${loyaltyId}/${from}/${to}`\n\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\tlet res = await axios(url, {\n\t\t\t\theaders: header,\n\t\t\t})\n\t\t\tsetCredits(res.data)\n\t\t\tconsole.log('CREDITS --- ', res.data)\n\t\t} catch (err) {\n\t\t\tconsole.log(err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\tconst getUserDetails = async (e) => {\n\t\te.preventDefault()\n\t\tconsole.log('PHONE SUBMIT')\n\t\tif (!phoneNumber || phoneNumber === '') {\n\t\t\treturn\n\t\t}\n\t\ttry {\n\t\t\tlet url = `${window.kumbaURL}/getorderandbill/${phoneNumber}/${loyaltyId}/${from}/${to}`\n\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\tlet res = await axios(url, {\n\t\t\t\theaders: header,\n\t\t\t})\n\t\t\tconsole.log('USER DETAILS ----', { getOrderAndBill: res.data })\n\t\t\tsetUserDetails(res.data)\n\t\t\tgetTotalCredits()\n\t\t\tgetCredits()\n\t\t} catch (err) {\n\t\t\tconsole.log(err)\n\t\t\treturn Promise.reject(err)\n\t\t}\n\t}\n\n\tconst getTiers = async () => {\n\t\ttry {\n\t\t\tlet url = `${window.kumbaURL}/getloyalty/${loyaltyId}`\n\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\tlet res = await axios(url, {\n\t\t\t\theaders: header,\n\t\t\t})\n\n\t\t\tlet tierAmountSort = res.data.tier.sort(\n\t\t\t\t(a, b) => a.minimum_dollar_spent - b.minimum_dollar_spent\n\t\t\t)\n\t\t\tsetSortedTiers(tierAmountSort)\n\t\t\tconsole.log('GET TIERS --', res)\n\t\t} catch (err) {\n\t\t\tconsole.log(err)\n\t\t}\n\t}\n\n\tconst createLoyaltyOrder = async () => {\n\t\ttry {\n\t\t\tlet url = `${window.kumbaURL}/mainorders/addloyaltyorder`\n\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\tlet res = await axios({\n\t\t\t\turl: url,\n\t\t\t\theaders: header,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdata: {\n\t\t\t\t\tuser_id: phoneNumber,\n\t\t\t\t\trest_id: context.selectedRestID,\n\t\t\t\t\torder_bill: orderBill,\n\t\t\t\t},\n\t\t\t})\n\n\t\t\tconsole.log('ADD Order --', res.data)\n\t\t\treturn Promise.resolve(res.data)\n\t\t} catch (err) {\n\t\t\tconsole.log(err)\n\t\t\treturn Promise.reject(err)\n\t\t}\n\t}\n\n\tconst applyCredits = async (orderdata) => {\n\t\ttry {\n\t\t\tlet url = `${window.kumbaURL}/addusedcredit`\n\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\tconst res = await axios({\n\t\t\t\turl,\n\t\t\t\theaders: header,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdata: {\n\t\t\t\t\tuser: phoneNumber,\n\t\t\t\t\tloyalty: loyaltyId,\n\t\t\t\t\torder: orderdata.order_id,\n\t\t\t\t\tcredit_amount: Math.round(maxUsableCredits * 100) / 100,\n\t\t\t\t\tcredit_type: 'debit',\n\t\t\t\t},\n\t\t\t})\n\t\t\tconsole.log({ app: res.data })\n\n\t\t\treturn res.data\n\t\t} catch (err) {\n\t\t\tconsole.log(err)\n\t\t}\n\t}\n\n\tconst addUserCredits = async (orderdata) => {\n\t\ttry {\n\t\t\tlet url = `${window.kumbaURL}/mainorders/addusercredits/${orderdata.order_id}`\n\t\t\tlet header = { 'foodbots-header': context.token }\n\t\t\tconst res = await axios({\n\t\t\t\turl,\n\t\t\t\theaders: header,\n\t\t\t\tmethod: 'PUT',\n\t\t\t})\n\t\t\tconsole.log({ app: res.data })\n\t\t\treturn res.data\n\t\t} catch (err) {\n\t\t\tconsole.log(err)\n\t\t}\n\t}\n\n\tconst submitBill = async (e) => {\n\t\ttry {\n\t\t\te.preventDefault()\n\t\t\tlet orderdata = await createLoyaltyOrder()\n\t\t\tawait applyCredits(orderdata)\n\t\t\tawait addUserCredits(orderdata)\n\t\t\treturn await getUserDetails(e)\n\t\t} catch (error) {\n\t\t\treturn Promise.reject(error)\n\t\t}\n\t}\n\n\tuseEffect(async () => {\n\t\tawait getTiers()\n\t}, [])\n\n\tuseEffect(() => {\n\t\tif (userDetails && sortedTiers) {\n\t\t\tlet derivedTier = 'Default'\n\t\t\tsortedTiers.forEach((tier) => {\n\t\t\t\tif (\n\t\t\t\t\tuserDetails.total_order_bills >= tier.minimum_dollar_spent &&\n\t\t\t\t\tuserDetails.total_orders >= tier.minimum_order\n\t\t\t\t) {\n\t\t\t\t\tderivedTier = tier.name\n\t\t\t\t}\n\t\t\t})\n\t\t\tsetUserTier(derivedTier)\n\t\t}\n\t}, [userDetails, sortedTiers])\n\n\tconst displayDate = (date) => {\n\t\t// console.log(date);\n\t\tlet dateObj = new Date(date)\n\t\tlet month = dateObj.getMonth() + 1\n\t\tlet day = dateObj.getDate()\n\t\t//let time = dateObj.getTime();\n\n\t\tvar hours = dateObj.getHours()\n\t\tvar min = dateObj.getMinutes()\n\t\tvar sec = dateObj.getSeconds()\n\n\t\t// console.log(hours, min, dateObj.toLocaleDateString())\n\n\t\tlet hour = hours > 12 ? hours - 12 : hours\n\t\tlet ampm = hours >= 12 ? 'pm' : 'am'\n\n\t\tmonth = (month < 10 ? '0' : '') + month\n\t\tday = (day < 10 ? '0' : '') + day\n\t\thour = (hour < 10 ? '0' : '') + hour\n\t\tmin = (min < 10 ? '0' : '') + min\n\t\tsec = (sec < 10 ? '0' : '') + sec\n\n\t\tlet time = hour + ':' + min + ampm\n\n\t\treturn day + '/' + month + ' ' + time\n\t}\n\n\tconst clearSearch = () => {\n\t\tsetPhoneNumber('')\n\t\tsetTotalCredits(0)\n\t\tsetCredits([])\n\t\tsetUserDetails(null)\n\t}\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n {/* You can change this condition 👇🏽 to the real deal */}\n\t\t\t\t\t\t

{userDetails ? 'Edit' : 'Create'} User

\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t setName(e.target.value)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t setEmail(e.target.value)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t setShowEditModal(false)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tCancel\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t setPhoneNumber(e.target.value)}\n\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"form-control\"\n\t\t\t\t\t\t\t\t\t\tid=\"phoneNumberInput\"\n\t\t\t\t\t\t\t\t\t\tplaceholder=\"Enter Phone No\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{userDetails && (\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t{/* If there is not user 👇🏽\" */}\n\t\t\t\t\t\t\t\t\t\t\t\t{/*
\n

User not found

\n
*/}\n\t\t\t\t\t\t\t\t\t\t\t\t{/* If user is found 👇🏽 */}\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
Username
\n\t\t\t\t\t\t\t\t\t\t\t\t\t
Phone Number
\n\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t setShowEditModal(true)}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tEdit or Create User\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{userDetails && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetOrderBill(e.target.value)\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetMaxUsableCredit(parseFloat(e.target.value) * 0.2)\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"form-control\"\n\t\t\t\t\t\t\t\t\t\t\t\tid=\"orderBill\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"Order Bill\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{/*
\n
Maximum usable credits (20%)
\n
*/}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t

Maximum usable credit:

\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t{maxUsableCredits > totalCredits\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? totalCredits\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: maxUsableCredits}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t

Total Credits:

\n\t\t\t\t\t\t\t\t\t\t\t{totalCredits}\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{credits\n\t\t\t\t\t\t\t\t\t\t\t\t.sort(\n\t\t\t\t\t\t\t\t\t\t\t\t\t(a, b) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew Date(b.createdAt) - new Date(a.createdAt)\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t.map((credit, index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{credit.credit_type === 'expired'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'Expired'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'Order #' + credit.order.order_id}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{displayDate(new Date(credit.createdAt))}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{credit.credit_type === 'credit' ? null : '-'}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{`${window.rupeeSym}${credit.credit_amount}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t
\n\t)\n}\n\nexport default withTheme(Loyalty)\n","import React, { Component, Suspense } from 'react';\nimport io from './socket-client';\nimport { AppContext, AppContextProvider } from './contexts/AppContext';\nimport { withTheme } from './contexts/AppContext';\nimport \"./assets/plugins/nucleo/css/nucleo.css\";\nimport \"@fortawesome/fontawesome-free/css/all.min.css\";\nimport \"./assets/scss/argon-dashboard-react.scss\";\n// import \"react-datepicker/dist/react-datepicker.css\";\n// import './App.scss'\n\nimport {\n BrowserRouter as Router,\n Route,\n Redirect,\n Switch,\n} from 'react-router-dom';\n\n import { ToastContainer } from \"react-toastify\";\n// import loadingPng from './img/loading.png'\nimport { Spinner } from 'react-activity'\n// import TopWave from './img/topWave.svg'\n// import BottomWave from './img/bottomWave.svg'\n\n\n//Custom CSS\n// import 'bootstrap/dist/css/bootstrap.min.css';\n// import 'react-select/dist/react-select.css';\nimport 'react-toastify/dist/ReactToastify.css';\n\nimport register from './registerServiceWorker';\n// import StripeRedirect from './StripeRedirectWrapper';\n// import Navbar from './components/Header/Header';\n// import Sidenav from './views/test/Sidenav';\nimport OrderHistory from './dashboardComponents/OrderHistory/OrderHistory';\nimport 'react-activity/dist/react-activity.css';\nimport TimeSlot from './views/TimeSlot/TimeSlot';\nimport './App.css';\nimport Layout from './components/Layout/Layout';\nimport './App.css';\nimport './MediaQuery.css';\nimport NewProfile from './pages/Profile/NewProfile';\nimport OfflienPopup from './components/OfflinePopup/OfflinePopup';\nimport Loyalty from './pages/Loyalties/Loyalty';\n//Import components lazy\nconst SignUpFinal = React.lazy(() => import('./dashboardComponents/signUp/SignUp'));\nconst SignUpDetails = React.lazy(() =>\n import('./dashboardComponents/signUp/details/SignUpDetails')\n);\nconst Profile = React.lazy(() => import('./pages/Profile/Profile'));\nconst Menu = React.lazy(() => import('./dashboardComponents/mainPage/Menu'));\n// const Order = React.lazy(() => import('./dashboardComponents/orders/Orders'));\n// const Menu = React.lazy(() => import('./dashboardComponents/mainPage/Menu'));\nconst Order = React.lazy(() => import('./dashboardComponents/orders/Orders'));\nconst Chef = React.lazy(() => import('./dashboardComponents/kitchen/Kitchen'));\nconst Accounts = React.lazy(() => import('./views/accounts/AccountsView'));\n// const Guests = React.lazy(() => import('./dashboardComponents/guests/Guests'));\nconst Cart = React.lazy(() => import('./dashboardComponents/menu/Cart'));\nconst Servers = React.lazy(() => import('./dashboardComponents/servers/Servers'));\nconst Menu_Order = React.lazy(() => import('./dashboardComponents/menu/Menu'));\n// const Combos = React.lazy(() => import('./dashboardComponents/combos/Combos'));\nconst Offers = React.lazy(() => import('./dashboardComponents/offers/Offers'));\nconst Tables = React.lazy(() => import('./dashboardComponents/tables/Tables'));\nconst Events = React.lazy(() => import('./dashboardComponents/packages/Events'));\nconst Reservation = React.lazy(() => import('./views/reservations/Reservation'));\n\nconst Feedback = React.lazy(() =>\n import('./views/feedback/Feedback')\n);\n\nexport default class App extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n io: io,\n isLoggedin: false\n }\n this.setIsLoggedin = this.setIsLoggedin.bind(this)\n }\n\n setIsLoggedin(userState) {\n this.setState({ isLoggedin: userState })\n }\n\n\n componentDidMount() {\n register();\n }\n\n render() {\n return (\n \n \n
\n \n
\n {/* Wave designs */}\n {/* */}\n {/* */}\n\n {/* TopBar */}\n {/* {this.state.isLoggedin && } */}\n\n {/* Main Container */}\n \n {/* ---- sidenav---- */}\n {/* {this.state.isLoggedin && } */}\n\n {/* --- Main Content --- */}\n \n \n \n \n {/* loading-png */}\n \n
\n \n }\n >\n
\n \n (\n \n )}\n />\n (\n \n )}\n />\n {/* {process.env.REACT_APP_COUNTRY === \"IN\" ? null : } */}\n \n (\n \n )}\n />\n {/* \n */}\n\n {/* {\n return \n
\n

kitchen Page

\n
\n
\n }}/> */}\n \n \n \n \n \n\n \n\n \n \n \n \n {/* */}\n \n\n \n \n \n {/* \n \n \n {/* \n \n \n \n \n \n */}\n
\n
\n \n \n \n \n
\n
\n );\n }\n}\n\nconst PrivateRoute = ({ component: Component, ...rest }) => (\n \n {(context) =>\n \n context.isRestDone ? (\n \n ) : (\n \n )\n }\n />\n }\n \n);\n\nconst UserRoute = ({ component: Component, ...rest }) => (\n \n {(context) =>\n \n context.token ? (\n \n ) : (\n \n )\n }\n />\n }\n \n);\n\nconst PublicRoute = ({ component: Component, ...rest }) => (\n \n {(context) =>\n \n context.isRestDone ?\n (\n \n ) : (\n \n )\n }\n />\n }\n \n);","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://cra.link/PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)\n);\n\nexport function register(config) {\n if ('serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n // const swUrl = `${process.env.PUBLIC_URL}/firebase-messaging-sw.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://cra.link/PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then((registration) => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://cra.link/PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch((error) => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' },\n })\n .then((response) => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then((registration) => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then((registration) => {\n registration.unregister();\n })\n .catch((error) => {\n console.error(error.message);\n });\n }\n}\n","const reportWebVitals = (onPerfEntry) => {\n if (onPerfEntry && onPerfEntry instanceof Function) {\n import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n getCLS(onPerfEntry);\n getFID(onPerfEntry);\n getFCP(onPerfEntry);\n getLCP(onPerfEntry);\n getTTFB(onPerfEntry);\n });\n }\n};\n\nexport default reportWebVitals;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorkerRegistration from './serviceWorkerRegistration';\nimport reportWebVitals from './reportWebVitals';\n\n// import {registerServiceWorker} from './serviceWorker';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://cra.link/PWA\nserviceWorkerRegistration.unregister();\n// registerServiceWorker();\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n\n// import \"./plugins/nucleo/css/nucleo.css\";\n// // import \"assets/vendor/@fortawesome/fontawesome-free/css/all.min.css\";\n// import \"./css/argon-dashboard-react.css\";\n// import \"./css/custom.css\";\n// import \"./css/custom_2.css\";\n\n//window.kumbaURL = \"https://api.foodbots.co\";\n\nfunction urlBase64ToUint8Array(base64String) {\n const padding = \"=\".repeat((4 - base64String.length % 4) % 4)\n const base64 = (base64String + padding).replace(/\\-/g, \"+\").replace(/_/g, \"/\")\n\n const rawData = window.atob(base64)\n const outputArray = new Uint8Array(rawData.length)\n\n for (let i = 0; i < rawData.length; ++i) {\n outputArray[i] = rawData.charCodeAt(i)\n }\n return outputArray;\n}\n\nwindow.vapidPublicKey = process.env.REACT_APP_VAPID_PUBLIC_KEY;\nwindow.convertedVapidKey = urlBase64ToUint8Array(window.vapidPublicKey);\n\nwindow.kumbaURL = process.env.REACT_APP_BACKEND_URL;\nwindow.rupeeSym =\n process.env.REACT_APP_COUNTRY === 'IN'\n ? '\\u20B9'\n : process.env.REACT_APP_COUNTRY === 'UK'\n ? '\\u00A3'\n : process.env.REACT_APP_COUNTRY === 'US'\n ? '$'\n : '\\u20B9';\n\nwindow.phoneCode = process.env.REACT_APP_PHONE_CODE || \"+91\";\n\nwindow.googleCountriesList = process.env.REACT_APP_COUNTRY === \"IN\" ? ['in'] : \n process.env.REACT_APP_COUNTRY === \"UK\" ? ['gb', 'be', 'ro'] :\n process.env.REACT_APP_COUNTRY === \"US\" ? ['us'] : ['in'];\nwindow.server_roles = {\n chef : 4,\n bartender : 4,\n server: 1,\n waiter: 2,\n steward: 3,\n captain: 4,\n supervisor: 5,\n manager: 6,\n director: 7,\n general_manager: 8,\n owner: 9\n};"],"sourceRoot":""}