{"version":3,"sources":["components/Common/MessageBox.tsx","pages/NotFoundPage.tsx","api/agent.ts","stores/userStore.ts","stores/commonStore.ts","stores/categoryStore.ts","utils/Utils.ts","stores/orderStore.ts","stores/timeSlotStore.ts","stores/rootStore.ts","components/login/LoginBox.tsx","api/agentPostCode.ts","components/login/GuestBox.tsx","components/Common/Loader.tsx","components/Common/LoadingComponent.tsx","pages/HomePage.tsx","components/Common/PrivateRoute.tsx","components/Layout/Navbar.tsx","components/Layout/Header.tsx","components/Toolbar/ToolbarButton.tsx","components/Toolbar/Toolbar.tsx","components/Products/ProductItem.tsx","components/Common/Dialog.tsx","components/Alterations/AlterationsDuplicateAlertDialog.tsx","components/Alterations/AlterationForm.tsx","components/Alterations/AlterationRow.tsx","components/Alterations/AlterationGridHeader.tsx","components/Alterations/AlterationGrid.tsx","components/Alterations/AlterationFooter.tsx","components/Alterations/AlterationNoteEditDialog.tsx","components/Alterations/AlterationsTypeEditDialog.tsx","components/Alterations/AlterationDialog.tsx","components/Alterations/AlterationGroupHeader.tsx","components/Alterations/AlterationGroupRow.tsx","components/Alterations/AlterationEditDialog.tsx","components/Alterations/AlterationsTypeDialog.tsx","components/Products/ProductList.tsx","components/Layout/Footer.tsx","components/Products/ProductFooter.tsx","components/Basket/OrderDetailRow.tsx","components/Basket/BasketOrderDetails.tsx","components/Basket/BasketDialog.tsx","pages/OrderBookingPage.tsx","components/Basket/CollectionTimeSlot/CollectionTimeSlotHeaderButton.tsx","components/Basket/CollectionTimeSlot/CollectionTimeSlotHeader.tsx","components/Basket/CollectionTimeSlot/CollectionTimeSlotRow.tsx","components/Basket/CollectionTimeSlot/CollectionTimeSlotGrid.tsx","components/Basket/CollectionTimeSlot/CollectionTimeSlotDialog.tsx","components/Basket/DeliveryTimeSlot/DeliveryTimeSlotHeaderButton.tsx","components/Basket/DeliveryTimeSlot/DeliveryTimeSlotHeader.tsx","components/Basket/DeliveryTimeSlot/DeliveryTimeSlotRow.tsx","components/Basket/DeliveryTimeSlot/DeliveryTimeSlotGrid.tsx","components/Basket/DeliveryTimeSlot/DeliveryTimeSlotDialog.tsx","components/Basket/CollectionTimeSlot/CollectionTimeSlotBox.tsx","components/Basket/DeliveryTimeSlot/DeliveryTimeSlotBox.tsx","components/Basket/DeliveryDetails.tsx","components/Basket/OrderDetails.tsx","components/Basket/BasketTotals.tsx","components/Basket/BasketFooter.tsx","components/Basket/NameAddress.tsx","components/Basket/PaymentDetails/CustomerCard.tsx","components/Basket/PaymentDetails/PaymentDetails.tsx","components/WorldPay/WorldPayDialog.tsx","components/Stripe/StripeDialog.tsx","components/Stripe/StripeDialogWrapper.tsx","pages/BasketPage.tsx","components/Orders/MyOrdersFooter.tsx","components/Orders/MyOrdersGrid.tsx","components/Orders/AppOrdersList.tsx","components/Orders/MyOrderStatus.tsx","components/Orders/BundleOrdersList.tsx","components/Orders/BundleOrderGroup.tsx","components/Common/BackToOrdersFooter.jsx","components/Subscriptions/ChangeSlotRow.tsx","components/Subscriptions/ChangeSlotGrid.tsx","components/Subscriptions/ChangeSlotHeader.tsx","components/Subscriptions/ChangeSlotDialog.tsx","pages/MyOrdersPage.tsx","components/NewCustomer/ContactDetails.tsx","components/Profile/ProfilePersonalDetails.tsx","components/Profile/ProfileFooter.tsx","components/Profile/CardDetailRow.tsx","components/Profile/CardDetails.tsx","components/Common/PasswordBox.tsx","pages/ProfilePage.tsx","components/Offers/CurrentOffers.tsx","components/Offers/SpecialPrices.tsx","pages/MyOffersPage.tsx","pages/InfoPage.tsx","components/NewCustomer/PersonalDetails.tsx","components/NewCustomer/NewCustomerFooter.tsx","pages/NewCustomerPage.tsx","components/login/ResetPasswordBox.tsx","pages/ResetPasswordPage.tsx","components/login/ForgotPasswordBox.tsx","pages/ForgotPasswordPage.tsx","components/ContactUs/ContactUsForm.tsx","components/ContactUs/SupportDetails.tsx","pages/ContactUsPage.tsx","components/Subscriptions/RegularVisits.tsx","components/Subscriptions/ScheduledVisits.tsx","pages/MySubscriptions.tsx","components/Document/DocumentSection.tsx","pages/DocumentPage.tsx","components/Document/FAQQuestion.tsx","components/Document/FAQSection.tsx","pages/FAQsPage.tsx","pages/CardStatusPage.tsx","App.tsx","hooks/useIsLoaded.tsx","index.tsx"],"names":["MessageBox","title","message","className","data-alter-title","NotFoundPage","axios","defaults","baseURL","process","interceptors","response","use","undefined","error","toast","status","headers","history","push","has","logout","useContext","RootStoreContext","userStore","request","config","token","window","localStorage","getItem","Authorization","Promise","reject","responseBody","data","url","get","then","body","post","put","delete","Shop","list","uid","checkshopuid","User","current","login","user","guest","forgotpassword","forgotPwd","resetpassword","reset","verifypassword","password","encodeURIComponent","Customer","customer","savecustomer","updatecustomer","verifycustomer","mobileno","emailid","myoffers","myspecialprice","CustomerCards","customercards","addnewcard","card","setdefaultcard","deactivatecard","createstripeintent","cancelstripeintent","id","addnewstripecard","Category","maincategory","subcategory","altercategory","alterations","TimeSlot","defaultCollection","orderDate","postCode","defaultDelivery","collectionDate","weeklyCollection","fromDate","weeklyDelivery","slotfordate","forDate","Order","saveOrder","order","updateOrder","checkVoucher","voucherCode","getOrder","getUnPickedOrders","getPickedOrders","getOrdersInProcessing","getOrdersReady","getOrdersOnDelivery","getOrdersDelivered","Visit","regular","scheduled","updateSlot","visitUniqueRecId","slotUniqueRecId","uniqueRecId","visitById","Support","supportdetails","appKey","shopCode","sendcontactform","contactForm","Document","terms","privacy","faqs","UserStore","rootStore","this","isCustomer","observable","action","value","passwordVerified","cardSaveError","customerCards","forEach","c","runInAction","defaultCardUID","isDefault","computed","showLogin","showForgotPassword","showCardDialog","values","a","agent","isAllowed","resetKey","setShowLogin","commonStore","setToken","prevRoute","orderStore","orderDetails","length","reCalculatePrices","currentShop","itemSelectionOptions","errorMessage","notAllowed","clearOrderDetails","clearOrder","clearBasketValues","timeSlotStore","clearTimeslots","setPrevRoute","shopUID","location","pathname","toString","console","log","accountCode","firstName","middleName","surname","address1","address2","address3","address4","mobileNo","substr","emailId","MD5","toUpperCase","deliveryNotes","membershipType","cardCustomerId","res","updateDefaultCustomerCard","customerInfo","code","description","savingCard","stripeIntent","result","hideNewCardDialog","setDefaultCard","cards","find","filter","cardUID","loadingMyOffers","offers","myOffers","loadingMyPriceGrid","pricematrix","myPriceGrid","CommonStore","reaction","setItem","removeItem","shop","pr","sessionStorage","prefilledPostCode","faqsURL","termsURL","privacyURL","loadingDocument","doc","document","pRoute","appLoaded","invalidShopCode","valid","validShopCode","setShopUID","loadShops","shops","setInvalidShopCode","setAppLoaded","catch","s","toLowerCase","supportDetails","CategoryStore","type","alterationsType","updated","alterationUpdated","alterationTypeUpdated","loadingMainCategories","categories","mainCategories","sort","b","position","finally","groupName","selectedMainCategory","loadingSubCategories","subcategories","subCategories","loadingAlterCategories","alterSubCategories","alterCategories","alterMainCategories","loadingAlterations","alterationDialogEditMode","showAlterationDialog","item","mLineNo","selectedItem","selectedMainLineNo","showAlterationsTypeDialog","alterationsTypeEditMode","mainLineNo","showAlterationEditDialog","selectedAlterCategory","selectedAlteration","addHours","date","hours","actualDate","Date","setTime","getTime","addDays","days","setDate","getDate","formatDate","timeString","getHours","getMinutes","year","getFullYear","month","getMonth","day","displayDateTime","displayDate","getDateString","getDateStringEx","dayNumber","suffix","getDayName","getMonthName","getDateFullNameString","getDayFullName","getMonthFullName","getTimeString","time","substring","getDay","customerAddressWithoutPostcode","fullAddress","OrderStore","restoreOrderDetails","odString","JSON","parse","initBasketValues","confirmPassword","orderNotes","discountCode","headerDiscount","grossAmount","minCharge","collectFromShop","restoreBasketValues","bvString","getLastMainLineNo","detail","currentOrder","stringify","details","basketValues","bv","orderSaved","os","mainAlterationDetail","alterationCode","total","pieces","itemType","quantity","lineTotal","discount","tt","turnAroundTime","loading","loadingOrder","parseInt","saved","loadingUnPickedOrders","loadingPickedOrders","loadingOrdersInProcess","loadingOrdersOnDelivery","loadingOrdersDelivered","voucher","discountVoucher","slot","visitSlot","selectedVisitUID","show","showChangeSlotDialog","showBasket","orderNo","totalQuantity","totalPieces","netAmount","vatAmount","totalGrossAmount","grandTotal","deliveryCharges","collectionCharges","lineDiscount","totalDiscount","cCampUniqueRecID","collectionSlot","deliverySlot","cardUniqueRecId","orderDetail","od","scUnique","alteration","pmPrice","lineNo","mainCategory","subCategory","itemName","stkCode","discountQty","price","discountType","notes","mainDetail","alter","mainDetails","d","removeAllAlterations","removeAlteration","removeAllFromOrder","savingOrder","minOrderValue","discPercent","discApplied","offerType","percentDiscount","index","parseFloat","toFixed","html","orderSaveMessage","setMessage","replace","slotDate","slotTimeFrom","slotTimeTo","shopTelephone","reviewLink","setOrderSaved","orderno","resetTurnAroundTime","categoryStore","loadSubCategories","loadCategories","subCat","sc","setTurnAroundTime","setLoadingOrder","loadingRegularVisits","regularVisits","loadingScheduledVisits","scheduledVisits","visitUID","slotUID","ordersType","loadScheduledVisit","getOrdersInProcess","uniqueRedId","v","setLoadingUnPickedOrders","unPickedOrders","setLoadingPickedOrders","pickedOrders","setLoadingOrdersInProcess","ordersInProcess","loadingOrdersReady","setLoadingOrdersReady","ordersReady","setLoadingOrdersOnDelivery","ordersOnDelivery","setLoadingOrdersDelivered","ordersDelivered","TimeSlotStore","restoreTimeslot","key","collection","delivery","showCollectionTimeSlots","showDeliveryTimeSlots","loadingDefaultCollection","noCollectionSlot","minInterval","timeSlot","setDefaultCollection","noDeliverySlot","loadingDefaultDelivery","minTurnAround","setDefaultDelivery","loadingCollectionSlots","slots","weeklyCollectionSlots","err","loadingCollectionSlotsForDate","ts","t","timeSlotDate","collectionSlotsForDate","loadingDeliverySlots","weeklyDeliverySlots","loadingDeliverySlotsForDate","deliverySlotsForDate","some","loadingSlots","slotsForDate","configure","enforceActions","createContext","LoginBox","observer","useState","username","rememberMe","loginValues","setLoginValues","useEffect","validate","combineValidators","isRequired","initialValues","onSubmit","FORM_ERROR","render","handleSubmit","submitError","submitting","invalid","pristine","dirtySinceLastSubmit","name","input","meta","tabIndex","placeholder","touched","map","shopName","to","disabled","href","onClick","e","preventDefault","PostCodeLookUp","lookUp","GuestBox","errorMsg","setErrorMsg","guestValues","setGuestValues","postCodeValidate","Loader","LoadingComponent","HomePage","match","setCurrentShop","CheckShopCodeValid","isLoggedIn","params","noItemSelect","src","logoPath","appDocUrl","alt","PrivateRoute","Component","component","rest","props","Navbar","signIn","hasOrderTracking","hasSubsciption","hasRegularVisits","displayName","Header","showCompanyName","htmlFor","ToolbarButton","category","selectMainCategory","confirmAlert","customUI","onClose","noItemPrompt","split","np","groupImage","groupMOImage","Toolbar","uniqueRecID","ProductItem","showAlterationsEdit","setShowAlterationsTypeDialog","setAlterationUpdated","getOrderDetailForItem","initOrderDetail","getAlterationDetailsForItem","addToOrder","removeFromOrder","updateOrderDetail","incrementMainLineNo","setOrderDetail","setAlterations","alterationPrice","setAlterationPrice","alterationQty","setAlterationQty","showNotes","setShowNotes","setNotes","refreshAlterationTotals","ReactTooltip","rebuild","qty","handleUpdateOrderDetail","handleAddToOrder","scPrice","itemImage","buttonCaption","hasUserNotes","data-tip","hasAlterations","onChange","event","target","onKeyPress","keyCode","which","onBlur","Dialog","children","showDialog","hideDialog","saveData","saveDisabled","saveLabel","hasScroll","AlterationsDuplicateAlertDialog","repair","AlterationForm","loadAlterCategories","loadAlterations","setSelectedAlterCategory","setSelectedAlteration","resetAlterations","alterType","alterValues","setAlterValues","showDuplicateAlert","setShowDuplicateAlert","duplicateRepair","setDuplicateRepair","setLineNo","setMainOrderDetail","mcUniques","mcUnique","mainOD","saveAlterations","ln","mutators","setValue","state","utils","field","changeValue","form","globalThis","cat","handleAlterCategoryChange","handleAlterationChange","AlterationRow","removeOrderDetail","editOrderDetail","AlterationGridHeader","handleAlterTypeEdit","AlterationGrid","handleRemoveAlteration","editAlterationNote","data-alter-grid","AlterationFooter","totalPrice","setTotalPrice","totalQty","setTotalQty","AlterationNoteEditDialog","updateAlterationNote","note","setNote","AlterationsTypeEditDialog","defaultType","saveDialog","setAlterType","handleAlterationTypeChange","checked","AlterationDialog","hideAlterations","setAlterationsType","addAlterations","updateAlterations","getAlterationDetails","removedAlterations","setRemovedAlterations","showEditAlterationNote","setShowEditAlterationNote","showAlterationType","setShowAlterationType","alterationsMessage","alterationDetail","AlterationGroupHeader","setShowAlterationTypeDialog","AlterationGroupRow","AlterationEditDialog","showAlterationsAddEdit","hideAlterationsEdit","setAlterationTypeUpdated","deleteAlteration","alterationGroups","setAlterationGroups","groupAlterations","orders","ord","showAlterations","hideAlterationsTypeDialog","setMainAlterationDetail","getMainAlterationDetails","updateAlterationsType","ProductList","Footer","ProductsFooter","setShowBasket","style","clear","OrderDetailRow","deleteOrderDetail","BasketOrderDetails","handleDiscardChanges","d1","d2","handleCheckOut","OrderBookingPage","resetOrder","CollectionTimeSlotHeaderButton","dayName","selectedDay","setSelectedDay","collectionSlotsAvailable","dayNo","setDayNo","enabled","setEnabled","CollectionTimeSlotHeader","timeSlotDay","CollectionTimeSlotRow","localTimeSlot","setTimeSlot","CollectionTimeSlotGrid","getCollectionSlotsForDate","ds","CollectionTimeSlotDialog","setLocalTimeSlot","localSelectedDay","setLocalSelectedDay","DeliveryTimeSlotHeaderButton","deliverySlotsAvailable","DeliveryTimeSlotHeader","DeliveryTimeSlotRow","DeliveryTimeSlotGrid","getDeliverySlotsForDate","DeliveryTimeSlotDialog","CollectionTimeSlotBox","handleClick","DeliveryTimeSlotBox","DeliveryDetails","setShowCollectionTimeSlots","setShowDeliveryTimeSlots","getDefaultCollection","getDefaultDelivery","loadWeeklyCollectionSlots","loadWeeklyDeliverySlots","setBasketValues","rows","OrderDetails","BasketTotals","formValues","clearVoucher","setHeaderDiscount","setDiscountVoucher","voucherError","setVoucherError","handleApply","dv","amount","flatDiscount","minimumSpend","maximumSpend","minMaxAfterDiscount","hasVouchers","validateFields","BasketFooter","NameAddress","fullName","allMatches","firstMatch","secondMatch","customerFullName","customerFullAddress","CustomerCard","customerCard","defaultChecked","cardType","cardNumber","cardExpiry","PaymentDetails","getCustomerCards","showNewCardDialog","currentCard","setCurrentCard","WorldPayDialog","saveNewCard","setCardSaveError","showError","setShowError","scriptLoaded","setScriptLoaded","handleSave","paymentMethod","expDate","expiryMonth","expiryYear","stDate","startMonth","startYear","address","postcode","maskedCardNumber","expiryDate","issueNo","issueNumber","referenceCode","startDate","payProvider","cardProvider","script","createElement","async","onload","Worldpay","useTemplateForm","cardKey","images","appendChild","removeChild","submitTemplateForm","method","width","StripeDialog","saveNewStripeCard","cancelStripeIntent","stripe_api","useStripe","stripe_elements","useElements","handleCancel","returnURL","protocol","host","confirmSetup","elements","confirmParams","return_url","redirect","setupIntent","payment_method","StripeDialogWrapper","createStripeIntent","stripePromise","setStripePromise","stripeOptions","setStripeOptions","secret","clientSecret","appearance","loadStripe","stripe","options","BasketPage","createOrder","errors","hasCardModule","cardDialog","args","hasCredit","MyOrdersFooter","deliveryVisit","setOrdersType","editOrder","setVisitSlot","setShowChangeSlotDialog","setSelectedVisitUID","timeSlotField","setTimeSlotField","currentDate","setCurrentDate","getVisit","cutOffOrderEdit","handleChangeOrder","MyOrdersGrid","i","AppOrdersList","orderType","handleSetOrderType","deliveryDate","MyOrderStatus","BundleOrdersList","dateFieldText","BundleOrderGroup","bundle","BackToOrdersFooter","ChangeSlotRow","ChangeSlotGrid","ChangeSlotHeader","selectedDate","setSelectedDate","defaultValue","ChangeSlotDialog","selectedSlot","loadSlotsForDate","dateValues","getDateFromString","MyOrdersPage","changeVisitSlot","showDelivered","setShowDelivered","ContactDetails","readOnly","ProfilePersonalDetails","ProfileFooter","CardDetailRow","deactivateCustomerCard","CardDetails","PasswordBox","verifyPassword","setPasswordVerified","saveError","setSaveError","ProfilePage","updateCustomer","customerValues","setCustomerValues","CurrentOffers","loadMyOffers","offer","SpecialPrices","loadMyPriceGrid","MyOffersPage","InfoPage","dangerouslySetInnerHTML","__html","PersonalDetails","NewCustomerFooter","NewCustomerPage","saveCustomer","verifyCustomer","ResetPasswordBox","resetPassword","resetPasswordValues","setResult","setSubmitting","ResetPasswordPage","setLoading","setResetKey","searchParams","URLSearchParams","search","_shopuid","decryptResetKey","decodeURIComponent","colourScheme","colorScheme","Object","keys","endsWith","documentElement","setProperty","ForgotPasswordBox","doForgotPassword","forgotPasswordValues","setForgotPasswordValues","currentTarget","goBack","ForgotPasswordPage","ContactUsForm","setSubmitted","SupportDetails","companyName","support","supportFullAddress","phoneNo","workingHours","wh","isClosed","timeFrom","timeTo","ContactUsPage","getSupportDetails","sendContactForm","contactFormValues","setContactFormValues","submitted","isSuccess","setIsSuccess","RegularVisits","loadRegularVisits","visit","ScheduledVisits","deleteVisit","setUniqueRecId","purpose","MySubscriptionsPage","DocumentSection","section","heading","subHeading","paragraphs","para","paragraphNo","paragraphText","DocumentPage","docType","loadTerms","loadPrivacy","sections","FAQQuestion","question","answer","showAnswer","setShowAnswer","FAQSection","qandAs","qandA","questionNo","FAQsPage","loadFAQs","CardStatusPage","setIntentId","setClientSecret","retrieveSetupIntent","redirectToPrevious","withRouter","setTermsURL","setPrivacyURL","setFAQsURL","setPrefilledPostCode","getUser","isLoaded","setIsLoaded","instanceId","getValues","createInstanceId","setValues","val","currentInstance","timeStamp","setInstanceObject","newInstance","setInterval","onunload","s4","Math","floor","random","useIsLoaded","loginValue","setLoginValue","setPostCode","termsUrl","startsWith","privacyUrl","faqUrl","exact","path","createBrowserHistory","ReactDOM","getElementById"],"mappings":"6jBAMaA,EAA+B,SAAC,GAEtC,IADLC,EACI,EADJA,MAAOC,EACH,EADGA,QAEP,OACE,yBAAKC,UAAU,uBACb,yBAAKA,UAAU,eACb,yBAAKA,UAAU,qBACb,wBAAIC,oBAAA,GAAkBH,IAExB,yBAAKE,UAAU,oBACb,2BAAID,OCbDG,EAAe,WAC1B,OACE,kBAAC,EAAD,CAAYJ,MAAM,qBAAqBC,QAAQ,iD,8FCYnDI,IAAMC,SAASC,QAAUC,OAEzBH,IAAMI,aAAaC,SAASC,SAAIC,GAAW,SAACC,GACpB,kBAAlBA,EAAMZ,SAAgCY,EAAMH,UAC9CI,IAAMD,MACJ,4EAHgD,MAMxBA,EAAMH,SAA1BK,EA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GAAD,CAAcogB,OAAK,EAACC,KAAM,WAAYngB,UAAW4X,KACjD,kBAAC9X,GAAD,CAAcogB,OAAK,EAACC,KAAM,mBAAoBngB,UAAWqc,KACzD,kBAACvc,GAAD,CAAcogB,OAAK,EAACC,KAAM,YAAangB,UAAWqY,KAClD,kBAACvY,GAAD,CAAcogB,OAAK,EAACC,KAAM,cAAengB,UAAW8d,KACpD,kBAAC,IAAD,CAAOoC,OAAK,EAACC,KAAM,SAAU/iB,OAAQ,SAAC8C,GAAD,OAAW,kBAAC4c,GAAD,eAAcC,QAAS,SAAa7c,OACpF,kBAAC,IAAD,CAAOggB,OAAK,EAACC,KAAM,WAAY/iB,OAAQ,SAAC8C,GAAD,OAAW,kBAAC4c,GAAD,eAAcC,QAAS,WAAe7c,OACxF,kBAACJ,GAAD,CAAcogB,OAAK,EAACC,KAAM,QAASngB,UAAW4d,KAC9C,kBAAC,IAAD,CAAOsC,OAAK,EAACC,KAAM,kBAAmBngB,UAAWya,KACjD,kBAAC,IAAD,CAAOyF,OAAK,EAACC,KAAM,iBAAkBngB,UAAWmZ,KAChD,kBAAC,IAAD,CAAO+G,OAAK,EAACC,KAAM,aAAcngB,UAAWsb,KAC5C,kBAAC,IAAD,CAAO4E,OAAK,EAACC,KAAM,OAAQngB,UAAWb,eEjHvC9f,GAAU+gC,cACvBC,IAASjjB,OACP,kBAAC,IAAD,CAAQ/d,QAASA,IACf,kBAAC,GAAD,OAEF4M,SAASq0B,eAAe,W","file":"static/js/main.f08b2e54.chunk.js","sourcesContent":["import React from \"react\";\r\n\r\ninterface IProps {\r\n title: string;\r\n message: string;\r\n}\r\nexport const MessageBox: React.FC = ({\r\n title, message\r\n}) => {\r\n return (\r\n
\r\n
\r\n
\r\n

{title}

\r\n
\r\n
\r\n

{message}

\r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { MessageBox } from \"../components/Common/MessageBox\";\r\n\r\nexport const NotFoundPage = () => {\r\n return (\r\n \r\n );\r\n};\r\n","import axios, { AxiosResponse } from \"axios\";\r\nimport { IUser, IGuest, ILogin, ICustomer, IResetPassword, IForgotPassword, ICustomerProfile } from \"../models/user\";\r\nimport { IShop } from \"../models/shop\";\r\nimport { IMainCategory, IPriceMatrixItem, ISubCategory } from \"../models/category\";\r\nimport { toast } from \"react-toastify\";\r\nimport { ITimeSlot, ITimeSlotsDTO, IOrder, IAppOrderEntity, IBundleOrderGroupEntity } from \"../models/order\";\r\nimport { IVoucher, IVoucherListItem } from \"../models/voucher\";\r\nimport { ICustomerCard, INewCard, INewStripeCard } from \"../models/cards\";\r\nimport { IApiResponse, IApiResponseT } from \"../models/apiresponse\";\r\nimport { IContactForm, ISupportDetails } from \"../models/support\";\r\nimport { IRegularVisit, IScheduledVisit } from \"../models/visit\";\r\nimport { history } from \"../index\";\r\nimport { useContext } from \"react\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\nimport { IDocument, IFAQs } from \"../models/document\";\r\nimport { IStripeIntent } from \"../models/stripe_models\";\r\n\r\naxios.defaults.baseURL = process.env.REACT_APP_API_URL;\r\n\r\naxios.interceptors.response.use(undefined, (error) => {\r\n if (error.message === \"Network Error\" && !error.response) {\r\n toast.error(\r\n \"A network error occured. The server is either not responding or is down.\"\r\n );\r\n }\r\n const { status, headers } = error.response;\r\n if (status === 404 && error.response) {\r\n history.push(\"/\");\r\n // toast.error(\"The resource you are trying to access cannot be found! (404)\");\r\n }\r\n if(status === 401 && headers.has('Token-Expired')){\r\n toast.error(\"Your session has expired! Please login again to continue.\");\r\n const rootStore = useContext(RootStoreContext);\r\n const { logout } = rootStore.userStore;\r\n logout();\r\n }\r\n\r\n /*if (\r\n status === 401 &&\r\n headers[\"www-authenticate\"].includes(\r\n 'Bearer error=\"invalid_token\", error_description=\"The token expired at'\r\n )\r\n ) {\r\n window.localStorage.removeItem(\"jwt\");\r\n history.push(\"/\");\r\n console.log(\"Your session has expired, please login again.\");\r\n }\r\n if (\r\n status === 400 &&\r\n config.method === \"get\" &&\r\n Object.prototype.hasOwnProperty.call(data.errors, \"id\")\r\n ) {\r\n // data.errors.hasOwnproperty(\"id\") throws error so changed it\r\n history.push(\"/notfound\");\r\n }\r\n if (status === 400 && config.method === \"put\") {\r\n console.log(error.response);\r\n }\r\n*/\r\n\r\n if (status === 500) {\r\n toast.error(\"A server error occured. Please contact the administrator\");\r\n }\r\n throw error.response;\r\n});\r\n\r\naxios.interceptors.request.use(\r\n (config) => {\r\n const token = window.localStorage.getItem(\"mdc_jwt\");\r\n if (token) config.headers.Authorization = `Bearer ${token}`;\r\n return config;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n }\r\n);\r\n\r\nconst responseBody = (response: AxiosResponse) => response.data;\r\n\r\nconst request = {\r\n get: (url: string) => axios.get(url).then(responseBody),\r\n post: (url: string, body: {}) => axios.post(url, body).then(responseBody),\r\n put: (url: string, body: {}) => axios.put(url, body).then(responseBody),\r\n del: (url: string) => axios.delete(url).then(responseBody)\r\n};\r\n\r\nconst Shop = {\r\n list: (uid: string): Promise => request.get(`/shop/${uid}`),\r\n checkshopuid: (uid: string) : Promise => request.get(`/shop/check/${uid}`)\r\n};\r\n\r\nconst User = {\r\n current: (): Promise => request.get(\"/user\"),\r\n login: (user: ILogin): Promise => request.post(\"/user/login\", user),\r\n guest: (user: IGuest): Promise => request.post(\"/user/guest\", user),\r\n forgotpassword: (forgotPwd: IForgotPassword): Promise => request.post(\"/user/password/forgot\", forgotPwd),\r\n resetpassword: (reset: IResetPassword): Promise => request.post(\"/user/password/reset\", reset),\r\n verifypassword: (password: string): Promise => request.get(`/user/verify/${encodeURIComponent(password)}`),\r\n};\r\n\r\nconst Customer = {\r\n customer: (): Promise => request.get(\"/customer\"),\r\n savecustomer: (customer: ICustomer): Promise => request.post(\"/customer/update\", customer),\r\n updatecustomer: (customer: ICustomerProfile) : Promise => request.post(\"/customer/profile\", customer),\r\n verifycustomer: (mobileno: string, emailid: string): Promise => request.get(`/customer/verify/${encodeURIComponent(mobileno)}/${encodeURIComponent(emailid)}`),\r\n myoffers: () : Promise => request.get(\"/customer/offers\"),\r\n myspecialprice: () : Promise => request.get(\"/customer/pricematrix\")\r\n};\r\n\r\nconst CustomerCards = {\r\n customercards: (): Promise => request.get(\"/customercards\"),\r\n addnewcard: (card: INewCard): Promise> => request.post(\"/customercards/new\",card),\r\n setdefaultcard: (card: ICustomerCard) => request.post(\"/customercards/default\",card),\r\n deactivatecard: (card: ICustomerCard) => request.post(\"/customercards/inactive\",card),\r\n createstripeintent: (): Promise> => request.get(\"/customercards/stripe/intent\"),\r\n cancelstripeintent: (id: string): Promise => request.del(`/customercards/stripe/intent/cancel/${id}`),\r\n addnewstripecard: (card: INewStripeCard): Promise> => request.post(\"/customercards/new/stripe\",card)\r\n}\r\n\r\nconst Category = {\r\n maincategory: (): Promise => request.get(\"/category\"),\r\n subcategory: (id: string): Promise =>\r\n request.get(`/category/${id}`),\r\n altercategory: (id: string): Promise =>\r\n request.get(`/category/alter/${id}`),\r\n alterations: (id: number): Promise =>\r\n request.get(`/category/alter/sub/${id}`),\r\n};\r\n\r\nconst TimeSlot = {\r\n defaultCollection: (\r\n orderDate: string,\r\n postCode: string\r\n ): Promise =>\r\n request.get(\r\n `/timeslot/collection/${encodeURIComponent(\r\n postCode\r\n )}?OrderDate=${encodeURIComponent(orderDate)}`\r\n ),\r\n defaultDelivery: (\r\n collectionDate: string,\r\n postCode: string\r\n ): Promise =>\r\n request.get(\r\n `/timeslot/delivery/${encodeURIComponent(\r\n postCode\r\n )}?Collectiondate=${encodeURIComponent(collectionDate)}`\r\n ),\r\n weeklyCollection: (\r\n fromDate: string,\r\n postCode: string\r\n ): Promise =>\r\n request.get(\r\n `/timeslot/collection/week/${encodeURIComponent(\r\n postCode\r\n )}?OrderDate=${encodeURIComponent(fromDate)}`\r\n ),\r\n weeklyDelivery: (fromDate: string, postCode: string): Promise =>\r\n request.get(\r\n `/timeslot/delivery/week/${encodeURIComponent(\r\n postCode\r\n )}?CollectionDate=${encodeURIComponent(fromDate)}`\r\n ),\r\n slotfordate: (forDate: string, postCode: string): Promise => request.get(`/timeslot/${encodeURIComponent(\r\n postCode\r\n )}?ForDate=${encodeURIComponent(forDate)}`)\r\n};\r\n\r\nconst Order = {\r\n saveOrder: (order: IOrder): Promise => request.post(\"/order/new\", order),\r\n updateOrder: (order: IOrder) : Promise => request.post(\"/order/update\", order),\r\n checkVoucher: (voucherCode: string, orderDate: string): Promise => request.get(`/order/voucher/${encodeURIComponent(voucherCode)}?OrderDate=${encodeURIComponent(orderDate)}`),\r\n getOrder: (uid: string) : Promise => request.get(`/order/${uid}`),\r\n getUnPickedOrders: () : Promise => request.get(\"/order/awaiting\"),\r\n getPickedOrders: () : Promise => request.get(\"/order/pickedup\"),\r\n getOrdersInProcessing: () : Promise => request.get(\"/order/processing\"),\r\n getOrdersReady: () : Promise => request.get(\"/order/ready\"),\r\n getOrdersOnDelivery: () : Promise => request.get(\"/order/ondelivery\"),\r\n getOrdersDelivered: () : Promise => request.get(\"/order/delivered\"),\r\n};\r\n\r\nconst Visit = {\r\n regular: () : Promise => request.get(\"/visit/regular\"),\r\n scheduled: () : Promise => request.get(\"/visit/scheduled\"),\r\n updateSlot: (visitUniqueRecId: string, slotUniqueRecId: string): Promise => request.put(`/visit/update/${visitUniqueRecId}/${slotUniqueRecId}`,{}),\r\n delete: (uniqueRecId: string) : Promise => request.del(`/visit/${uniqueRecId}`),\r\n visitById: (uid: string) : Promise => request.get(`/visit/${uid}`),\r\n}\r\n\r\nconst Support = {\r\n supportdetails: (appKey: string, shopCode: string): Promise => request.get(`/support/${shopCode}?appKey=${encodeURIComponent(appKey)}`),\r\n sendcontactform: (contactForm: IContactForm) : Promise => request.post(\"/support/contact\",contactForm)\r\n};\r\n\r\nconst Document = {\r\n terms: () : Promise => request.get(\"/document/terms\"),\r\n privacy: () : Promise => request.get(\"/document/privacy\"),\r\n faqs: () : Promise => request.get(\"/document/faqs\")\r\n}\r\n\r\nexport default { Shop, User, Customer, CustomerCards, Category, TimeSlot, Order, Visit, Support, Document };\r\n","import { RootStore } from \"./rootStore\";\r\nimport { observable, computed, action, runInAction } from \"mobx\";\r\nimport { IUser, ILogin, IGuest, ICustomer, ICustomerForm, IResetPassword, IForgotPassword, ICustomerProfile } from \"../models/user\";\r\nimport agent from \"../api/agent\";\r\nimport { history } from \"../\";\r\nimport { MD5 } from \"crypto-js\";\r\nimport { ICustomerCard, INewCard, INewStripeCard } from \"../models/cards\";\r\nimport { IApiResponse, IApiResponseT } from \"../models/apiresponse\";\r\nimport { IVoucherListItem } from \"../models/voucher\";\r\nimport { IPriceMatrixItem } from \"../models/category\";\r\nimport { IStripeIntent } from \"../models/stripe_models\";\r\nexport default class UserStore {\r\n rootStore: RootStore;\r\n\r\n constructor(rootStore: RootStore) {\r\n this.rootStore = rootStore;\r\n }\r\n\r\n @observable user: IUser | null = null;\r\n @observable customer: ICustomer | null = null;\r\n @observable customerCards: ICustomerCard[] = [];\r\n @observable showLogin: boolean = false;\r\n @observable showForgotPassword: boolean = false;\r\n @observable defaultCardUID: string = \"\";\r\n @observable showCardDialog: boolean = false;\r\n @observable savingCard: boolean = false;\r\n @observable cardSaveError: string = \"\";\r\n @observable passwordVerified: boolean = false;\r\n @observable loadingMyOffers: boolean = false;\r\n @observable myOffers: IVoucherListItem[] = [];\r\n @observable loadingMyPriceGrid: boolean = false;\r\n @observable myPriceGrid: IPriceMatrixItem[] = [];\r\n @observable stripeIntent: IStripeIntent | undefined;\r\n\r\n @action setPasswordVerified = (value: boolean) => {\r\n this.passwordVerified = value;\r\n }\r\n @action setCardSaveError = (error: string) => {\r\n this.cardSaveError = error;\r\n }\r\n @action setDefaultCard = (card: ICustomerCard) => {\r\n this.customerCards.forEach((c) =>{\r\n if(c.uniqueRecId === card.uniqueRecId){\r\n runInAction(() =>{\r\n this.defaultCardUID = card.uniqueRecId;\r\n card.isDefault = true;\r\n })\r\n }\r\n else\r\n runInAction(() => card.isDefault = false );\r\n })\r\n }\r\n @computed get isLoggedIn() {\r\n return !!this.user;\r\n }\r\n @computed get isCustomer() {\r\n return this.user ? this.user?.isCustomer : false;\r\n }\r\n @action setShowLogin = (value: boolean) => {\r\n this.showLogin = value;\r\n }\r\n @action showForgotPasswordDialog = () =>{\r\n this.showForgotPassword = true;\r\n }\r\n @action hideForgotPasswordDialog = () =>{\r\n this.showForgotPassword = false;\r\n }\r\n @action showNewCardDialog = () => {\r\n this.showCardDialog = true;\r\n } \r\n @action hideNewCardDialog = () =>{\r\n this.showCardDialog = false;\r\n }\r\n @action login = async (values: ILogin) => {\r\n try {\r\n const user = await agent.User.login(values);\r\n if(user.isAllowed){\r\n if(!user.resetKey){\r\n runInAction(() => {\r\n this.user = user;\r\n });\r\n this.setShowLogin(false);\r\n this.rootStore.commonStore.setToken(user.token);\r\n if (!this.rootStore.commonStore.prevRoute){\r\n if(this.rootStore.orderStore.orderDetails.length > 0)\r\n this.rootStore.orderStore.reCalculatePrices();\r\n else\r\n if (this.rootStore.commonStore.currentShop?.itemSelectionOptions === 0)\r\n history.push(\"/basket\");\r\n else\r\n history.push(\"/order\");\r\n }\r\n else {\r\n switch(this.rootStore.commonStore.prevRoute){\r\n case '/order': \r\n history.push(\"/order\");\r\n break;\r\n case '/newcustomer':\r\n history.push(\"/basket\");\r\n break;\r\n case '/basket':\r\n history.push(\"/basket\");\r\n break;\r\n }\r\n }\r\n } else {\r\n /// Reset Key\r\n history.push(`/resetpassword?key=${user.resetKey}&message=${user.errorMessage}`)\r\n }\r\n } else {\r\n // Not Allowed\r\n throw({notAllowed: true, error: user.errorMessage})\r\n }\r\n } catch (error) {\r\n throw error;\r\n }\r\n };\r\n\r\n @action logout = () => {\r\n this.rootStore.commonStore.setToken(null);\r\n this.user = null;\r\n this.customer = null;\r\n this.rootStore.orderStore.clearOrderDetails();\r\n this.rootStore.orderStore.clearOrder();\r\n this.rootStore.orderStore.clearBasketValues();\r\n this.rootStore.timeSlotStore.clearTimeslots();\r\n this.rootStore.commonStore.setPrevRoute(\"\");\r\n history.push(`/${this.rootStore.commonStore.shopUID}`);\r\n };\r\n\r\n @action signIn = () => {\r\n if(window.location.pathname.toString() !== \"/resetpassword\" && window.location.pathname.toString() !== \"/newcustomer\")\r\n this.rootStore.commonStore.setPrevRoute(window.location.pathname.toString());\r\n this.rootStore.commonStore.setToken(null);\r\n this.user = null;\r\n this.customer = null;\r\n this.showLogin = true;\r\n history.push(`/${this.rootStore.commonStore.shopUID}`);\r\n }\r\n\r\n @action guest = async (values: IGuest) => {\r\n try {\r\n const user = await agent.User.guest(values);\r\n runInAction(() => {\r\n this.user = user;\r\n });\r\n if(user){\r\n this.rootStore.commonStore.setToken(user.token);\r\n this.rootStore.orderStore.clearOrderDetails();\r\n this.rootStore.orderStore.clearOrder();\r\n this.rootStore.orderStore.clearBasketValues();\r\n this.rootStore.timeSlotStore.clearTimeslots();\r\n if (this.rootStore.commonStore.currentShop?.itemSelectionOptions === 0) {\r\n history.push(\"/basket\");\r\n this.rootStore.commonStore.setPrevRoute(\"/basket\");\r\n } else {\r\n history.push(\"/order\");\r\n this.rootStore.commonStore.setPrevRoute(\"/order\");\r\n }\r\n }\r\n else\r\n throw \"Sorry, we don't cover your postcode yet!\"\r\n \r\n } catch (error) {\r\n throw error;\r\n }\r\n };\r\n\r\n @action getUser = async () => {\r\n try {\r\n const user = await agent.User.current();\r\n runInAction(() => {\r\n this.user = user;\r\n });\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n };\r\n\r\n @action customerInfo = async () => {\r\n try {\r\n const customer = await agent.Customer.customer();\r\n runInAction(() => {\r\n this.customer = customer;\r\n });\r\n } catch (error) {\r\n runInAction(() => (this.customer = null));\r\n }\r\n };\r\n @action saveCustomer = async (values: ICustomerForm) => {\r\n try {\r\n agent.Customer.savecustomer({\r\n accountCode: \"\",\r\n title: \"\",\r\n firstName: values.firstName,\r\n middleName: values.middleName,\r\n surname: values.surname,\r\n address1: values.address1,\r\n address2: values.address2,\r\n address3: values.address3,\r\n address4: values.address4,\r\n postCode: values.postCode,\r\n mobileNo: `0${values.mobileNo.substr(-10,10)}`,\r\n emailId: values.emailId,\r\n password: MD5(values.password).toString().toUpperCase(),\r\n deliveryNotes: values.deliveryNotes,\r\n membershipType: '',\r\n cardCustomerId: ''\r\n }).then((user) => {\r\n runInAction(() => {\r\n this.user = user;\r\n });\r\n this.rootStore.commonStore.setToken(null);\r\n this.rootStore.commonStore.setToken(user.token);\r\n });\r\n } catch (error) {\r\n throw error;\r\n }\r\n };\r\n\r\n @action updateCustomer = async (customer: ICustomerProfile) => {\r\n agent.Customer.updatecustomer(customer).then((res) => {\r\n if(res){\r\n this.updateDefaultCustomerCard()\r\n this.customerInfo();\r\n }\r\n });\r\n }\r\n\r\n @action verifyCustomer = async (mobileNo: string, emailId:string) : Promise =>{\r\n return await agent.Customer.verifycustomer(mobileNo,emailId)\r\n }\r\n\r\n @action verifyPassword = async(password: string) : Promise => {\r\n return await agent.User.verifypassword(password); \r\n }\r\n\r\n @action doForgotPassword = async (values: IForgotPassword) : Promise => {\r\n try{\r\n return await agent.User.forgotpassword(values);\r\n } catch(error){\r\n if(error) \r\n return {\r\n status: 0,\r\n error: {\r\n code: 101,\r\n description: \"The email id is not registered. Please enter your registered email id.\"\r\n }\r\n }; \r\n throw error;}\r\n }\r\n\r\n @action resetPassword = async (values: IResetPassword) : Promise => {\r\n try{\r\n return await agent.User.resetpassword(values);\r\n } catch(error) { return {\r\n status: 0,\r\n error: {\r\n code: 500,\r\n description: \"An error occured while resetting your password\"\r\n }\r\n }\r\n }\r\n }\r\n \r\n @action createStripeIntent = async () => {\r\n this.savingCard = true;\r\n agent.CustomerCards.createstripeintent()\r\n .then((response) => {\r\n if(response.status === 1 ){\r\n runInAction(() => {\r\n this.stripeIntent = response.result;\r\n this.savingCard = false;\r\n })\r\n if(this.customer!.cardCustomerId === ''){\r\n this.customerInfo();\r\n }\r\n }\r\n else {\r\n runInAction(() => {\r\n this.savingCard = false;\r\n this.cardSaveError = response.error.description;\r\n })\r\n } \r\n })\r\n }\r\n\r\n @action cancelStripeIntent = async () => {\r\n if(this.stripeIntent)\r\n await agent.CustomerCards.cancelstripeintent(this.stripeIntent.id);\r\n }\r\n\r\n @action saveNewStripeCard = async (id: string) => {\r\n this.savingCard = true;\r\n var card: INewStripeCard = { id };\r\n await agent.CustomerCards.addnewstripecard(card).then((response:IApiResponseT) =>{\r\n if(response.status === 1){\r\n runInAction(() => {\r\n this.customerCards = [...this.customerCards,response.result];\r\n this.cardSaveError = \"\";\r\n this.savingCard = false;\r\n this.hideNewCardDialog();\r\n })\r\n this.setDefaultCard(response.result);\r\n }\r\n else{\r\n runInAction(() => {\r\n this.stripeIntent = undefined;\r\n this.savingCard = false;\r\n if(response.error)\r\n this.cardSaveError = response.error.description;\r\n })\r\n }\r\n }) \r\n }\r\n\r\n @action getCustomerCards = async () => {\r\n \r\n agent.CustomerCards.customercards().then((cards:ICustomerCard[]) => {\r\n runInAction(() =>{\r\n this.customerCards = cards;\r\n if(cards.length > 0){\r\n var card = cards.find(card => card.isDefault === true);\r\n if(card)\r\n this.defaultCardUID = card.uniqueRecId;\r\n }\r\n })\r\n } );\r\n }\r\n\r\n @action saveNewCard = async (card: INewCard) => {\r\n this.savingCard = true;\r\n agent.CustomerCards.addnewcard(card).then((response:IApiResponseT) =>{\r\n if(response.status === 1){\r\n runInAction(() => {\r\n this.customerCards = [...this.customerCards,response.result];\r\n this.cardSaveError = \"\";\r\n this.savingCard = false;\r\n this.hideNewCardDialog();\r\n })\r\n this.setDefaultCard(response.result);\r\n }\r\n else{\r\n runInAction(() => {\r\n this.savingCard = false;\r\n this.cardSaveError = response.error.description;\r\n })\r\n }\r\n })\r\n }\r\n\r\n @action updateDefaultCustomerCard = async () => {\r\n var card = this.customerCards.filter(c => c.uniqueRecId === this.defaultCardUID)[0];\r\n if(card)\r\n agent.CustomerCards.setdefaultcard(card);\r\n }\r\n\r\n @action deactivateCustomerCard = async (card: ICustomerCard) => {\r\n const cardUID = card.uniqueRecId;\r\n await agent.CustomerCards.deactivatecard(card).then(()=>{\r\n runInAction(() => {\r\n if(cardUID === this.defaultCardUID) \r\n this.defaultCardUID = \"\";\r\n this.customerCards = [...this.customerCards.filter(c => c.uniqueRecId !== card.uniqueRecId)];\r\n this.cardSaveError = \"\";\r\n this.savingCard = false;\r\n }\r\n )\r\n })\r\n}\r\n@action loadMyOffers = async () => {\r\n this.loadingMyOffers = true;\r\n await agent.Customer.myoffers().then((offers) => {\r\n runInAction(() =>{\r\n this.myOffers = offers;\r\n this.loadingMyOffers = false;\r\n })\r\n })\r\n}\r\n\r\n@action loadMyPriceGrid = async () => {\r\n this.loadingMyPriceGrid = true;\r\n await agent.Customer.myspecialprice().then((pricematrix) => {\r\n runInAction(()=>{\r\n this.myPriceGrid = pricematrix;\r\n this.loadingMyPriceGrid = false;\r\n })\r\n })\r\n}\r\n\r\n}\r\n","import { RootStore } from \"./rootStore\";\r\nimport { reaction, observable, action, runInAction } from \"mobx\";\r\nimport { IShop } from \"../models/shop\";\r\nimport agent from \"../api/agent\";\r\nimport { IContactForm, ISupportDetails } from \"../models/support\";\r\nimport { IDocument, IFAQs } from \"../models/document\";\r\n\r\nexport default class CommonStore {\r\n rootStore: RootStore;\r\n\r\n constructor(rootStore: RootStore) {\r\n this.rootStore = rootStore;\r\n\r\n reaction(\r\n () => this.token,\r\n (token) => {\r\n if (token) {\r\n window.localStorage.setItem(\"mdc_jwt\", token);\r\n } else {\r\n window.localStorage.removeItem(\"mdc_jwt\");\r\n }\r\n }\r\n );\r\n reaction(\r\n () => this.shopUID,\r\n (shop) => {\r\n if (shop) {\r\n window.localStorage.setItem(\"mdc_shop\", shop);\r\n } else {\r\n window.localStorage.removeItem(\"mdc_shop\");\r\n }\r\n }\r\n );\r\n reaction(\r\n () => this.prevRoute,\r\n (pr) => {\r\n if (pr) {\r\n window.sessionStorage.setItem(\"mdc_pr\", pr);\r\n } else {\r\n window.sessionStorage.removeItem(\"mdc_pr\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n @observable token: string | null = window.localStorage.getItem(\"mdc_jwt\");\r\n @observable appLoaded = false;\r\n @observable invalidShopCode = false;\r\n @observable validShopCode = true;\r\n @observable shopUID: string | null = window.localStorage.getItem(\"mdc_shop\");\r\n @observable shops: IShop[] = [];\r\n @observable currentShop: IShop | undefined;\r\n @observable message: string = \"\";\r\n @observable prevRoute: string | null = window.sessionStorage.getItem(\"mdc_pr\");\r\n @observable supportDetails: ISupportDetails | undefined;\r\n @observable termsURL: string = \"\";\r\n @observable privacyURL: string = \"\";\r\n @observable faqsURL: string = \"\";\r\n @observable loadingDocument: boolean = false;\r\n @observable document: IDocument | undefined;\r\n @observable faqs: IFAQs | undefined;\r\n @observable prefilledPostCode: string | undefined;\r\n\r\n @action setPrefilledPostCode = (postCode: string) => {\r\n this.prefilledPostCode = postCode;\r\n }\r\n \r\n @action setFAQsURL = (url: string) =>{\r\n this.faqsURL = url;\r\n }\r\n @action setTermsURL = (url: string) =>{\r\n this.termsURL = url;\r\n }\r\n \r\n @action setPrivacyURL = (url: string) =>{\r\n this.privacyURL = url;\r\n }\r\n\r\n @action loadTerms = () =>{\r\n this.loadingDocument = true;\r\n agent.Document.terms().then(doc =>{\r\n runInAction(() => {\r\n this.document = doc;\r\n this.loadingDocument = false;\r\n })\r\n })\r\n }\r\n\r\n @action loadPrivacy = () =>{\r\n this.loadingDocument = true;\r\n agent.Document.privacy().then(doc =>{\r\n runInAction(() => {\r\n this.document = doc;\r\n this.loadingDocument = false;\r\n })\r\n })\r\n }\r\n\r\n @action loadFAQs = () => {\r\n this.loadingDocument = true;\r\n agent.Document.faqs().then(faqs => {\r\n runInAction(() => {\r\n this.faqs = faqs;\r\n this.loadingDocument = false;\r\n })\r\n })\r\n }\r\n\r\n @action setPrevRoute = (pRoute: string) =>{\r\n if(this.prevRoute !== pRoute)\r\n this.prevRoute = pRoute;\r\n }\r\n @action setMessage = (message: string) => {\r\n this.message = message;\r\n };\r\n @action setToken = (token: string | null) => {\r\n this.token = token;\r\n };\r\n\r\n @action setAppLoaded = () => {\r\n this.appLoaded = true;\r\n };\r\n\r\n @action setInvalidShopCode = () => {\r\n this.invalidShopCode = true;\r\n };\r\n\r\n @action setShopUID = (uid: string) => {\r\n this.shopUID = uid;\r\n };\r\n\r\n @action CheckShopCodeValid = (uid: string) => {\r\n agent.Shop.checkshopuid(uid).then((valid)=>{\r\n runInAction(() => {\r\n this.validShopCode = valid;\r\n this.invalidShopCode = !valid;\r\n })\r\n if(this.validShopCode)\r\n if(this.shopUID !== uid){\r\n this.setShopUID(uid);\r\n this.loadShops();\r\n }\r\n });\r\n }\r\n\r\n @action loadShops = async () => {\r\n if (this.shopUID) {\r\n agent.Shop.list(this.shopUID)\r\n .then((shops) => {\r\n runInAction(() => {\r\n this.shops = shops;\r\n if (shops.length <= 0) {\r\n this.setInvalidShopCode();\r\n this.setAppLoaded();\r\n }\r\n });\r\n })\r\n .catch((error) => {\r\n this.setInvalidShopCode();\r\n this.setAppLoaded();\r\n });\r\n }\r\n };\r\n\r\n @action setCurrentShop = () => {\r\n if (this.shopUID) {\r\n this.currentShop = this.shops.find(\r\n (s) => s.uniqueRecId.toLowerCase() === this.shopUID?.toLowerCase()\r\n );\r\n }\r\n };\r\n\r\n @action getSupportDetails = () => {\r\n if(this.currentShop){\r\n agent.Support.supportdetails(this.currentShop.appKey, this.currentShop.shopCode)\r\n .then((response:ISupportDetails) => {\r\n runInAction(() => {\r\n this.supportDetails = response;\r\n })\r\n });\r\n }\r\n }\r\n\r\n @action sendContactForm = async (contactForm: IContactForm) : Promise => {\r\n return await agent.Support.sendcontactform(contactForm);\r\n }\r\n}\r\n ","import { RootStore } from \"./rootStore\";\r\nimport { action, observable, runInAction } from \"mobx\";\r\nimport { IMainCategory, ISubCategory } from \"../models/category\";\r\nimport agent from \"../api/agent\";\r\n\r\nexport default class CategoryStore {\r\n rootStore: RootStore;\r\n\r\n constructor(rootStore: RootStore) {\r\n this.rootStore = rootStore;\r\n }\r\n\r\n @observable loadingMainCategories = false;\r\n @observable loadingSubCategories = false;\r\n @observable loadingAlterCategories = false;\r\n @observable loadingAlterations = false;\r\n\r\n @observable mainCategories: IMainCategory[] = [];\r\n @observable subCategories: ISubCategory[] = [];\r\n @observable alterMainCategories: IMainCategory[] = [];\r\n @observable alterSubCategories: ISubCategory[] = [];\r\n\r\n @observable selectedItem: ISubCategory | undefined;\r\n @observable selectedMainCategory: IMainCategory | undefined;\r\n\r\n @observable showAlterationsTypeDialog = false;\r\n @observable alterationsTypeEditMode = false;\r\n @observable showAlterationDialog = false;\r\n @observable alterationDialogEditMode = false;\r\n @observable selectedMainLineNo = 0;\r\n @observable showAlterationEditDialog = false;\r\n @observable alterationsType = 0;\r\n @observable alterationUpdated: boolean = false;\r\n @observable alterationTypeUpdated: boolean = false;\r\n @observable selectedAlterCategory: IMainCategory | undefined;\r\n @observable selectedAlteration: ISubCategory | undefined;\r\n\r\n @action setAlterationsType = (type: number) => {\r\n this.alterationsType = type;\r\n }\r\n @action setAlterationUpdated = (updated: boolean) => {\r\n this.alterationUpdated = updated;\r\n };\r\n @action setAlterationTypeUpdated = (updated: boolean) => {\r\n this.alterationTypeUpdated = updated;\r\n }\r\n\r\n @action loadCategories = () => {\r\n this.loadingMainCategories = true;\r\n agent.Category.maincategory()\r\n .then((categories) => {\r\n runInAction(\r\n () =>\r\n (this.mainCategories = categories.sort(\r\n (a, b) => a.position - b.position\r\n ))\r\n );\r\n })\r\n .catch((error) => console.log(error))\r\n .finally(() => runInAction(() => (this.loadingMainCategories = false)));\r\n };\r\n\r\n @action selectMainCategory = (groupName: string) => {\r\n this.selectedMainCategory = this.mainCategories.find(\r\n (c) => c.groupName === groupName\r\n );\r\n };\r\n\r\n @action loadSubCategories = (id: string | undefined) => {\r\n if (id !== undefined) {\r\n this.loadingSubCategories = true;\r\n agent.Category.subcategory(id)\r\n .then((subcategories) => {\r\n runInAction(\r\n () =>\r\n (this.subCategories = subcategories.sort(\r\n (a, b) => a.position - b.position\r\n ))\r\n );\r\n })\r\n .catch((error) => console.log(error))\r\n .finally(() => runInAction(() => (this.loadingSubCategories = false)));\r\n }\r\n };\r\n\r\n @action loadAlterCategories = async (id: string | undefined) => {\r\n if (id) {\r\n this.loadingAlterCategories = true;\r\n runInAction(() => (this.alterSubCategories = []))\r\n agent.Category.altercategory(id)\r\n .then((alterCategories) => {\r\n runInAction(() => (this.alterMainCategories = alterCategories));\r\n })\r\n .catch((error) => console.log(error))\r\n .finally(() =>\r\n runInAction(() => (this.loadingAlterCategories = false))\r\n );\r\n } else {\r\n runInAction(() => {\r\n this.alterMainCategories = [];\r\n this.loadingAlterCategories = false;\r\n });\r\n }\r\n };\r\n\r\n @action loadAlterations = async (id: number | undefined) => {\r\n if(id){\r\n this.loadingAlterations = true;\r\n agent.Category.alterations(id)\r\n .then((alterations) => {\r\n runInAction(() => (this.alterSubCategories = alterations));\r\n })\r\n .catch((error) => console.log(error))\r\n .finally(() => runInAction(() => (this.loadingAlterations = false)));\r\n } else {\r\n runInAction(() => {\r\n this.alterSubCategories = [];\r\n this.loadingAlterations = false;\r\n });\r\n }\r\n };\r\n \r\n @action showAlterations = () => {\r\n this.alterationDialogEditMode = false;\r\n this.showAlterationDialog = true;\r\n };\r\n @action showAlterationsAddEdit = (item: ISubCategory, mLineNo: number) => {\r\n this.selectedItem = item;\r\n this.selectedMainLineNo = mLineNo;\r\n this.alterationDialogEditMode = true;\r\n this.showAlterationDialog = true;\r\n }\r\n @action setShowAlterationsTypeDialog = (item: ISubCategory) => {\r\n this.selectedItem = item;\r\n this.selectedMainLineNo = 0;\r\n this.showAlterationsTypeDialog = true; \r\n this.alterationsTypeEditMode = false;\r\n }\r\n @action setShowAlterationTypeDialog = (mainLineNo: number) => {\r\n this.selectedMainLineNo = mainLineNo;\r\n this.showAlterationsTypeDialog = true;\r\n this.alterationsTypeEditMode = true; \r\n }\r\n @action hideAlterationsTypeDialog = () => {\r\n this.showAlterationsTypeDialog = false;\r\n }\r\n\r\n @action showAlterationsEdit = (item: ISubCategory) => {\r\n this.showAlterationEditDialog = true;\r\n this.selectedItem = item;\r\n }\r\n @action hideAlterationsEdit = () => {\r\n this.showAlterationEditDialog = false;\r\n }\r\n\r\n @action hideAlterations = () => {\r\n this.alterationDialogEditMode = false;\r\n this.showAlterationDialog = false;\r\n };\r\n @action setSelectedAlterCategory = (value: IMainCategory | undefined) => {\r\n this.selectedAlterCategory = value;\r\n }\r\n @action setSelectedAlteration = (value: ISubCategory | undefined) => {\r\n this.selectedAlteration = value;\r\n }\r\n @action resetAlterations = () => {\r\n this.alterMainCategories = [];\r\n runInAction(() => {\r\n this.alterSubCategories = [];\r\n this.selectedAlterCategory = undefined;\r\n this.selectedAlteration = undefined;\r\n })\r\n\r\n }\r\n}","import { ITimeSlot } from \"../models/order\";\r\nimport { ISupportDetails } from \"../models/support\";\r\nimport { ICustomer } from \"../models/user\";\r\n\r\nexport const addHours = (date: Date, hours: number) => {\r\n var actualDate = new Date(date);\r\n actualDate.setTime(actualDate.getTime() + (hours*60*60*1000));\r\n return actualDate\r\n}\r\n\r\nexport const addDays = (date: Date, days: number) => {\r\n var actualDate = new Date(date);\r\n actualDate.setDate(actualDate.getDate() + days);\r\n return actualDate;\r\n}\r\n\r\nexport const getDatePart = (date: Date) => {\r\n var actualDate = new Date(date);\r\n return new Date(\r\n actualDate.getFullYear(),\r\n actualDate.getMonth(),\r\n actualDate.getDate(),\r\n 0,\r\n 0\r\n )\r\n}\r\nexport const formatDate = (date: Date) => {\r\n var actualDate = new Date(date);\r\n const timeString =\r\n actualDate.getHours() + \":\" + actualDate.getMinutes() + \":00\";\r\n const year = actualDate.getFullYear();\r\n const month = actualDate.getMonth() + 1;\r\n const day = actualDate.getDate();\r\n const dateString = `${year}-${month}-${day}`;\r\n return dateString + \" \" + timeString;\r\n};\r\n\r\nexport const displayDateTime = (date: Date) => {\r\n var actualDate = new Date(date);\r\n const timeString = `${(100 + actualDate.getHours()).toString().substr(1)}:${(100 + actualDate.getMinutes()).toString().substr(1)}`;\r\n const year = actualDate.getFullYear();\r\n const month = 100 + actualDate.getMonth() + 1;\r\n const day = 100 + actualDate.getDate();\r\n const dateString = `${day.toString().substr(1)}/${month.toString().substr(1)}/${year}`;\r\n return dateString + \" \" + timeString;\r\n};\r\n\r\nexport const displayDate = (date: Date) => {\r\n var actualDate = new Date(date);\r\n const year = actualDate.getFullYear();\r\n const month = 100 + actualDate.getMonth() + 1;\r\n const day = 100 + actualDate.getDate();\r\n return `${day.toString().substr(1)}/${month.toString().substr(1)}/${year}`;\r\n};\r\n\r\nexport const getDateString = (date:Date) => {\r\n var actualDate = new Date(date);\r\n const year = actualDate.getFullYear();\r\n const month = actualDate.getMonth() + 1;\r\n const day = actualDate.getDate();\r\n return `${year}-${(100+month).toString().substr(1)}-${(100+day).toString().substr(1)}`;\r\n}\r\nexport const getDate = (date: Date, time: number) => {\r\n var actualDate = new Date(date);\r\n return new Date(\r\n actualDate.getFullYear(),\r\n actualDate.getMonth(),\r\n actualDate.getDate(),\r\n time,\r\n 0,\r\n 0\r\n );\r\n};\r\n\r\nexport const getDateFromString = (value: string) => {\r\n var dateValues = value.split(\"-\");\r\n return new Date(\r\n parseInt(dateValues[0]),\r\n parseInt(dateValues[1])-1,\r\n parseInt(dateValues[2])\r\n );\r\n}\r\nexport const getDateStringEx = (date: Date) => {\r\n if (date) {\r\n var actualDate = new Date(date);\r\n var dayNumber = actualDate.getDate();\r\n var suffix = \"\";\r\n if(dayNumber > 3 && dayNumber < 21){\r\n suffix = \"th\";\r\n } else {\r\n switch(dayNumber % 10){\r\n case 1 : suffix='st'; break;\r\n case 2 : suffix='nd'; break;\r\n case 3 : suffix='rd'; break;\r\n default: suffix='th'; break;\r\n }\r\n }\r\n\r\n return `${getDayName(actualDate)}, ${getMonthName(\r\n actualDate\r\n )} ${actualDate.getDate()}${suffix}`;\r\n }\r\n};\r\n\r\nexport const getDateFullNameString = (date: Date) => {\r\n if (date) {\r\n var actualDate = new Date(date);\r\n var dayNumber = actualDate.getDate();\r\n var suffix = \"\";\r\n if(dayNumber > 3 && dayNumber < 21){\r\n suffix = \"th\";\r\n } else {\r\n switch(dayNumber % 10){\r\n case 1 : suffix='st'; break;\r\n case 2 : suffix='nd'; break;\r\n case 3 : suffix='rd'; break;\r\n default: suffix='th'; break\r\n }\r\n }\r\n\r\n return `${getDayFullName(actualDate)}, ${actualDate.getDate()}${suffix} ${getMonthFullName(\r\n actualDate\r\n )}`;\r\n }\r\n};\r\n\r\n\r\n\r\nexport const getTimeString = (time: number) => {\r\n return (100 + time).toString().substring(1);\r\n};\r\n\r\nexport const getDayName = (date: Date) => {\r\n if (date) {\r\n var days = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\r\n var actualDate = new Date(date);\r\n return days[actualDate.getDay()];\r\n }\r\n};\r\n\r\nexport const getDayFullName = (date: Date) => {\r\n if (date) {\r\n var days = [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"];\r\n var actualDate = new Date(date);\r\n return days[actualDate.getDay()];\r\n }\r\n};\r\n\r\nexport const getMonthName = (date: Date) => {\r\n if (date) {\r\n var months = [\r\n \"Jan\",\r\n \"Feb\",\r\n \"Mar\",\r\n \"Apr\",\r\n \"May\",\r\n \"June\",\r\n \"July\",\r\n \"Aug\",\r\n \"Sept\",\r\n \"Oct\",\r\n \"Nov\",\r\n \"Dec\",\r\n ];\r\n var actualDate = new Date(date);\r\n return months[actualDate.getMonth()];\r\n }\r\n};\r\n\r\nexport const getMonthFullName = (date: Date) => {\r\n if (date) {\r\n var months = [\r\n \"January\",\r\n \"February\",\r\n \"March\",\r\n \"April\",\r\n \"May\",\r\n \"June\",\r\n \"July\",\r\n \"August\",\r\n \"September\",\r\n \"October\",\r\n \"November\",\r\n \"December\",\r\n ];\r\n var actualDate = new Date(date);\r\n return months[actualDate.getMonth()];\r\n }\r\n};\r\n\r\n\r\nexport const customerFullName = (customer: ICustomer) => {\r\n let fullName:string = \"\"; \r\n if(customer.title.length > 0)\r\n fullName = `${customer.title} ${customer.firstName}`;\r\n else\r\n fullName = customer.firstName;\r\n if(customer.middleName.length > 0)\r\n fullName = `${fullName} ${customer.middleName}`;\r\n if(customer.surname.length > 0)\r\n fullName = `${fullName} ${customer.surname}`;\r\n fullName = fullName.toLowerCase();\r\n return fullName.replace(/([a-z])([A-Z])/g, function(allMatches, firstMatch, secondMatch) {\r\n return firstMatch + \" \" + secondMatch;\r\n })\r\n .toLowerCase()\r\n .replace(/([ -_]|^)(.)/g, function(allMatches, firstMatch, secondMatch) {\r\n return (firstMatch ? \" \" : \"\") + secondMatch.toUpperCase();\r\n });\r\n}\r\n\r\nexport const customerFullAddress = (customer: ICustomer) => {\r\n let fullAddress: string = \"\";\r\n if(customer.address1.length > 0)\r\n fullAddress = customer.address1;\r\n if(customer.address2.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${customer.address2}`\r\n else\r\n fullAddress = customer.address2;\r\n }\r\n if(customer.address3.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${customer.address3}`\r\n else\r\n fullAddress = customer.address3;\r\n }\r\n if(customer.address4.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${customer.address4}`\r\n else\r\n fullAddress = customer.address4;\r\n }\r\n if(customer.postCode.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${customer.postCode}`\r\n else\r\n fullAddress = customer.postCode;\r\n }\r\n return fullAddress;\r\n}\r\n\r\nexport const customerAddressWithoutPostcode = (customer: ICustomer) => {\r\n let fullAddress: string = \"\";\r\n if(customer.address1.length > 0)\r\n fullAddress = customer.address1;\r\n if(customer.address2.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${customer.address2}`\r\n else\r\n fullAddress = customer.address2;\r\n }\r\n if(customer.address3.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${customer.address3}`\r\n else\r\n fullAddress = customer.address3;\r\n }\r\n if(customer.address4.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${customer.address4}`\r\n else\r\n fullAddress = customer.address4;\r\n }\r\n return fullAddress;\r\n}\r\n\r\nexport const toTitlecase = (value:string) =>{\r\n if(value)\r\n return value.toLowerCase().replace(/([a-z])([A-Z])/g, function(allMatches, firstMatch, secondMatch) {\r\n return firstMatch + \" \" + secondMatch;\r\n })\r\n .toLowerCase()\r\n .replace(/([ -_]|^)(.)/g, function(allMatches, firstMatch, secondMatch) {\r\n return (firstMatch ? \" \" : \"\") + secondMatch.toUpperCase();\r\n });\r\n return '';\r\n}\r\n\r\nexport const supportFullAddress = (support: ISupportDetails | undefined) => {\r\n let fullAddress: string = \"\";\r\n if(support){\r\n if(support.address1.length > 0)\r\n fullAddress = support.address1;\r\n if(support.address2.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${support.address2}`\r\n else\r\n fullAddress = support.address2;\r\n }\r\n if(support.address3.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${support.address3}`\r\n else\r\n fullAddress = support.address3;\r\n }\r\n if(support.address4.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${support.address4}`\r\n else\r\n fullAddress = support.address4;\r\n }\r\n if(support.postCode.length > 0)\r\n {\r\n if(fullAddress.length > 0)\r\n fullAddress = `${fullAddress}, ${support.postCode}`\r\n else\r\n fullAddress = support.postCode;\r\n }\r\n }\r\n\r\n return fullAddress;\r\n}\r\n\r\nexport const uniqueSlotDates = (slots:ITimeSlot[]) => {\r\n var uniqueSlots:Date[] = [];\r\n for(var i=0; i < slots.length; i++){\r\n if(!uniqueSlots.some(s => new Date(s).getTime() === new Date(slots[i].slotDate).getTime()))\r\n uniqueSlots.push(slots[i].slotDate);\r\n }\r\n return uniqueSlots;\r\n}\r\n\r\nexport const decryptResetKey = (resetKey: string) => {\r\n if(resetKey.length <= 29)\r\n return \"\";\r\n var prefix = resetKey.substring(0,15);\r\n var suffix = resetKey.substring(resetKey.length-14); \r\n return prefix + suffix;\r\n}\r\n","import { RootStore } from \"./rootStore\";\r\nimport { observable, action, reaction, computed, runInAction} from \"mobx\";\r\nimport { IOrderDetail, IOrder, IOrderBasket, IAppOrderEntity, IBundleOrderGroupEntity, ITimeSlot } from \"../models/order\";\r\nimport { ISubCategory } from \"../models/category\";\r\nimport agent from \"../api/agent\";\r\nimport { formatDate, getDateFullNameString, getTimeString } from \"../utils/Utils\";\r\nimport { IVoucher } from \"../models/voucher\";\r\nimport { IRegularVisit, IScheduledVisit } from \"../models/visit\";\r\n\r\nexport default class OrderStore {\r\n rootStore: RootStore;\r\n\r\n constructor(rootStore: RootStore) {\r\n this.rootStore = rootStore;\r\n reaction(\r\n () => this.currentOrder,\r\n (order) => {\r\n if(order)\r\n window.localStorage.setItem(\"mdc_current_order\", JSON.stringify(order));\r\n else\r\n window.localStorage.removeItem(\"mdc_current_order\");\r\n }\r\n )\r\n reaction(\r\n () => this.orderDetails,\r\n (details) => {\r\n if (details.length > 0) {\r\n window.localStorage.setItem(\"mdc_order\", JSON.stringify(details));\r\n } else {\r\n window.localStorage.removeItem(\"mdc_order\");\r\n }\r\n }\r\n );\r\n reaction(\r\n () => this.basketValues,\r\n (bv) => {\r\n if(bv.postCode.length > 0){\r\n window.localStorage.setItem(\"mdc_basket\", JSON.stringify(bv));\r\n } else {\r\n window.localStorage.removeItem(\"mdc_basket\");\r\n }\r\n }\r\n );\r\n reaction(\r\n () => this.orderSaved,\r\n (os) => {\r\n if(os === 1){\r\n window.sessionStorage.setItem(\"mdc_saved\", os.toString());\r\n } else {\r\n window.sessionStorage.removeItem(\"mdc_saved\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n restoreOrderDetails = () => {\r\n const odString = window.localStorage.getItem(\"mdc_order\");\r\n if (odString) {\r\n return JSON.parse(odString);\r\n }\r\n return [];\r\n };\r\n\r\n initBasketValues = () => {\r\n return {\r\n accountCode: \"\",\r\n title: \"\",\r\n firstName: \"\",\r\n middleName: \"\",\r\n surname: \"\",\r\n address1: \"\",\r\n address2: \"\",\r\n postCode: \"\",\r\n emailId: \"\",\r\n mobileNo: \"\",\r\n password: \"\",\r\n confirmPassword: \"\",\r\n deliveryNotes: \"\",\r\n orderNotes: \"\",\r\n discountCode: \"\",\r\n headerDiscount: 0,\r\n grossAmount: 0,\r\n minCharge: 0,\r\n collectFromShop: false,\r\n };\r\n }\r\n restoreBasketValues = () => {\r\n const bvString = window.localStorage.getItem(\"mdc_basket\");\r\n if(bvString) {\r\n return JSON.parse(bvString);\r\n }\r\n return this.initBasketValues();\r\n }\r\n\r\n getLastMainLineNo = () => {\r\n let mLineNo = 10;\r\n if (this.orderDetails?.length > 0) {\r\n this.orderDetails.forEach((detail) => {\r\n if (detail.mainLineNo > mLineNo) mLineNo = detail.mainLineNo;\r\n });\r\n }\r\n mLineNo++;\r\n return mLineNo;\r\n };\r\n @observable turnAroundTime: number = 0;\r\n @action setTurnAroundTime = (tt:number) =>{\r\n if(tt)\r\n if(this.turnAroundTime < tt)\r\n this.turnAroundTime = tt;\r\n }\r\n @action resetTurnAroundTime = () =>{\r\n this.turnAroundTime = 0;\r\n }\r\n @observable loadingOrder: boolean = false;\r\n @action setLoadingOrder = (loading: boolean) => {\r\n this.loadingOrder = loading;\r\n };\r\n @observable orderSaved: number = window.sessionStorage.getItem(\"mdc_saved\") ? parseInt(window.sessionStorage.getItem(\"mdc_saved\")!) : 0;\r\n @action setOrderSaved = (saved: number) =>{\r\n this.orderSaved = saved;\r\n }\r\n @observable savingOrder: boolean = false;\r\n @observable currentOrder: IOrder | undefined;\r\n @observable orderDetails: IOrderDetail[] = this.restoreOrderDetails();\r\n @observable basketValues: IOrderBasket = this.restoreBasketValues();\r\n @observable mainAlterationDetail: IOrderDetail | undefined;\r\n \r\n @action setMainAlterationDetail = (detail: IOrderDetail | undefined) => {\r\n this.mainAlterationDetail = detail;\r\n }\r\n @computed get currentAlterationType() {\r\n if(this.mainAlterationDetail){\r\n return (this.mainAlterationDetail.alterationCode === 5) ? 2 : 1;\r\n } else\r\n return 0;\r\n }\r\n\r\n @observable unPickedOrders: IAppOrderEntity[] = [];\r\n @observable loadingUnPickedOrders: boolean = false;\r\n @action setLoadingUnPickedOrders = (value: boolean) => this.loadingUnPickedOrders = value;\r\n \r\n\r\n @observable pickedOrders: IAppOrderEntity[] = [];\r\n @observable loadingPickedOrders: boolean = false;\r\n @action setLoadingPickedOrders = (value: boolean) => this.loadingPickedOrders = value;\r\n\r\n @observable ordersInProcess: IBundleOrderGroupEntity[] = [];\r\n @observable loadingOrdersInProcess: boolean = false;\r\n @action setLoadingOrdersInProcess = (value: boolean) => this.loadingOrdersInProcess = value;\r\n\r\n @observable ordersReady: IBundleOrderGroupEntity[] = [];\r\n @observable loadingOrdersReady: boolean = false;\r\n @action setLoadingOrdersReady = (value: boolean) => this.loadingOrdersInProcess = value;\r\n\r\n @observable ordersOnDelivery: IBundleOrderGroupEntity[] = [];\r\n @observable loadingOrdersOnDelivery: boolean = false;\r\n @action setLoadingOrdersOnDelivery = (value: boolean) => this.loadingOrdersOnDelivery = value;\r\n\r\n @observable ordersDelivered: IBundleOrderGroupEntity[] = [];\r\n @observable loadingOrdersDelivered: boolean = false;\r\n @action setLoadingOrdersDelivered = (value: boolean) => this.loadingOrdersDelivered = value;\r\n\r\n @action setBasketValues = (values:IOrderBasket) => this.basketValues = values;\r\n @observable discountVoucher: IVoucher | null = null;\r\n @action setDiscountVoucher = (voucher: IVoucher | null) => this.discountVoucher = voucher;\r\n \r\n @observable loadingVisitSlot: boolean = false;\r\n @observable visitSlot: ITimeSlot | undefined;\r\n @action setVisitSlot = (slot: ITimeSlot | undefined) => {\r\n this.visitSlot = slot;\r\n }\r\n @observable selectedVisitUID: string = \"\";\r\n @action setSelectedVisitUID = (uid: string) =>{\r\n this.selectedVisitUID = uid;\r\n }\r\n @observable showChangeSlotDialog: boolean = false;\r\n @action setShowChangeSlotDialog = (show: boolean) => {\r\n this.showChangeSlotDialog = show;\r\n } \r\n @computed get totalPieces() {\r\n let total = 0;\r\n this.orderDetails?.forEach((detail) => {\r\n total += detail.pieces;\r\n });\r\n return total;\r\n }\r\n\r\n @computed get totalQuantity() {\r\n let total = 0;\r\n this.orderDetails?.forEach((detail) => {\r\n if (detail.itemType === \"I\") total += detail.quantity;\r\n });\r\n return total;\r\n }\r\n\r\n @computed get totalGrossAmount() {\r\n let total = 0;\r\n this.orderDetails?.forEach((detail) => {\r\n total += detail.lineTotal;\r\n });\r\n return total;\r\n }\r\n\r\n @computed get totalDiscount() {\r\n let total = 0;\r\n this.orderDetails?.forEach((detail) => {\r\n total += detail.discount;\r\n });\r\n total += this.headerDiscount;\r\n return total;\r\n }\r\n\r\n @observable headerDiscount: number = 0;\r\n @action setHeaderDiscount = (discount:number) => {\r\n this.headerDiscount = discount;\r\n }\r\n\r\n @observable showBasket: boolean = false;\r\n @action setShowBasket = (show: boolean) => {\r\n this.showBasket = show;\r\n }\r\n @observable mainLineNo: number = this.getLastMainLineNo();\r\n\r\n @action incrementMainLineNo = () => {\r\n this.mainLineNo++;\r\n };\r\n\r\n @action createOrder = (accountCode: string) => {\r\n this.currentOrder = {\r\n accountCode: accountCode,\r\n orderDate: new Date(),\r\n orderNo: 0,\r\n quantity: this.totalQuantity,\r\n pieces: this.totalPieces,\r\n netAmount: 0,\r\n vatAmount: 0,\r\n grossAmount: this.totalGrossAmount,\r\n grandTotal: this.totalGrossAmount,\r\n deliveryCharges: 0,\r\n collectionCharges: 0,\r\n discountCode: \"\",\r\n headerDiscount: 0,\r\n lineDiscount: this.totalDiscount,\r\n totalDiscount: this.totalDiscount,\r\n minCharge: 0,\r\n cCampUniqueRecID: \"\",\r\n collectionSlot: this.rootStore.timeSlotStore.defaultCollection!,\r\n deliverySlot: this.rootStore.timeSlotStore.defaultCollection!,\r\n orderNotes: \"\",\r\n deliveryNotes: \"\",\r\n collectFromShop: false,\r\n cardUniqueRecId: \"\",\r\n orderDetails: this.orderDetails\r\n };\r\n };\r\n\r\n @action clearOrder = () => {\r\n this.currentOrder = undefined;\r\n };\r\n\r\n @action clearOrderDetails = () => {\r\n this.orderDetails.length = 0;\r\n window.localStorage.removeItem(\"mdc_order\");\r\n };\r\n\r\n @action clearBasketValues = () => {\r\n this.basketValues = this.initBasketValues();\r\n window.localStorage.removeItem(\"mdc_basket\");\r\n }\r\n @action addToOrder = (orderDetail: IOrderDetail) => {\r\n this.orderDetails = [\r\n ...this.orderDetails.filter(\r\n (od) =>\r\n od.scUnique !== orderDetail.scUnique ||\r\n (od.scUnique === orderDetail.scUnique &&\r\n od.mainLineNo !== orderDetail.mainLineNo) \r\n ),\r\n orderDetail,\r\n ];\r\n };\r\n\r\n @action removeFromOrder = (item: ISubCategory) => {\r\n let orderDetail = this.orderDetails.find(\r\n (od) =>\r\n od.scUnique === item.scUnique &&\r\n od.alteration === \"\" &&\r\n od.itemType === \"I\"\r\n );\r\n if (orderDetail !== undefined) {\r\n orderDetail.quantity--;\r\n orderDetail.pieces -= item.pieces;\r\n orderDetail.lineTotal -= item.pmPrice;\r\n orderDetail.discount -= item.discount;\r\n this.orderDetails = [\r\n ...this.orderDetails.filter(\r\n (od) =>\r\n od.mainLineNo !== orderDetail!.mainLineNo &&\r\n od.lineNo !== orderDetail!.lineNo\r\n ),\r\n orderDetail,\r\n ];\r\n }\r\n };\r\n @action updateOrderDetail = (orderDetail: IOrderDetail) =>{\r\n this.orderDetails = [\r\n ...this.orderDetails.filter(\r\n (od) => od.mainLineNo !== orderDetail.mainLineNo && od.lineNo !== orderDetail.lineNo\r\n ),\r\n orderDetail\r\n ];\r\n }\r\n\r\n @action removeAllFromOrder = (orderDetail: IOrderDetail) => {\r\n this.orderDetails = [\r\n ...this.orderDetails.filter(\r\n (od) => od.mainLineNo !== orderDetail.mainLineNo\r\n ),\r\n ];\r\n };\r\n\r\n @action getOrderDetailForItem = (item: ISubCategory) => {\r\n const orderDetail = this.orderDetails?.find(\r\n (od) =>\r\n od.scUnique === item.scUnique &&\r\n od.alteration === \"\" &&\r\n od.itemType === \"I\"\r\n );\r\n return orderDetail;\r\n };\r\n\r\n @action initOrderDetail = (item: ISubCategory) => {\r\n return {\r\n mainLineNo: this.mainLineNo,\r\n lineNo: this.mainLineNo * 100,\r\n mainCategory: item?.groupName,\r\n subCategory: item?.itemName,\r\n scUnique: item?.scUnique,\r\n stkCode: item?.stkCode,\r\n discountQty: 0,\r\n price: 0,\r\n quantity: 0,\r\n pieces: 0,\r\n lineTotal: 0,\r\n alterationCode: 0,\r\n alteration: \"\",\r\n itemType: \"I\",\r\n collectionCharges: 0,\r\n deliveryCharges: 0,\r\n discountType: item ? (item?.discount > 0 ? \"PR::0:\" : \"\") : \"\",\r\n discount: 0,\r\n headerDiscount: 0,\r\n notes: \"\",\r\n };\r\n };\r\n\r\n @action addAlterations = (alterations: IOrderDetail[]) => {\r\n this.orderDetails = [...this.orderDetails, ...alterations];\r\n };\r\n @action updateAlterationsType = (mainDetail: IOrderDetail) => {\r\n this.orderDetails = [...this.orderDetails.filter((od) => od.mainLineNo !== mainDetail.mainLineNo || (od.mainLineNo === mainDetail.mainLineNo && od.lineNo !== mainDetail.lineNo)),mainDetail];\r\n }\r\n @action updateAlterations = (alterations: IOrderDetail[]) =>{\r\n alterations.forEach((alter) => {\r\n this.orderDetails = [\r\n ...this.orderDetails.filter(\r\n (od) => od.mainLineNo !== alter.mainLineNo || (od.mainLineNo === alter.mainLineNo && od.lineNo !== alter.lineNo)\r\n ),\r\n alter\r\n ];\r\n\r\n }) \r\n }\r\n @action removeAlteration = (mainLineNo: number, lineNo: number) => {\r\n this.orderDetails = [\r\n ...this.orderDetails.filter(\r\n (od) => od.mainLineNo !== mainLineNo || (od.mainLineNo === mainLineNo && od.lineNo !== lineNo)\r\n ),\r\n ];\r\n };\r\n @action removeAllAlterations = (mainLineNo: number) => {\r\n this.orderDetails = [\r\n ...this.orderDetails.filter((od) => od.mainLineNo !== mainLineNo),\r\n ];\r\n };\r\n\r\n @action getAlterationDetailsForItem = (item: ISubCategory) => {\r\n let alterations: IOrderDetail[] = []; \r\n let mainDetails = this.orderDetails?.filter(\r\n (od) => od.scUnique === item.scUnique && od.alteration === \"A\"\r\n );\r\n if(mainDetails){\r\n mainDetails.forEach((d) => {\r\n alterations = [...alterations,...this.orderDetails?.filter( (od) => od.mainLineNo === d.mainLineNo)];\r\n })\r\n }\r\n return alterations;\r\n\r\n/* return this.orderDetails?.filter(\r\n (od) => od.scUnique === item.scUnique && od.alteration === \"A\"\r\n );*/\r\n };\r\n @action getAlterationDetails = (mainLineNo: number) => {\r\n return this.orderDetails?.filter(\r\n (od) => od.mainLineNo === mainLineNo);\r\n }\r\n @action getMainAlterationDetails = (mainLineNo: number) => {\r\n let detail = this.orderDetails?.find(\r\n (od) => od.mainLineNo === mainLineNo && od.alteration === 'A' && od.itemType === 'I');\r\n return detail;\r\n }\r\n\r\n @action deleteAlteration = (mainLineNo: number, lineNo: number) => {\r\n const od = this.orderDetails.find(\r\n (d) => d.mainLineNo === mainLineNo && d.lineNo === lineNo\r\n );\r\n if (od) {\r\n if (od.itemType === \"I\") {\r\n this.removeAllAlterations(mainLineNo);\r\n } else {\r\n const alters = this.orderDetails.filter(\r\n (d) => d.mainLineNo === mainLineNo\r\n );\r\n if (alters.length <= 2) {\r\n this.removeAllAlterations(mainLineNo);\r\n } else {\r\n this.removeAlteration(mainLineNo, lineNo);\r\n } \r\n }\r\n }\r\n}\r\n @action deleteOrderDetail = (mainLineNo: number, lineNo: number) => {\r\n const od = this.orderDetails.find(\r\n (d) => d.mainLineNo === mainLineNo && d.lineNo === lineNo\r\n );\r\n if (od) {\r\n if (od.itemType === \"I\") {\r\n if (od.alteration === \"\") {\r\n if (od.quantity > 1) {\r\n let pieces = od.pieces / od.quantity;\r\n let discount = od.discount / od.quantity;\r\n od.quantity--;\r\n od.pieces -= pieces;\r\n od.lineTotal -= od.price;\r\n od.discount -= discount;\r\n this.orderDetails = [\r\n ...this.orderDetails.filter(\r\n (d) =>\r\n d.mainLineNo !== od!.mainLineNo && d.lineNo !== od!.lineNo\r\n ),\r\n od,\r\n ];\r\n } else {\r\n this.removeAllFromOrder(od);\r\n }\r\n } else {\r\n this.removeAllAlterations(mainLineNo);\r\n }\r\n } else {\r\n const alters = this.orderDetails.filter(\r\n (d) => d.mainLineNo === mainLineNo\r\n );\r\n if (alters.length === 2) this.removeAllAlterations(mainLineNo);\r\n else this.removeAlteration(mainLineNo, lineNo);\r\n }\r\n runInAction(() => {\r\n this.currentOrder!.orderDetails = [...this.orderDetails];\r\n })\r\n }\r\n };\r\n @action checkVoucher = async (voucherCode: string): Promise => {\r\n return await agent.Order.checkVoucher(voucherCode,formatDate(new Date()));\r\n }\r\n\r\n @action saveOrder = async () => {\r\n this.savingOrder = true;\r\n try {\r\n \r\n if (\r\n this.totalGrossAmount < this.rootStore.userStore.user!.minOrderValue\r\n )\r\n runInAction(\r\n () =>\r\n (this.currentOrder!.minCharge =\r\n this.rootStore.userStore.user!.minOrderValue -\r\n this.totalGrossAmount)\r\n );\r\n \r\n runInAction(() => {\r\n const {\r\n defaultCollection,\r\n defaultDelivery,\r\n } = this.rootStore.timeSlotStore;\r\n this.currentOrder!.quantity= this.totalQuantity;\r\n this.currentOrder!.pieces= this.totalPieces;\r\n this.currentOrder!.grossAmount= this.totalGrossAmount;\r\n this.currentOrder!.grandTotal= this.totalGrossAmount;\r\n this.currentOrder!.lineDiscount= this.totalDiscount;\r\n this.currentOrder!.totalDiscount= this.totalDiscount;\r\n this.currentOrder!.orderDetails= [...this.orderDetails];\r\n this.currentOrder!.collectionSlot = defaultCollection!;\r\n this.currentOrder!.deliverySlot = defaultDelivery!;\r\n this.currentOrder!.collectFromShop = this.basketValues.collectFromShop;\r\n this.currentOrder!.orderNotes = this.basketValues.orderNotes;\r\n if(this.basketValues.deliveryNotes.length > 0)\r\n this.currentOrder!.deliveryNotes = this.basketValues.deliveryNotes;\r\n this.currentOrder!.cardUniqueRecId = this.rootStore.userStore.defaultCardUID;\r\n if(this.discountVoucher){\r\n // Calculate discount here\r\n let discPercent = 0; let discApplied = 0;\r\n this.currentOrder!.cCampUniqueRecID = this.discountVoucher.cCampUniqueRecID; \r\n this.currentOrder!.discountCode = this.basketValues.discountCode;\r\n this.currentOrder!.headerDiscount = this.headerDiscount;\r\n if(this.discountVoucher.offerType === 0)\r\n discPercent = (this.headerDiscount/this.totalGrossAmount) * 100;\r\n else\r\n discPercent = this.discountVoucher.percentDiscount;\r\n for(let index=0; index < this.orderDetails.length; index++){\r\n if(this.discountVoucher.offerType === 0 && index === (this.orderDetails.length -1))\r\n break\r\n let od:IOrderDetail = this.orderDetails[index];\r\n od.headerDiscount = parseFloat((od.lineTotal * (discPercent/100)).toFixed(2));\r\n od.discountType += `${this.basketValues.discountCode}:${this.discountVoucher.cCampUniqueRecID}:${this.discountVoucher.offerType === 0?0:od.headerDiscount}:${this.discountVoucher.offerType === 1?0:od.headerDiscount};` \r\n discApplied += od.headerDiscount;\r\n }\r\n if(this.discountVoucher.offerType === 0)\r\n this.orderDetails[this.orderDetails.length-1].headerDiscount = parseFloat((this.headerDiscount - discApplied).toFixed(2));\r\n }\r\n });\r\n this.rootStore.userStore.updateDefaultCustomerCard()\r\n if(this.currentOrder!.orderNo > 0){\r\n runInAction(() => {\r\n this.currentOrder!.orderDetails.length = 0;\r\n this.currentOrder!.orderDetails = [...this.orderDetails];\r\n })\r\n agent.Order.updateOrder(this.currentOrder!).then((response) => {\r\n runInAction(() => {\r\n if(response){\r\n let html = this.rootStore.commonStore.currentShop!.orderSaveMessage;\r\n this.rootStore.commonStore.setMessage(html\r\n .replace(\"[OrderNumber]\",this.currentOrder!.orderNo.toString())\r\n .replace(\"[Date]\", getDateFullNameString(this.currentOrder!.collectionSlot.slotDate)!)\r\n .replace(\"[Time]\",getTimeString(this.currentOrder!.collectionSlot.slotTimeFrom) + ':00 - ' + getTimeString(this.currentOrder!.collectionSlot.slotTimeTo) + ':00')\r\n .replace(\"[ShopTelephone]\",this.rootStore.userStore.user!.shopTelephone)\r\n .replace(\"[ReviewLink]\", this.rootStore.userStore.user!.reviewLink)\r\n );\r\n } else {\r\n this.rootStore.commonStore.setMessage(\r\n \"An error occured while saving your order. Please try again later, or contact support if error persits.\"\r\n );\r\n }\r\n this.currentOrder = undefined;\r\n this.orderDetails.length = 0;\r\n this.basketValues = this.initBasketValues();\r\n window.localStorage.removeItem(\"mdc_order\");\r\n window.localStorage.removeItem(\"mdc_basket\");\r\n this.rootStore.timeSlotStore.clearTimeslots();\r\n this.savingOrder = false;\r\n this.setOrderSaved(1);\r\n });\r\n });\r\n } else {\r\n agent.Order.saveOrder(this.currentOrder!).then((orderno) => {\r\n runInAction(() => {\r\n if(orderno > 0){\r\n this.currentOrder!.orderNo = orderno;\r\n let html = this.rootStore.commonStore.currentShop!.orderSaveMessage;\r\n this.rootStore.commonStore.setMessage(html\r\n .replace(\"[OrderNumber]\", orderno.toString())\r\n .replace(\"[Date]\", getDateFullNameString(this.currentOrder!.collectionSlot.slotDate)!)\r\n .replace(\"[Time]\",getTimeString(this.currentOrder!.collectionSlot.slotTimeFrom) + ':00 - ' + getTimeString(this.currentOrder!.collectionSlot.slotTimeTo) + ':00')\r\n .replace(\"[ShopTelephone]\",this.rootStore.userStore.user!.shopTelephone)\r\n .replace(\"[ReviewLink]\", this.rootStore.userStore.user!.reviewLink)\r\n );\r\n } else {\r\n this.rootStore.commonStore.setMessage(\r\n \"An error occured while saving your order. Please try again later, or contact support if error persits.\"\r\n );\r\n }\r\n this.currentOrder = undefined;\r\n this.orderDetails.length = 0;\r\n this.basketValues = this.initBasketValues();\r\n window.localStorage.removeItem(\"mdc_order\");\r\n window.localStorage.removeItem(\"mdc_basket\");\r\n this.rootStore.timeSlotStore.clearTimeslots();\r\n this.savingOrder = false;\r\n this.setOrderSaved(1);\r\n });\r\n });\r\n\r\n }\r\n\r\n } catch (error) {\r\n throw error;\r\n } \r\n };\r\n @action resetOrder = () =>{\r\n this.currentOrder = undefined;\r\n this.orderDetails.length = 0;\r\n this.orderDetails = [];\r\n this.basketValues = this.initBasketValues();\r\n this.rootStore.timeSlotStore.clearTimeslots();\r\n this.setOrderSaved(1);\r\n }\r\n\r\n @action reCalculatePrices = async () => {\r\n this.resetTurnAroundTime();\r\n this.orderDetails.forEach((od) => {\r\n this.rootStore.categoryStore.loadSubCategories(od.mainCategory);\r\n while(this.rootStore.categoryStore.loadCategories){;}\r\n this.rootStore.categoryStore.loadSubCategories(od.mainCategory);\r\n while(this.rootStore.categoryStore.loadingSubCategories){;}\r\n var subCat = this.rootStore.categoryStore.subCategories.find((sc) => sc.scUnique === od.scUnique);\r\n if(subCat){\r\n this.setTurnAroundTime(subCat.turnAroundTime);\r\n if(subCat.discount > 0){\r\n if (od.discount !== (subCat.discount*od.quantity)){\r\n od.discount = subCat.discount*od.quantity;\r\n }\r\n }\r\n }\r\n })\r\n }\r\n\r\n \r\n @action editOrder = (uid: string) => {\r\n this.setLoadingOrder(true);\r\n agent.Order.getOrder(uid).then(order => {\r\n runInAction(() => {\r\n this.currentOrder = {\r\n accountCode: order.accountCode,\r\n orderDate: order.orderDate,\r\n orderNo: order.orderNo,\r\n quantity: order.quantity,\r\n pieces: order.pieces,\r\n netAmount: order.netAmount,\r\n vatAmount: order.vatAmount,\r\n grossAmount: order.grossAmount,\r\n grandTotal: order.grandTotal,\r\n deliveryCharges: order.deliveryCharges,\r\n collectionCharges: order.collectionCharges,\r\n discountCode: order.discountCode,\r\n headerDiscount: order.headerDiscount,\r\n lineDiscount: order.lineDiscount,\r\n totalDiscount: order.totalDiscount,\r\n minCharge: order.minCharge,\r\n cCampUniqueRecID: order.cCampUniqueRecID,\r\n collectionSlot: order.collectionSlot,\r\n deliverySlot: order.deliverySlot,\r\n orderNotes: order.orderNotes,\r\n deliveryNotes: order.deliveryNotes,\r\n collectFromShop: order.collectFromShop,\r\n cardUniqueRecId: order.cardUniqueRecId,\r\n orderDetails: order.orderDetails,\r\n };\r\n this.orderDetails.length = 0;\r\n this.orderDetails = order.orderDetails;\r\n this.rootStore.timeSlotStore.defaultCollection = order.collectionSlot;\r\n this.rootStore.timeSlotStore.defaultDelivery = order.deliverySlot;\r\n this.rootStore.userStore.defaultCardUID = order.cardUniqueRecId;\r\n });\r\n this.setLoadingOrder(false);\r\n })\r\n }\r\n \r\n @observable loadingRegularVisits: boolean = false;\r\n @observable loadingScheduledVisits: boolean = false;\r\n @observable regularVisits: IRegularVisit[] = [];\r\n @observable scheduledVisits: IScheduledVisit[] = [];\r\n @action loadRegularVisits = () =>{\r\n this.loadingRegularVisits = true;\r\n agent.Visit.regular().then((result) =>{\r\n runInAction(()=>{\r\n this.regularVisits = result;\r\n this.loadingRegularVisits = false;\r\n })\r\n })\r\n };\r\n @action loadScheduledVisit = () =>{\r\n this.loadingScheduledVisits = true;\r\n agent.Visit.scheduled().then((result) => {\r\n runInAction(()=>{\r\n this.scheduledVisits = result;\r\n this.loadingScheduledVisits = false;\r\n })\r\n })\r\n };\r\n @observable changeVisitSlot = (visitUID: string, slotUID: string, ordersType: number) => {\r\n agent.Visit.updateSlot(visitUID, slotUID).then((res) => {\r\n if(res){\r\n switch(ordersType){\r\n case -1:\r\n this.loadScheduledVisit();\r\n break;\r\n case 1:\r\n this.getUnPickedOrders();\r\n break;\r\n case 2:\r\n this.getPickedOrders();\r\n break;\r\n case 3:\r\n this.getOrdersInProcess();\r\n break;\r\n case 4: \r\n this.getOrdersReady();\r\n break;\r\n case 5:\r\n this.getOrdersOnDelivery();\r\n break;\r\n case 6:\r\n this.getOrdersDelivered();\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n @observable deleteVisit = (uniqueRedId: string) => {\r\n agent.Visit.delete(uniqueRedId).then((res) => {\r\n if(res){\r\n runInAction(()=>{\r\n this.scheduledVisits = this.scheduledVisits.filter(v => v.uniqueRecId !== uniqueRedId);\r\n })\r\n }\r\n });\r\n }\r\n\r\n \r\n @action getUnPickedOrders = async () => {\r\n if(this.loadingUnPickedOrders)\r\n return;\r\n this.setLoadingUnPickedOrders(true);\r\n this.unPickedOrders = [];\r\n agent.Order.getUnPickedOrders().then((response) => {\r\n if(response)\r\n runInAction(() => {\r\n this.unPickedOrders = response;\r\n })\r\n this.setLoadingUnPickedOrders(false);\r\n })\r\n }\r\n\r\n @action getPickedOrders = async () => {\r\n if(this.loadingPickedOrders)\r\n return;\r\n this.setLoadingPickedOrders(true);\r\n this.pickedOrders = [];\r\n agent.Order.getPickedOrders().then((response) => {\r\n if(response)\r\n runInAction(() => {\r\n this.pickedOrders = response;\r\n })\r\n this.setLoadingPickedOrders(false);\r\n })\r\n }\r\n\r\n @action getOrdersInProcess = async () => {\r\n if(this.loadingOrdersInProcess)\r\n return;\r\n this.setLoadingOrdersInProcess(true);\r\n this.ordersInProcess = [];\r\n agent.Order.getOrdersInProcessing().then((response) => {\r\n if(response)\r\n runInAction(() => {\r\n this.ordersInProcess = response;\r\n })\r\n this.setLoadingOrdersInProcess(false);\r\n })\r\n }\r\n\r\n @action getOrdersReady = async () => {\r\n if(this.loadingOrdersReady)\r\n return;\r\n this.setLoadingOrdersReady(true);\r\n this.ordersReady = [];\r\n agent.Order.getOrdersReady().then((response) => {\r\n if(response)\r\n runInAction(() => {\r\n this.ordersReady = response;\r\n })\r\n this.setLoadingOrdersReady(false);\r\n })\r\n }\r\n\r\n @action getOrdersOnDelivery = async () => {\r\n if(this.loadingOrdersOnDelivery)\r\n return;\r\n this.setLoadingOrdersOnDelivery(true);\r\n this.ordersOnDelivery = [];\r\n agent.Order.getOrdersOnDelivery().then((response) => {\r\n if(response)\r\n runInAction(() => {\r\n this.ordersOnDelivery = response;\r\n })\r\n this.setLoadingOrdersOnDelivery(false);\r\n })\r\n }\r\n\r\n @action getOrdersDelivered = async () => {\r\n if(this.loadingOrdersDelivered)\r\n return;\r\n this.setLoadingOrdersDelivered(true);\r\n this.ordersDelivered = [];\r\n agent.Order.getOrdersDelivered().then((response) => {\r\n if(response)\r\n runInAction(() => {\r\n this.ordersDelivered = response;\r\n })\r\n this.setLoadingOrdersDelivered(false);\r\n })\r\n }\r\n}\r\n","import { RootStore } from \"./rootStore\";\r\nimport agent from \"../api/agent\";\r\nimport { observable, action, runInAction, reaction } from \"mobx\";\r\nimport { addDays, addHours, formatDate, uniqueSlotDates } from \"../utils/Utils\";\r\nimport { ITimeSlot, ITimeSlotsDTO } from \"../models/order\";\r\n\r\nexport default class TimeSlotStore {\r\n rootStore: RootStore;\r\n\r\n constructor(rootStore: RootStore) {\r\n this.rootStore = rootStore;\r\n reaction(\r\n () => this.defaultCollection,\r\n (collection) => {\r\n if (collection) {\r\n window.sessionStorage.setItem(\"mdc_collect\", JSON.stringify(collection));\r\n } else {\r\n window.sessionStorage.removeItem(\"mdc_collect\");\r\n }\r\n }\r\n );\r\n reaction(\r\n () => this.defaultDelivery,\r\n (delivery) => {\r\n if (delivery) {\r\n window.sessionStorage.setItem(\"mdc_deliver\", JSON.stringify(delivery));\r\n } else {\r\n window.sessionStorage.removeItem(\"mdc_deliver\");\r\n }\r\n }\r\n );\r\n }\r\n\r\n restoreTimeslot = (key:string) => {\r\n const odString = window.sessionStorage.getItem(key);\r\n if (odString) {\r\n return JSON.parse(odString);\r\n }\r\n return undefined;\r\n };\r\n \r\n @action clearTimeslots = () => {\r\n this.defaultCollection = undefined;\r\n window.sessionStorage.removeItem(\"mdc_collect\");\r\n this.defaultDelivery = undefined;\r\n window.sessionStorage.removeItem(\"mdc_deliver\");\r\n };\r\n\r\n @observable showCollectionTimeSlots: boolean = false;\r\n @observable showDeliveryTimeSlots: boolean = false;\r\n @action setShowCollectionTimeSlots = (show: boolean) => {\r\n this.showCollectionTimeSlots = show;\r\n };\r\n @action setShowDeliveryTimeSlots = (show: boolean) => {\r\n this.showDeliveryTimeSlots = show;\r\n };\r\n \r\n @observable defaultCollection: ITimeSlot | undefined = this.restoreTimeslot(\"mdc_collect\");\r\n @observable noCollectionSlot: boolean = false;\r\n @observable loadingDefaultCollection = false;\r\n @action setLoadingDefaultCollection = (loading: boolean) => {\r\n this.loadingDefaultCollection = loading;\r\n }\r\n @action setDefaultCollection = (collection: ITimeSlot) => {\r\n this.defaultCollection = collection;\r\n this.noCollectionSlot = false;\r\n };\r\n @action getDefaultCollection = async (orderDate: Date, postCode: string) => {\r\n this.loadingDefaultCollection = true;\r\n agent.TimeSlot.defaultCollection(formatDate(addHours(orderDate,this.rootStore.userStore.user!.minInterval)), postCode)\r\n .then((timeSlot) => {\r\n runInAction(() => {\r\n this.setDefaultCollection(timeSlot);\r\n this.loadingDefaultCollection = false;\r\n });\r\n })\r\n .catch(() =>\r\n runInAction(() => {\r\n this.noCollectionSlot = true;\r\n this.noDeliverySlot = true;\r\n })\r\n );\r\n };\r\n\r\n @observable defaultDelivery: ITimeSlot | undefined = this.restoreTimeslot(\"mdc_deliver\");\r\n @observable noDeliverySlot: boolean = false;\r\n @observable loadingDefaultDelivery = false;\r\n @action setLoadingDefaultDelivery = (loading: boolean) => {\r\n this.loadingDefaultDelivery = loading;\r\n }\r\n @action setDefaultDelivery = (delivery: ITimeSlot) => {\r\n this.defaultDelivery = delivery;\r\n this.noDeliverySlot = false;\r\n };\r\n @action getDefaultDelivery = async (\r\n collectionDate: Date,\r\n postCode: string\r\n ) => {\r\n this.loadingDefaultDelivery = true;\r\n agent.TimeSlot.defaultDelivery(formatDate(addDays(collectionDate,(this.rootStore.userStore.user!.minTurnAround > this.rootStore.orderStore.turnAroundTime ? this.rootStore.userStore.user!.minTurnAround : this.rootStore.orderStore.turnAroundTime))), postCode)\r\n .then((timeSlot) => {\r\n runInAction(() => {\r\n this.setDefaultDelivery(timeSlot);\r\n this.loadingDefaultDelivery = false;\r\n });\r\n })\r\n .catch(() => {\r\n runInAction(() => (this.noDeliverySlot = true));\r\n });\r\n };\r\n/*\r\n @observable collectionTimeSlotDates: Date[] = [];\r\n @observable deliveryTimeSlotDates: Date[] = [];\r\n @action loadCollectionTimeSlotDates = () => {\r\n this.loadingCollectionSlots = true;\r\n if (this.weeklyCollectionSlots.length > 0) {\r\n this.collectionTimeSlotDates.splice(0, this.collectionTimeSlotDates.length);\r\n this.collectionTimeSlotDates = uniqueSlotDates(this.weeklyCollectionSlots);\r\n }\r\n this.loadingCollectionSlots = false;\r\n }\r\n @action loadDeliveryTimeSlotDates = () => {\r\n this.loadingDeliverySlots = true;\r\n if (this.weeklyDeliverySlots.length > 0) {\r\n this.deliveryTimeSlotDates.splice(0, this.deliveryTimeSlotDates.length);\r\n this.deliveryTimeSlotDates = uniqueSlotDates(this.weeklyDeliverySlots);\r\n }\r\n this.loadingDeliverySlots = false;\r\n };\r\n*/\r\n @observable loadingCollectionSlots: boolean = false;\r\n @observable weeklyCollectionSlots: ITimeSlotsDTO[] = [];\r\n @action loadWeeklyCollectionSlots = (date: string, postCode: string) => {\r\n this.loadingCollectionSlots = true;\r\n agent.TimeSlot.weeklyCollection(date, postCode)\r\n .then((slots) => {\r\n runInAction(() => {\r\n this.weeklyCollectionSlots = slots;\r\n this.loadingCollectionSlots = false;\r\n });\r\n })\r\n .catch((err) => console.log(err));\r\n };\r\n @observable collectionSlotsForDate: ITimeSlot[] = [];\r\n @observable loadingCollectionSlotsForDate = false;\r\n @action getCollectionSlotsForDate = (date: Date) => {\r\n this.loadingCollectionSlotsForDate = true;\r\n let ts = this.weeklyCollectionSlots.find(t => new Date(t.timeSlotDate).getTime() === new Date(date).getTime());\r\n if(ts !== undefined)\r\n this.collectionSlotsForDate = [...ts.slots];\r\n else\r\n this.collectionSlotsForDate = [];\r\n runInAction(() => this.loadingCollectionSlotsForDate = false);\r\n };\r\n @observable loadingDeliverySlots: boolean = false;\r\n @observable weeklyDeliverySlots: ITimeSlotsDTO[] = [];\r\n @action loadWeeklyDeliverySlots = (date: string, postCode: string) => {\r\n this.loadingDeliverySlots = true;\r\n agent.TimeSlot.weeklyDelivery(date, postCode)\r\n .then((slots) => {\r\n runInAction(() => {\r\n this.weeklyDeliverySlots = slots;\r\n this.loadingDeliverySlots = false;\r\n });\r\n })\r\n .catch((err) => console.log(err));\r\n };\r\n \r\n @observable deliverySlotsForDate: ITimeSlot[] = [];\r\n @observable loadingDeliverySlotsForDate = false;\r\n @action getDeliverySlotsForDate = (date: Date) => {\r\n this.loadingDeliverySlotsForDate = true;\r\n let ts = this.weeklyDeliverySlots.find(t => new Date(t.timeSlotDate).getTime() === new Date(date).getTime());\r\n if(ts !== undefined)\r\n this.deliverySlotsForDate = [...ts.slots];\r\n else\r\n this.deliverySlotsForDate = [];\r\n runInAction(() => this.loadingDeliverySlotsForDate = false);\r\n };\r\n\r\n @action deliverySlotsAvailable = (date: Date) => {\r\n return this.weeklyDeliverySlots.some(\r\n (s) => new Date(s.timeSlotDate).getTime() === new Date(date).getTime()\r\n );\r\n };\r\n\r\n @action collectionSlotsAvailable = (date: Date) => {\r\n return this.weeklyCollectionSlots.some(\r\n (s) => new Date(s.timeSlotDate).getTime() === new Date(date).getTime()\r\n );\r\n };\r\n\r\n @observable slotsForDate: ITimeSlot[] = [];\r\n @observable loadingSlots: boolean = false;\r\n @action loadSlotsForDate = (date: string, postCode: string) => {\r\n this.loadingSlots = true;\r\n agent.TimeSlot.slotfordate(date,postCode)\r\n .then((slots) => {\r\n runInAction(() => {\r\n this.slotsForDate = slots;\r\n this.loadingSlots = false;\r\n });\r\n })\r\n }\r\n}\r\n","import { createContext } from \"react\";\r\nimport { configure } from \"mobx\";\r\nimport UserStore from \"./userStore\";\r\nimport CommonStore from \"./commonStore\";\r\nimport CategoryStore from \"./categoryStore\";\r\nimport OrderStore from \"./orderStore\";\r\nimport TimeSlotStore from \"./timeSlotStore\";\r\n\r\nconfigure({ enforceActions: \"always\" });\r\n\r\nexport class RootStore {\r\n userStore: UserStore;\r\n commonStore: CommonStore;\r\n categoryStore: CategoryStore;\r\n orderStore: OrderStore;\r\n timeSlotStore: TimeSlotStore;\r\n\r\n constructor() {\r\n this.userStore = new UserStore(this);\r\n this.commonStore = new CommonStore(this);\r\n this.categoryStore = new CategoryStore(this);\r\n this.orderStore = new OrderStore(this);\r\n this.timeSlotStore = new TimeSlotStore(this);\r\n }\r\n}\r\n\r\nexport const RootStoreContext = createContext(new RootStore());\r\n","import React, { useContext, useState, useEffect } from \"react\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { ILoginFormValues } from \"../../models/user\";\r\nimport { Form as FinalForm, Field } from \"react-final-form\";\r\nimport { combineValidators, isRequired } from \"revalidate\";\r\nimport { FaUser, FaKey, FaStore } from \"react-icons/fa\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { FORM_ERROR } from \"final-form\";\r\nimport { observer } from \"mobx-react-lite\";\r\nexport const LoginBox = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { shops, currentShop } = rootStore.commonStore;\r\n const { login, setShowLogin } = rootStore.userStore;\r\n const [loginValues, setLoginValues] = useState({\r\n appKey: currentShop?.appKey || \"\",\r\n username: \"\",\r\n password: \"\",\r\n shopCode: currentShop?.shopCode || \"\",\r\n rememberMe: false,\r\n });\r\n useEffect(() => {\r\n if (currentShop)\r\n setLoginValues({\r\n ...loginValues,\r\n appKey: currentShop?.appKey,\r\n shopCode: currentShop?.shopCode,\r\n });\r\n }, [currentShop]);\r\n const validate = combineValidators({\r\n username: isRequired(\"Username\"),\r\n password: isRequired(\"Password\"),\r\n });\r\n return (\r\n
\r\n
\r\n

Sign In

\r\n
\r\n \r\n login(values).catch((error) => {\r\n if(error?.notAllowed)\r\n return {\r\n [FORM_ERROR]: error.error,\r\n }\r\n else\r\n return {\r\n [FORM_ERROR]: \"Invalid username and/or password\",\r\n }\r\n }\r\n )\r\n }\r\n render={({\r\n handleSubmit,\r\n submitError,\r\n submitting,\r\n invalid,\r\n pristine,\r\n dirtySinceLastSubmit,\r\n }) => (\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n
\r\n \r\n
\r\n \r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n
\r\n )}\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n
\r\n \r\n
\r\n \r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n
\r\n )}\r\n
\r\n {shops.length > 1 && (\r\n \r\n {({ input }) => (\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n
\r\n Forgot Password\r\n
\r\n \r\n {submitError && !dirtySinceLastSubmit && (\r\n {submitError}\r\n )}\r\n \r\n Sign In\r\n \r\n \r\n Unregistered?{\" \"}\r\n {\r\n e.preventDefault();\r\n setShowLogin(false);\r\n }}\r\n >\r\n click here\r\n \r\n \r\n )}\r\n />\r\n
\r\n );\r\n});\r\n","import axios from \"axios\";\r\nconst API_KEY = \"hQntUGfwjE6MDkW2MBt69w2543\";\r\nconst PostCodeLookUp = {\r\n lookUp: (postCode: string): Promise =>\r\n axios\r\n .get(`https://api.getAddress.io/find/${postCode}?api-key=${API_KEY}`)\r\n .then((res) => {\r\n if (res.status === 400) return false;\r\n return true;\r\n })\r\n .catch( () => {\r\n return false;\r\n }),\r\n};\r\n\r\nexport default PostCodeLookUp;\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { Form as FinalForm, Field } from \"react-final-form\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { IGuest } from \"../../models/user\";\r\nimport { FORM_ERROR, ValidationErrors } from \"final-form\";\r\nimport { FaMapMarkerAlt, FaStore } from \"react-icons/fa\";\r\nimport PostCodeLookUp from \"../../api/agentPostCode\";\r\nimport { observer } from \"mobx-react-lite\";\r\ninterface IProps {\r\n setShowLogin: (show: boolean) => void;\r\n}\r\nexport const GuestBox: React.FC = observer(({ setShowLogin }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { guest } = rootStore.userStore;\r\n const { currentShop, shops, prefilledPostCode } = rootStore.commonStore;\r\n const [errorMsg, setErrorMsg] = useState(\"\");\r\n const [guestValues, setGuestValues] = useState({\r\n appKey: currentShop?.appKey || \"\",\r\n postCode: \"\",\r\n shopCode: currentShop?.shopCode || \"\",\r\n });\r\n useEffect(() => {\r\n if (currentShop)\r\n setGuestValues({\r\n ...guestValues,\r\n appKey: currentShop?.appKey,\r\n shopCode: currentShop?.shopCode,\r\n });\r\n }, [currentShop]);\r\n useEffect(() => {\r\n if(prefilledPostCode && currentShop){\r\n\r\n PostCodeLookUp.lookUp(prefilledPostCode).then((res) => {\r\n if(res)\r\n {\r\n guest({\r\n appKey: currentShop.appKey,\r\n postCode: prefilledPostCode,\r\n shopCode: currentShop.shopCode\r\n }).catch((error) => {\r\n setErrorMsg(error);\r\n })\r\n }\r\n })}\r\n },[prefilledPostCode])\r\n const postCodeValidate = (value: string) => {\r\n if(!value)\r\n return \"Postcode is required\";\r\n else{\r\n }\r\n }\r\n const validate = (values: IGuest) => {\r\n const errors: ValidationErrors = [];\r\n if (!values.postCode) \r\n errors.postCode = \"Postcode is required\";\r\n else{\r\n }\r\n if (!values.shopCode) errors.shopCode = \"Required\";\r\n return errors;\r\n };\r\n return (\r\n
\r\n {\r\n setErrorMsg(\"\");\r\n PostCodeLookUp.lookUp(values.postCode).then((res) => {\r\n if(!res)\r\n return {[FORM_ERROR]: \"Invalid postcode\"};\r\n else{\r\n guest(values).catch((error) => {\r\n setErrorMsg(error);\r\n return {\r\n [FORM_ERROR]: error //\"Sorry, we don't cover your postcode yet!\",\r\n }})\r\n }\r\n })\r\n }\r\n }\r\n render={({\r\n handleSubmit,\r\n submitError,\r\n submitting,\r\n invalid,\r\n pristine,\r\n dirtySinceLastSubmit,\r\n }) => (\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n
\r\n \r\n
\r\n \r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n
\r\n )}\r\n
\r\n {shops.length > 1 && (\r\n \r\n {({ input }) => (\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n )}\r\n
\r\n )}\r\n {(submitError || errorMsg) && (\r\n {(submitError || errorMsg)}\r\n )}\r\n \r\n
\r\n )}\r\n />\r\n \r\n Already have an account?{\" \"}\r\n {\r\n e.preventDefault();\r\n setShowLogin(true);\r\n }}\r\n >\r\n click here\r\n {\" \"}\r\n to sign in\r\n \r\n
\r\n );\r\n});\r\n","import React from \"react\";\r\n\r\nexport const Loader: React.FC<{ message?: string }> = ({ message }) => {\r\n return (\r\n
\r\n

{message}

\r\n
\r\n
\r\n );\r\n};\r\n","import React from \"react\";\r\nimport { Loader } from \"./Loader\";\r\n\r\nexport const LoadingComponent: React.FC<{ message?: string }> = ({\r\n message,\r\n}) => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n};\r\n","import React, { useEffect, useContext } from \"react\";\r\nimport { RouteComponentProps, Redirect } from \"react-router-dom\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\nimport { LoginBox } from \"../components/login/LoginBox\";\r\nimport { GuestBox } from \"../components/login/GuestBox\";\r\nimport { LoadingComponent } from \"../components/Common/LoadingComponent\";\r\nimport { observer } from \"mobx-react-lite\";\r\ninterface RouteParams {\r\n id: string;\r\n}\r\ninterface IProps extends RouteComponentProps {}\r\n\r\nexport const HomePage: React.FC = observer(({ match }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n setInvalidShopCode,\r\n shopUID,\r\n setCurrentShop,\r\n currentShop,\r\n shops,\r\n loadShops,\r\n appLoaded,\r\n setAppLoaded,\r\n CheckShopCodeValid,\r\n invalidShopCode,\r\n validShopCode,\r\n prevRoute\r\n } = rootStore.commonStore;\r\n const { isLoggedIn, showLogin, setShowLogin, user } = rootStore.userStore;\r\n\r\n useEffect(() => {\r\n if (match.params.id.length > 0) {\r\n if (!shopUID || shopUID !== match.params.id){\r\n CheckShopCodeValid(match.params.id);\r\n } \r\n if (shops.length === 0) loadShops();\r\n } else {\r\n setInvalidShopCode();\r\n setAppLoaded();\r\n }\r\n }, [match.params.id, shops]);\r\n\r\n useEffect(() => {\r\n if (shops.length > 0 && !currentShop) {\r\n setCurrentShop();\r\n setAppLoaded();\r\n }\r\n }, [shops]);\r\n useEffect(() => {\r\n if(!validShopCode){\r\n setInvalidShopCode();\r\n setAppLoaded();\r\n }\r\n },[validShopCode])\r\n\r\n useEffect(() =>{\r\n if(currentShop)\r\n setAppLoaded();\r\n },[currentShop])\r\n if (!appLoaded) {\r\n return ;\r\n }\r\n if(invalidShopCode){\r\n return ;\r\n }\r\n if (isLoggedIn) {\r\n if(prevRoute)\r\n return ;\r\n else\r\n if (currentShop?.itemSelectionOptions === 0 || user?.noItemSelect ) \r\n return ;\r\n else\r\n return ;\r\n\r\n } else\r\n return (\r\n
\r\n
\r\n
\r\n \r\n

\r\n {currentShop?.shopName || \"My Drycleaner\"}\r\n

\r\n
\r\n {showLogin ? : }\r\n
\r\n
\r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport {\r\n RouteProps,\r\n RouteComponentProps,\r\n Route,\r\n Redirect,\r\n} from \"react-router-dom\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\n\r\ninterface IProps extends RouteProps {\r\n component: React.ComponentType>;\r\n}\r\n\r\nexport const PrivateRoute: React.FC = observer(\r\n ({ component: Component, ...rest }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { isLoggedIn } = rootStore.userStore;\r\n const { shopUID } = rootStore.commonStore;\r\n return (\r\n \r\n isLoggedIn ? (\r\n \r\n ) : (\r\n \r\n )\r\n }\r\n />\r\n );\r\n }\r\n);\r\n","import { observer } from \"mobx-react-lite\";\r\nimport React, { useContext } from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\n\r\nexport const Navbar = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { shopUID, currentShop, prevRoute } = rootStore.commonStore;\r\n const { user, isLoggedIn, isCustomer, logout, signIn } = rootStore.userStore;\r\n return (\r\n \r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { Navbar } from \"./Navbar\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { Link } from \"react-router-dom\";\r\nexport const Header = () => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { currentShop } = rootStore.commonStore;\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n

\r\n {currentShop?.showCompanyName && (\r\n currentShop?.shopName || \"My Drycleaner\")}\r\n

\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n};\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { IMainCategory } from \"../../models/category\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { confirmAlert } from 'react-confirm-alert';\r\nimport 'react-confirm-alert/src/react-confirm-alert.css'; \r\nimport { history } from \"../../\";\r\n\r\ninterface IProps {\r\n category: IMainCategory;\r\n}\r\nexport const ToolbarButton: React.FC = observer(({ category }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { selectMainCategory, selectedMainCategory } = rootStore.categoryStore;\r\n const { currentShop } = rootStore.commonStore;\r\n const { totalQuantity, setOrderSaved } = rootStore.orderStore;\r\n const { user } = rootStore.userStore;\r\n \r\n return category.position === 0 ? (\r\n currentShop?.itemSelectionOptions === 1 && totalQuantity === 0 ? (\r\n {\r\n // history.push(\"/basket\");\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

Confirm No Item Selection

\r\n
\r\n
\r\n {currentShop.noItemPrompt.split(\"//\").map( (np,index) =>\r\n

{np}

\r\n )}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n }}\r\n >\r\n \r\n \r\n

{category.groupName}

\r\n \r\n ) : (\r\n
\r\n )\r\n ) : (\r\n {\r\n if (selectedMainCategory !== category) {\r\n selectMainCategory(category.groupName);\r\n }\r\n }}\r\n >\r\n \r\n \r\n

{category.groupName}

\r\n \r\n );\r\n});\r\n","import React, { useContext, useEffect } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { ToolbarButton } from \"./ToolbarButton\";\r\n\r\nexport const Toolbar: React.FC = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n mainCategories,\r\n selectMainCategory,\r\n selectedMainCategory,\r\n } = rootStore.categoryStore;\r\n useEffect(() => {\r\n if (selectedMainCategory == null)\r\n if (mainCategories.length > 0)\r\n selectMainCategory(mainCategories[1]?.groupName);\r\n }, [mainCategories, selectedMainCategory, selectMainCategory]);\r\n\r\n return (\r\n
\r\n {mainCategories &&\r\n mainCategories.map((category) => (\r\n \r\n ))}\r\n
\r\n );\r\n});\r\n","import React, { useContext, useState, useEffect, ChangeEvent } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { ISubCategory } from \"../../models/category\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { FaMinusSquare, FaPlusSquare, FaPen, FaEdit } from \"react-icons/fa\";\r\nimport ReactTooltip from \"react-tooltip\";\r\ninterface IProps {\r\n item: ISubCategory | null;\r\n}\r\n\r\nexport const ProductItem: React.FC = observer(({ item }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n showAlterationsEdit,\r\n setShowAlterationsTypeDialog,\r\n alterationUpdated,\r\n setAlterationUpdated,\r\n } = rootStore.categoryStore;\r\n const { currentShop } = rootStore.commonStore;\r\n const {\r\n getOrderDetailForItem,\r\n initOrderDetail,\r\n getAlterationDetailsForItem,\r\n addToOrder,\r\n removeFromOrder,\r\n updateOrderDetail,\r\n removeAllFromOrder,\r\n mainLineNo,\r\n incrementMainLineNo,\r\n setOrderSaved,\r\n setTurnAroundTime,\r\n orderDetails\r\n } = rootStore.orderStore;\r\n const [orderDetail, setOrderDetail] = useState(\r\n initOrderDetail(item!)\r\n );\r\n const [alterations, setAlterations] = useState([]);\r\n const [alterationPrice, setAlterationPrice] = useState(0.0);\r\n const [alterationQty, setAlterationQty] = useState(0);\r\n const [showNotes, setShowNotes] = useState(false);\r\n const [notes, setNotes] = useState('');\r\n useEffect(() => {\r\n if (item) {\r\n setOrderDetail(getOrderDetailForItem(item) || initOrderDetail(item));\r\n setAlterations(getAlterationDetailsForItem(item) || []);\r\n }\r\n }, [\r\n item,\r\n setOrderDetail,\r\n getOrderDetailForItem,\r\n initOrderDetail,\r\n setAlterations,\r\n getAlterationDetailsForItem,\r\n ]);\r\n useEffect(() =>{\r\n if(orderDetails?.length === 0){\r\n setOrderDetail(initOrderDetail(item!));\r\n setAlterations([]);\r\n setAlterationPrice(0);\r\n setAlterationQty(0);\r\n }\r\n }, [orderDetails])\r\n\r\n useEffect(() => {\r\n refreshAlterationTotals();\r\n }, [alterations]);\r\n useEffect(() => {\r\n if(alterationQty > 0)\r\n ReactTooltip.rebuild();\r\n },[alterationQty])\r\n useEffect(() => {\r\n if (alterationUpdated) {\r\n setAlterations(getAlterationDetailsForItem(item!) || []);\r\n setAlterationUpdated(false);\r\n }\r\n }, [alterationUpdated]);\r\n\r\n useEffect(() => {\r\n if(orderDetail)\r\n setNotes(orderDetail.notes);\r\n },[orderDetail]);\r\n\r\n const refreshAlterationTotals = () => {\r\n let qty = 0;\r\n let price = 0.0;\r\n alterations.forEach((a: IOrderDetail) => {\r\n if (a.itemType === \"I\" && a.alteration === \"A\") qty += a.quantity;\r\n price += a.lineTotal;\r\n });\r\n setAlterationPrice(price);\r\n setAlterationQty(qty);\r\n };\r\n const handleShowNotes = () => {\r\n setShowNotes(!showNotes);\r\n };\r\n const handleNotesChanges = (event: ChangeEvent) => {\r\n setNotes(event.target.value);\r\n };\r\n const handleUpdateOrderDetail = () => {\r\n if(orderDetail){\r\n orderDetail.notes = notes;\r\n updateOrderDetail(orderDetail);\r\n }\r\n\r\n }\r\n const handleAddToOrder = () => {\r\n setOrderSaved(0);\r\n let od: IOrderDetail = { ...orderDetail };\r\n if (od.quantity === 0) {\r\n od.mainLineNo = mainLineNo;\r\n od.lineNo = mainLineNo * 100;\r\n od.price = item!.scPrice;\r\n incrementMainLineNo();\r\n setTurnAroundTime(item!.turnAroundTime);\r\n }\r\n od.quantity++;\r\n od.pieces += item!.pieces;\r\n od.lineTotal += item!.scPrice;\r\n od.discount += item!.discount;\r\n if(od.notes !== notes) \r\n od.notes = notes;\r\n setOrderDetail({ ...od });\r\n addToOrder(od);\r\n };\r\n\r\n const handleRemoveFromOrder = () => {\r\n if (orderDetail!.quantity > 1) {\r\n let od: IOrderDetail = {\r\n mainLineNo: orderDetail!.mainLineNo,\r\n lineNo: orderDetail!.lineNo,\r\n mainCategory: item!.groupName,\r\n subCategory: item!.itemName,\r\n scUnique: item!.scUnique,\r\n stkCode: item!.stkCode,\r\n discountQty: 0,\r\n price: item!.scPrice,\r\n quantity: orderDetail!.quantity - 1,\r\n pieces: orderDetail!.pieces - item!.pieces,\r\n lineTotal: orderDetail!.lineTotal - item!.scPrice,\r\n alterationCode: 0,\r\n alteration: \"\",\r\n itemType: \"I\",\r\n collectionCharges: 0,\r\n deliveryCharges: 0,\r\n discountType: item ? (item?.discount > 0 ? \"PR::0:\" : \"\") : \"\",\r\n discount: orderDetail!.discount - item!.discount,\r\n headerDiscount: 0,\r\n notes: orderDetail!.notes ?? '',\r\n };\r\n setOrderDetail({ ...od });\r\n removeFromOrder(item!);\r\n } else {\r\n removeAllFromOrder(orderDetail!);\r\n setOrderDetail(initOrderDetail(item!));\r\n setNotes('');\r\n }\r\n };\r\n\r\n if (item === null) return
Not Found!
;\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n

{item.itemName}

\r\n \r\n £ {item.scPrice.toFixed(2)}\r\n \r\n
\r\n
{item.description}
\r\n
\r\n
\r\n
\r\n {item.buttonCaption}\r\n
\r\n {orderDetail?.quantity > 0 ? (\r\n <>\r\n \r\n \r\n {orderDetail?.quantity}\r\n \r\n \r\n \r\n £ {orderDetail?.lineTotal.toFixed(2)}\r\n \r\n \r\n ) : (\r\n <>\r\n \r\n \r\n )}\r\n {currentShop?.hasUserNotes && orderDetail?.quantity > 0 && ( )}\r\n
\r\n
\r\n
\r\n {currentShop!.hasAlterations && item!.hasAlterations && (\r\n <>\r\n Alteration\r\n {(alterationQty > 0) ? (\r\n <>\r\n
\r\n {alterationQty}\r\n setShowAlterationsTypeDialog(item)} />\r\n \r\n £ {alterationPrice.toFixed(2)}\r\n \r\n showAlterationsEdit(item)} />\r\n
\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n )}\r\n
\r\n
\r\n {showNotes && (\r\n
\r\n
\r\n
\r\n \r\n
\r\n {\r\n var code = e.keyCode || e.which;\r\n if(code === 13)\r\n handleUpdateOrderDetail();\r\n }}\r\n onBlur={(e) => {\r\n handleUpdateOrderDetail();\r\n }}\r\n className=\"input-field\"\r\n type=\"text\"\r\n placeholder=\"Any comments or notes\"\r\n />\r\n
\r\n
\r\n )}\r\n
\r\n \r\n
\r\n );\r\n});\r\n","import React from \"react\";\r\nimport { FaTimesCircle } from \"react-icons/fa\";\r\n\r\ninterface IProps {\r\n title: string;\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n saveData: () => void;\r\n saveDisabled: boolean;\r\n saveLabel?: string;\r\n hasScroll?: boolean;\r\n}\r\n\r\nexport const Dialog: React.FC = ({\r\n children,\r\n title,\r\n showDialog,\r\n hideDialog,\r\n saveData,\r\n saveDisabled,\r\n saveLabel = 'Save',\r\n hasScroll = false\r\n}) => {\r\n return (\r\n
\r\n
\r\n
\r\n

{title}

\r\n \r\n hideDialog()} />\r\n \r\n
\r\n
{children}
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n};\r\n","import React from 'react'\r\nimport { FaTimesCircle } from 'react-icons/fa'\r\ninterface IProps{\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n saveData: () => void;\r\n repair: string;\r\n}\r\nexport const AlterationsDuplicateAlertDialog : React.FC = ({showDialog, hideDialog, saveData, repair}) => {\r\n return (\r\n
\r\n
\r\n
\r\n

Duplicate Entry?

\r\n \r\n hideDialog()} />\r\n \r\n
\r\n
\r\n

You have already added {repair} reapir, do you want to add another identical repair

\r\n\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n )\r\n}\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { Form as FinalForm, Field } from \"react-final-form\";\r\nimport { FaPen } from \"react-icons/fa\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { IAlterationValues } from \"../../models/category\";\r\nimport { FORM_ERROR } from \"final-form\";\r\nimport { AlterationsDuplicateAlertDialog } from \"./AlterationsDuplicateAlertDialog\";\r\n\r\ninterface IProps {\r\n alterations: IOrderDetail[];\r\n setAlterations: (alterations: IOrderDetail[]) => void;\r\n}\r\nexport const AlterationForm: React.FC = observer(\r\n ({ alterations, setAlterations }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n selectedItem,\r\n alterMainCategories,\r\n alterSubCategories,\r\n loadingAlterCategories,\r\n loadingAlterations,\r\n loadAlterCategories,\r\n loadAlterations,\r\n selectedMainLineNo,\r\n selectedAlterCategory,\r\n selectedAlteration,\r\n setSelectedAlterCategory,\r\n setSelectedAlteration,\r\n resetAlterations,\r\n alterationsType\r\n } = rootStore.categoryStore;\r\n const { mainLineNo, setTurnAroundTime } = rootStore.orderStore;\r\n const [alterValues, setAlterValues] = useState({\r\n alterType: 1,\r\n mainCategory: \"\",\r\n subCategory: \"\",\r\n price: 0,\r\n notes: \"\",\r\n });\r\n const [showDuplicateAlert, setShowDuplicateAlert] = useState(false);\r\n const [duplicateRepair,setDuplicateRepair] = useState(\"\");\r\n const [lineNo, setLineNo] = useState(selectedMainLineNo > 0 ? selectedMainLineNo * 100 : mainLineNo * 100);\r\n const [mainOrderDetail, setMainOrderDetail] = useState();\r\n useEffect(() => {\r\n if (selectedItem) {\r\n loadAlterCategories(selectedItem!.mcUniques);\r\n }\r\n return () => {\r\n resetAlterations();\r\n }\r\n }, [selectedItem]);\r\n useEffect(() => {\r\n if (alterMainCategories.length === 1) \r\n setSelectedAlterCategory(alterMainCategories[0]);\r\n else {\r\n setSelectedAlterCategory(undefined);\r\n setSelectedAlteration(undefined);\r\n loadAlterations(undefined);\r\n }\r\n }, [alterMainCategories, setSelectedAlterCategory]);\r\n\r\n useEffect(() => {\r\n if (selectedAlterCategory) \r\n loadAlterations(selectedAlterCategory.mcUnique);\r\n },[selectedAlterCategory, loadAlterations]);\r\n\r\n useEffect(() => {\r\n if (alterSubCategories.length === 1) {\r\n setSelectedAlteration(alterSubCategories[0]);\r\n }\r\n }, [alterSubCategories, setSelectedAlteration]);\r\n useEffect(() => {\r\n if (selectedAlteration) {\r\n const { pmPrice, itemName } = selectedAlteration;\r\n setAlterValues({\r\n ...alterValues,\r\n price: pmPrice,\r\n subCategory: itemName,\r\n mainCategory: selectedAlterCategory?.groupName || \"\",\r\n });\r\n }\r\n }, [selectedAlteration]);\r\n useEffect(() => {\r\n if(alterations.length > 0 && selectedMainLineNo > 0){\r\n var mainOD = alterations.find(a => a.mainLineNo === selectedMainLineNo && a.alteration === \"A\");\r\n setMainOrderDetail(mainOD);\r\n if(mainOD){\r\n setAlterValues({\r\n ...alterValues,\r\n alterType: mainOD.alterationCode === 5 ? 2 : 1\r\n })\r\n }\r\n }\r\n },[alterations,selectedMainLineNo, setMainOrderDetail])\r\n const hideAltert = () => {\r\n setShowDuplicateAlert(false);\r\n setAlterValues({\r\n alterType: 1,\r\n mainCategory: alterMainCategories.length === 1 ? alterMainCategories[0].groupName : \"Select an Item\",\r\n subCategory: alterSubCategories.length === 1 ? alterSubCategories[0].groupName : \"Select A Repair\",\r\n price: 0,\r\n notes: \"\",\r\n });\r\n setSelectedAlteration(undefined);\r\n setDuplicateRepair(\"\");\r\n }\r\n\r\n const handleAlterCategoryChange = (name: string) => {\r\n let cat = alterMainCategories.find(c => c.groupName === name);\r\n setSelectedAlterCategory(cat);\r\n if(cat){\r\n setAlterValues({...alterValues, mainCategory: cat.groupName})\r\n } else {\r\n setAlterValues({...alterValues, mainCategory: '', subCategory: '', price: 0})\r\n }\r\n }\r\n const handleAlterationChange = (name: string) => {\r\n let alter = alterSubCategories.find(a => a.itemName === name);\r\n setSelectedAlteration(alter);\r\n if(alter){\r\n setAlterValues({...alterValues, subCategory: alter.itemName, price: alter.scPrice})\r\n } else {\r\n setAlterValues({...alterValues, subCategory: '', price: 0})\r\n }\r\n }\r\n\r\n const isDisabled = () : boolean => {\r\n return (!selectedAlterCategory || !selectedAlteration); \r\n }\r\n const handleFormSubmit = ({\r\n mainCategory,\r\n subCategory,\r\n price,\r\n notes,\r\n }: IAlterationValues) => {\r\n if (\r\n alterations.some((a) =>\r\n a.mainCategory === mainCategory && a.subCategory === subCategory\r\n )) {\r\n setDuplicateRepair(subCategory);\r\n setShowDuplicateAlert(true);\r\n } else {\r\n saveAlterations({\r\n mainCategory,\r\n subCategory,\r\n price,\r\n notes,\r\n })\r\n }\r\n\r\n }\r\n const saveAlterations = ({\r\n mainCategory,\r\n subCategory,\r\n price,\r\n notes,\r\n }: IAlterationValues) => {\r\n \r\n if(mainCategory === \"\" || mainCategory === \"Select an Item\" || price === 0 || subCategory === \"\" || subCategory === \"Select a Repair\")\r\n return {\r\n [FORM_ERROR]: `Cannot insert blank values!`,\r\n };\r\n let alter: IOrderDetail[] = [];\r\n let ln = lineNo;\r\n if(selectedMainLineNo === 0){\r\n ln = mainLineNo*100;\r\n } else {\r\n ln = selectedMainLineNo * 100;\r\n }\r\n alterations.forEach(a => {\r\n if(a.lineNo > ln) ln = a.lineNo\r\n })\r\n setLineNo(ln);\r\n if (alterations.length === 0) {\r\n alter.push({\r\n mainLineNo: mainLineNo,\r\n lineNo: ln,\r\n mainCategory: selectedItem!.groupName,\r\n subCategory: selectedItem!.itemName,\r\n scUnique: selectedItem!.scUnique,\r\n stkCode: selectedItem!.stkCode,\r\n discountQty: 0,\r\n quantity: 1,\r\n pieces: selectedItem!.pieces,\r\n price: alterationsType === 1 ? selectedItem!.scPrice : 0,\r\n lineTotal: alterationsType === 1 ? selectedItem!.scPrice : 0,\r\n alterationCode: alterationsType === 1 ? 0 : 5,\r\n alteration: \"A\",\r\n itemType: \"I\",\r\n collectionCharges: 0,\r\n deliveryCharges: 0,\r\n discountType: alterationsType === 1 ?\r\n (selectedItem!.discount > 0\r\n ? `PR::0:${selectedItem?.pmPrice}`\r\n : \"\") : \"\",\r\n discount: alterationsType === 1 ? selectedItem!.discount : 0,\r\n headerDiscount: 0,\r\n notes: \"\",\r\n });\r\n }\r\n alter.push({\r\n mainLineNo: selectedMainLineNo > 0 ? selectedMainLineNo : mainLineNo,\r\n lineNo: ++ln,\r\n mainCategory: mainCategory,\r\n subCategory: subCategory,\r\n scUnique: selectedAlteration!.scUnique,\r\n stkCode: selectedAlteration!.stkCode,\r\n discountQty: 0,\r\n quantity: 1,\r\n pieces: 0, //selectedItem!.pieces,\r\n price: price,\r\n lineTotal: selectedAlteration!.scPrice,\r\n alterationCode: 0,\r\n alteration: \"\",\r\n itemType: \"S\",\r\n collectionCharges: 0,\r\n deliveryCharges: 0,\r\n discountType: \"\",\r\n discount: 0,\r\n headerDiscount: 0,\r\n notes: notes,\r\n });\r\n setAlterations([...alterations, ...alter]);\r\n setLineNo(ln);\r\n loadAlterations(selectedAlterCategory?.mcUnique)\r\n if (alterMainCategories.length === 1) {\r\n setSelectedAlterCategory(alterMainCategories[0]);\r\n }\r\n setAlterValues({\r\n alterType: 1,\r\n mainCategory: alterMainCategories.length === 1 ? alterMainCategories[0].groupName : \"Select an Item\",\r\n subCategory: alterSubCategories.length === 1 ? alterSubCategories[0].groupName : \"Select A Repair\",\r\n price: 0,\r\n notes: \"\",\r\n });\r\n setSelectedAlteration(undefined);\r\n setTurnAroundTime(selectedItem!.turnAroundTime);\r\n };\r\n return (\r\n <>\r\n {\r\n utils.changeValue(state,field, () => value);\r\n }\r\n }\r\n }\r\n onSubmit={handleFormSubmit}\r\n render={({ form, handleSubmit, submitError, dirtySinceLastSubmit}) => {\r\n // @ts-ignore\r\n window.globalThis.form = window.globalThis.form ?? form;\r\n return (\r\n
\r\n \r\n {(input) => (\r\n
\r\n \r\n {\r\n handleAlterCategoryChange(e.target.value);\r\n }}\r\n >\r\n {!loadingAlterCategories ? (\r\n <>\r\n { alterMainCategories.length > 1 && (\r\n \r\n )}\r\n {alterMainCategories.map((cat) => (\r\n \r\n ))}\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
\r\n )}\r\n
\r\n \r\n {(input) => (\r\n
\r\n \r\n {\r\n handleAlterationChange(e.target.value);\r\n }}\r\n >{!loadingAlterations ? (\r\n <>\r\n { (alterSubCategories.length > 1) && (\r\n \r\n ) }\r\n {alterSubCategories.map((alt) => (\r\n \r\n ))}\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
\r\n )}\r\n
\r\n \r\n {(input) => (\r\n
\r\n \r\n \r\n £ \r\n {selectedAlteration?.scPrice?.toFixed(2) ?? 0.0}\r\n \r\n \r\n
\r\n )}\r\n
\r\n\r\n \r\n {(input) => (\r\n
\r\n
\r\n \r\n
\r\n \r\n setAlterValues({ ...alterValues, notes: e.target.value })\r\n }\r\n />\r\n
\r\n )}\r\n
\r\n {submitError && !dirtySinceLastSubmit && (\r\n {submitError}\r\n )}\r\n
\r\n \r\n
\r\n
\r\n )}}\r\n />\r\n {(showDuplicateAlert && duplicateRepair) && ( {setShowDuplicateAlert(false); saveAlterations(alterValues);}} showDialog={showDuplicateAlert} hideDialog={hideAltert} repair={duplicateRepair!} />)}\r\n \r\n );\r\n }\r\n);\r\n","import React from \"react\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { FaEdit, FaMinusSquare } from \"react-icons/fa\";\r\nimport { observer } from \"mobx-react-lite\";\r\ninterface IProps {\r\n orderDetail: IOrderDetail;\r\n removeOrderDetail: (orderDetail: IOrderDetail) => void;\r\n editOrderDetail: (orderDetail: IOrderDetail) => void;\r\n}\r\nexport const AlterationRow: React.FC = observer(\r\n ({ orderDetail, removeOrderDetail, editOrderDetail }) => {\r\n return (\r\n <>\r\n
\r\n
{orderDetail.mainCategory}
\r\n
{orderDetail.subCategory}
\r\n
\r\n £ {orderDetail.price.toFixed(2)}\r\n
\r\n
\r\n {\r\n e.preventDefault();\r\n removeOrderDetail(orderDetail);\r\n }}\r\n />\r\n
\r\n
\r\n {\r\n e.preventDefault();\r\n editOrderDetail(orderDetail);\r\n }}\r\n />\r\n
\r\n
\r\n {orderDetail.notes && (\r\n
\r\n Notes: {orderDetail.notes}\r\n
\r\n )}\r\n \r\n );\r\n }\r\n);\r\n","import React from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { FaEdit } from \"react-icons/fa\";\r\n\r\ninterface IProps {\r\n itemName: string;\r\n price: number;\r\n handleAlterTypeEdit: () => void;\r\n}\r\nexport const AlterationGridHeader: React.FC = observer(\r\n ({ itemName, price, handleAlterTypeEdit }) => {\r\n return (\r\n
\r\n
{itemName}
\r\n
{price === 0 ? 'No Clean' : 'Clean Charges'}
\r\n
£ {price.toFixed(2)}
\r\n
 
\r\n
handleAlterTypeEdit()} />
\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useContext } from \"react\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { AlterationRow } from \"./AlterationRow\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { AlterationGridHeader } from \"./AlterationGridHeader\";\r\n\r\ninterface IProps {\r\n alterations: IOrderDetail[];\r\n handleRemoveAlteration: (alterations: IOrderDetail) => void;\r\n editAlterationNote: (alteration: IOrderDetail) => void;\r\n handleAlterTypeEdit: () => void;\r\n}\r\nexport const AlterationGrid: React.FC = observer(\r\n ({ alterations, handleRemoveAlteration, editAlterationNote, handleAlterTypeEdit }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { selectedItem } = rootStore.categoryStore;\r\n\r\n return (\r\n
\r\n {alterations.length > 0 && (\r\n <>\r\n
\r\n
Item
\r\n
Service
\r\n
Price
\r\n
\r\n a.itemType === 'I')?.price === 0 ? 0 : selectedItem!.scPrice}\r\n handleAlterTypeEdit={handleAlterTypeEdit}\r\n />\r\n \r\n )}\r\n {alterations.filter(a => a.itemType !== 'I').sort((a,b) => {return (a.lineNo - b.lineNo)}).map((detail) => (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { observer } from \"mobx-react-lite\";\r\n\r\ninterface IProps {\r\n alterations: IOrderDetail[];\r\n}\r\nexport const AlterationFooter: React.FC = observer(\r\n ({ alterations }) => {\r\n const [totalPrice, setTotalPrice] = useState(0.0);\r\n const [totalQty, setTotalQty] = useState(0);\r\n\r\n useEffect(() => {\r\n let qty = 0;\r\n let price = 0.0;\r\n alterations.forEach((a: IOrderDetail) => {\r\n if (a.itemType === \"S\") qty += a.quantity;\r\n price += a.lineTotal;\r\n });\r\n setTotalPrice(price);\r\n setTotalQty(qty);\r\n }, [alterations, setTotalPrice, setTotalQty]);\r\n\r\n return (\r\n
\r\n
\r\n Alterations: \r\n {totalQty}\r\n
\r\n
\r\n Total: \r\n £ {totalPrice.toFixed(2)}\r\n
\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useState } from 'react'\r\nimport { FaPen } from 'react-icons/fa';\r\nimport { IOrderDetail } from '../../models/order';\r\nimport { Dialog } from '../Common/Dialog';\r\ninterface IProp {\r\n alteration: IOrderDetail;\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n updateAlterationNote: (alteration: IOrderDetail) => void;\r\n}\r\nexport const AlterationNoteEditDialog : React.FC = ({alteration, showDialog, hideDialog, updateAlterationNote}) => {\r\n const [note, setNote] = useState(alteration.notes)\r\n const saveData = () => {\r\n updateAlterationNote({...alteration, notes:note});\r\n hideDialog();\r\n }\r\n return (\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n setNote(e.target.value)\r\n }\r\n />\r\n
\r\n
\r\n \r\n );\r\n}\r\n","import { observer } from 'mobx-react-lite';\r\nimport React, { ChangeEvent, useState } from 'react'\r\nimport { Dialog } from '../Common/Dialog';\r\ninterface IProps{\r\n defaultType: number;\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n saveDialog: (type: number) => void;\r\n}\r\nexport const AlterationsTypeEditDialog: React.FC = observer(({defaultType,showDialog,hideDialog,saveDialog}) => {\r\n \r\n const [alterType, setAlterType] = useState(defaultType);\r\n const handleAlterationTypeChange = (event: ChangeEvent) => {\r\n let type = parseInt(event.target.value);\r\n if(type !== alterType)\r\n setAlterType(type);\r\n }\r\n\r\n return (\r\n saveDialog(alterType)}\r\n saveDisabled={false}\r\n saveLabel='Save'\r\n >\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n );\r\n});\r\n","import React, { useContext, useState, useEffect } from \"react\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { Dialog } from \"../Common/Dialog\";\r\nimport { AlterationForm } from \"./AlterationForm\";\r\nimport { AlterationGrid } from \"./AlterationGrid\";\r\nimport { AlterationFooter } from \"./AlterationFooter\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { AlterationNoteEditDialog } from \"./AlterationNoteEditDialog\";\r\nimport { AlterationsTypeEditDialog } from \"./AlterationsTypeEditDialog\";\r\nimport { confirmAlert } from \"react-confirm-alert\";\r\n\r\nexport const AlterationDialog = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n selectedItem,\r\n showAlterationDialog,\r\n showAlterationsEdit,\r\n hideAlterations,\r\n setAlterationUpdated,\r\n selectedMainLineNo,\r\n setAlterationsType,\r\n alterationsType,\r\n alterationDialogEditMode\r\n } = rootStore.categoryStore;\r\n const {\r\n addAlterations,\r\n updateAlterations,\r\n incrementMainLineNo,\r\n getAlterationDetails,\r\n removeAlteration, \r\n removeAllAlterations\r\n } = rootStore.orderStore;\r\n const {user} = rootStore.userStore;\r\n const [alterations, setAlterations] = useState([]);\r\n const [removedAlterations, setRemovedAlterations] = useState([]);\r\n const [showEditAlterationNote, setShowEditAlterationNote ] = useState(false);\r\n const [showAlterationType, setShowAlterationType] = useState(false);\r\n const [selectedAlteration, setSelectedAlteration] = useState();\r\n useEffect(() => {\r\n if (selectedItem)\r\n if(alterationDialogEditMode){\r\n setAlterations(getAlterationDetails(selectedMainLineNo));\r\n }\r\n }, [\r\n selectedItem,\r\n alterationDialogEditMode,\r\n setAlterations,\r\n getAlterationDetails\r\n ]);\r\n\r\n const saveAlterations = () => {\r\n if(alterationDialogEditMode && removedAlterations.length > 0){\r\n if(alterations.length === 0){\r\n removeAllAlterations(removedAlterations[0].mainLineNo);\r\n } else {\r\n removedAlterations.forEach((alteration) => {\r\n removeAlteration(alteration.mainLineNo,alteration.lineNo);\r\n })\r\n }\r\n } else {\r\n if (selectedMainLineNo === 0) {\r\n addAlterations(alterations);\r\n incrementMainLineNo();\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

Important Note

\r\n
\r\n
\r\n

{user?.alterationsMessage}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n } else {\r\n updateAlterations(alterations);\r\n showAlterationsEdit(selectedItem!);\r\n }\r\n }\r\n setAlterationUpdated(true);\r\n setAlterationsType(1);\r\n hideAlterations();\r\n };\r\n\r\n const cancelAlterations = () => {\r\n if (selectedMainLineNo > 0){\r\n showAlterationsEdit(selectedItem!);\r\n }\r\n setAlterationUpdated(false);\r\n setAlterationsType(1);\r\n hideAlterations();\r\n };\r\n const editAlterationNote = (alteration: IOrderDetail) => {\r\n setSelectedAlteration(alteration);\r\n setShowEditAlterationNote(true);\r\n }\r\n const hideEditNoteDialog = () => {\r\n setShowEditAlterationNote(false);\r\n }\r\n const updateAlterationNotes = (alteration: IOrderDetail) => {\r\n setAlterations([\r\n ...alterations.filter((a) => a.lineNo !== alteration.lineNo),alteration\r\n ]);\r\n };\r\n const handleRemoveAlteration = (detail: IOrderDetail) => {\r\n if (alterations.length > 2) {\r\n setAlterations([\r\n ...alterations.filter((a) => a.lineNo !== detail.lineNo),\r\n ]);\r\n } else {\r\n setAlterations([\r\n ...alterations.filter((a) => a.mainLineNo !== detail.mainLineNo),\r\n ]);\r\n }\r\n if(alterationDialogEditMode){\r\n setRemovedAlterations([...removedAlterations,detail])\r\n }\r\n\r\n };\r\n const handleSaveAlterationType = (alterType: number) => {\r\n if(alterations.length > 0){\r\n let mainDetails = alterations.find(a => a.alteration === 'A' && a.itemType === 'I');\r\n if(mainDetails){\r\n let alterationDetail = {\r\n mainLineNo: mainDetails.mainLineNo,\r\n lineNo: mainDetails.lineNo,\r\n mainCategory: mainDetails.mainCategory,\r\n subCategory: mainDetails.subCategory,\r\n scUnique: mainDetails.scUnique,\r\n stkCode: mainDetails.stkCode,\r\n discountQty: 0,\r\n quantity: 1,\r\n pieces: selectedItem!.pieces,\r\n price: alterType === 1 ? selectedItem!.scPrice : 0,\r\n lineTotal: alterType === 1 ? selectedItem!.scPrice : 0,\r\n alterationCode: alterType === 1 ? 0 : 5,\r\n alteration: \"A\",\r\n itemType: \"I\",\r\n collectionCharges: 0,\r\n deliveryCharges: 0,\r\n discountType: alterType === 1 ?\r\n (selectedItem!.discount > 0\r\n ? `PR::0:${selectedItem?.pmPrice}`\r\n : \"\") : \"\",\r\n discount: alterType === 1 ? selectedItem!.discount : 0,\r\n headerDiscount: 0,\r\n notes: \"\",\r\n };\r\n setAlterations([...alterations.filter((a) => a.mainLineNo !== alterationDetail.mainLineNo || (a.mainLineNo === alterationDetail.mainLineNo && a.lineNo !== alterationDetail.lineNo)),alterationDetail]);\r\n }\r\n }\r\n setShowAlterationType(false);\r\n }\r\n return (\r\n \r\n \r\n setShowAlterationType(true)}\r\n />\r\n \r\n {showEditAlterationNote && }\r\n {showAlterationType && setShowAlterationType(false)} />}\r\n \r\n );\r\n});\r\n","import { observer } from 'mobx-react-lite'\r\nimport React, { useContext } from 'react'\r\nimport { FaEdit } from 'react-icons/fa';\r\nimport { IOrderDetail } from '../../models/order'\r\nimport { RootStoreContext } from '../../stores/rootStore';\r\ninterface IProps{\r\n order: IOrderDetail;\r\n}\r\nexport const AlterationGroupHeader : React.FC = observer( ({order}) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { setShowAlterationTypeDialog, setAlterationsType } = rootStore.categoryStore;\r\n const handleAlterTypeEdit = () => {\r\n setAlterationsType(order.alterationCode === 5 ? 2 : 1)\r\n setShowAlterationTypeDialog(order.mainLineNo)\r\n }\r\n return (\r\n <>\r\n
\r\n
{order.subCategory}
\r\n
\r\n
\r\n
{order.price === 0 ? \"No Clean\" : \"Clean\"}
\r\n
\r\n £ {order.price.toFixed(2)}\r\n
\r\n
\r\n handleAlterTypeEdit()} />\r\n
\r\n
\r\n \r\n );\r\n});\r\n","import React from \"react\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { FaMinusSquare } from \"react-icons/fa\";\r\nimport { observer } from \"mobx-react-lite\";\r\ninterface IProps {\r\n orderDetail: IOrderDetail;\r\n removeOrderDetail: (orderDetail: IOrderDetail) => void;\r\n}\r\nexport const AlterationGroupRow: React.FC = observer(\r\n ({ orderDetail, removeOrderDetail }) => {\r\n return (\r\n <>\r\n
\r\n
{orderDetail.subCategory}
\r\n
\r\n £ {orderDetail.price.toFixed(2)}\r\n
\r\n
\r\n {\r\n e.preventDefault();\r\n removeOrderDetail(orderDetail);\r\n }}\r\n />\r\n
\r\n
\r\n {orderDetail.notes && (\r\n
\r\n Notes: {orderDetail.notes}\r\n
\r\n )}\r\n \r\n );\r\n }\r\n);\r\n","import { observer } from 'mobx-react-lite';\r\nimport React, { useContext, useEffect, useState } from 'react'\r\nimport { FaTimesCircle } from 'react-icons/fa';\r\nimport { ISubCategory } from '../../models/category';\r\nimport { IAlterations, IOrderDetail } from '../../models/order';\r\nimport { RootStoreContext } from '../../stores/rootStore';\r\nimport { AlterationGroupHeader } from './AlterationGroupHeader';\r\nimport { AlterationGroupRow } from './AlterationGroupRow';\r\n\r\n\r\nexport const AlterationEditDialog = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n selectedItem,\r\n showAlterationEditDialog,\r\n showAlterationsAddEdit,\r\n hideAlterationsEdit,\r\n setAlterationUpdated,\r\n alterationUpdated,\r\n alterationTypeUpdated,\r\n setAlterationTypeUpdated\r\n } = rootStore.categoryStore;\r\nconst {\r\n getAlterationDetailsForItem,\r\n deleteAlteration\r\n } = rootStore.orderStore;\r\n const [alterations, setAlterations] = useState([]);\r\n const [alterationGroups, setAlterationGroups] = useState([])\r\n \r\n const groupAlterations = () => {\r\n let orders: IAlterations[] = [];\r\n let groups = alterations.filter(a => a.itemType === 'I');\r\n groups.forEach(ord => {\r\n let alteration: IAlterations = {\r\n order: ord,\r\n alterations: alterations.filter(a => a.mainLineNo === ord.mainLineNo && a.itemType === 'S'),\r\n };\r\n orders.push(alteration); \r\n });\r\n setAlterationGroups(orders);\r\n }\r\n useEffect(() => {\r\n if (selectedItem)\r\n setAlterations(getAlterationDetailsForItem(selectedItem) || []);\r\n }, [selectedItem]);\r\n useEffect(() => {\r\n if(selectedItem && alterationUpdated)\r\n setAlterations(getAlterationDetailsForItem(selectedItem) || [])\r\n },[alterationUpdated])\r\n useEffect(() => {\r\n if(alterations) \r\n groupAlterations();\r\n },[alterations]);\r\n useEffect(() => {\r\n if(selectedItem && alterationTypeUpdated){\r\n setAlterations(getAlterationDetailsForItem(selectedItem) || [])\r\n setAlterationTypeUpdated(false);\r\n }\r\n },[alterationTypeUpdated])\r\n const removeOrderDetail = (detail: IOrderDetail) => {\r\n if (alterations.length > 2) {\r\n setAlterations([\r\n ...alterations.filter((a) => a.lineNo !== detail.lineNo),\r\n ]);\r\n } else {\r\n setAlterations([\r\n ...alterations.filter((a) => a.mainLineNo !== detail.mainLineNo),\r\n ]);\r\n }\r\n deleteAlteration(detail.mainLineNo,detail.lineNo);\r\n groupAlterations();\r\n };\r\n const saveAlterations = () => {\r\n setAlterationUpdated(true);\r\n hideAlterationsEdit();\r\n };\r\n const addEditAlterations = (item: ISubCategory, mainLineNo: number) => {\r\n if(item)\r\n showAlterationsAddEdit(item,mainLineNo);\r\n hideAlterationsEdit();\r\n }\r\n return (\r\n
\r\n
\r\n
\r\n

{`View Alterations - ${selectedItem?.itemName}`}

\r\n \r\n \r\n \r\n
\r\n
\r\n {alterationGroups.map(({order, alterations}) => (\r\n
\r\n \r\n {alterations.map(detail => (\r\n ))}\r\n \r\n
\r\n ))\r\n }\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n )\r\n});\r\n","import { observer } from 'mobx-react-lite';\r\nimport React, { ChangeEvent, useContext, useEffect, useState } from 'react'\r\nimport { RootStoreContext } from '../../stores/rootStore';\r\nimport { Dialog } from '../Common/Dialog';\r\n\r\nconst AlterationsTypeDialog = () => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n selectedItem,\r\n showAlterations,\r\n showAlterationsTypeDialog,\r\n hideAlterationsTypeDialog,\r\n setAlterationsType,\r\n alterationsType,\r\n alterationsTypeEditMode,\r\n setAlterationTypeUpdated,\r\n selectedMainLineNo,\r\n } = rootStore.categoryStore;\r\n const {\r\n mainAlterationDetail,\r\n setMainAlterationDetail,\r\n getMainAlterationDetails,\r\n updateAlterationsType\r\n } = rootStore.orderStore;\r\n useEffect(() => {\r\n if(selectedMainLineNo > 0)\r\n setMainAlterationDetail(getMainAlterationDetails(selectedMainLineNo));\r\n }, [\r\n selectedMainLineNo,\r\n setMainAlterationDetail,\r\n getMainAlterationDetails\r\n ]);\r\n const [alterType, setAlterType] = useState(alterationsType > 0 ? alterationsType : 1);\r\n const handleAlterationTypeChange = (event: ChangeEvent) => {\r\n let type = parseInt(event.target.value);\r\n if(type !== alterType)\r\n setAlterType(type);\r\n }\r\n const handleSaveAlterationsType = () => {\r\n \r\n setAlterationsType(alterType);\r\n if(selectedMainLineNo !== 0 && mainAlterationDetail){\r\n let alterationDetail = {\r\n mainLineNo: mainAlterationDetail!.mainLineNo,\r\n lineNo: mainAlterationDetail!.lineNo,\r\n mainCategory: mainAlterationDetail!.mainCategory,\r\n subCategory: mainAlterationDetail!.subCategory,\r\n scUnique: mainAlterationDetail!.scUnique,\r\n stkCode: mainAlterationDetail!.stkCode,\r\n discountQty: 0,\r\n quantity: 1,\r\n pieces: selectedItem!.pieces,\r\n price: alterType === 1 ? selectedItem!.scPrice : 0,\r\n lineTotal: alterType === 1 ? selectedItem!.scPrice : 0,\r\n alterationCode: alterType === 1 ? 0 : 5,\r\n alteration: \"A\",\r\n itemType: \"I\",\r\n collectionCharges: 0,\r\n deliveryCharges: 0,\r\n discountType: alterType === 1 ?\r\n (selectedItem!.discount > 0\r\n ? `PR::0:${selectedItem?.pmPrice}`\r\n : \"\") : \"\",\r\n discount: alterType === 1 ? selectedItem!.discount : 0,\r\n headerDiscount: 0,\r\n notes: \"\",\r\n }\r\n setMainAlterationDetail(alterationDetail)\r\n updateAlterationsType(alterationDetail);\r\n }\r\n hideAlterationsTypeDialog();\r\n if(!alterationsTypeEditMode) \r\n showAlterations();\r\n else\r\n setAlterationTypeUpdated(true);\r\n }\r\n\r\n const handleHideDialog = () => {\r\n setAlterType(1);\r\n hideAlterationsTypeDialog();\r\n }\r\n\r\nreturn (\r\n 0 ? 'Save' : 'Next'}\r\n >\r\n
\r\n \r\n\r\n \r\n
\r\n \r\n );\r\n}\r\n\r\nexport default observer(AlterationsTypeDialog);","import React, { useContext, useEffect } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { ProductItem } from \"./ProductItem\";\r\nimport { AlterationDialog } from \"../Alterations/AlterationDialog\";\r\nimport { AlterationEditDialog } from \"../Alterations/AlterationEditDialog\";\r\nimport { LoadingComponent } from \"../Common/LoadingComponent\";\r\nimport AlterationsTypeDialog from \"../Alterations/AlterationsTypeDialog\";\r\n\r\nexport const ProductList: React.FC = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n selectedMainCategory,\r\n subCategories,\r\n loadSubCategories,\r\n loadingSubCategories,\r\n showAlterationDialog,\r\n showAlterationEditDialog,\r\n showAlterationsTypeDialog\r\n } = rootStore.categoryStore;\r\n\r\n useEffect(() => {\r\n if (selectedMainCategory !== null)\r\n loadSubCategories(selectedMainCategory?.groupName);\r\n }, [selectedMainCategory, loadSubCategories]);\r\n if (loadingSubCategories)\r\n return
\r\n \r\n
;\r\n\r\n return (\r\n
\r\n
\r\n {subCategories.map((item) => (\r\n \r\n ))}\r\n
\r\n {showAlterationDialog && }\r\n {showAlterationEditDialog && }\r\n {showAlterationsTypeDialog && }\r\n
\r\n );\r\n});\r\n","import { observer } from \"mobx-react-lite\";\r\nimport React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\n\r\nexport const Footer: React.FC = observer(({ children }) => {\r\n return (\r\n
\r\n {children && children}\r\n
\r\n
Copyright © 2020 My Drycleaner. All rights reserved.
\r\n
\r\n
    \r\n
  • \r\n Terms & Conditions\r\n
  • \r\n
  • \r\n Privacy Policy\r\n
  • \r\n
  • \r\n FAQs\r\n
  • \r\n
  • \r\n Contact Us\r\n
  • \r\n
\r\n
\r\n
\r\n
\r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { history } from \"../../\";\r\nimport { confirmAlert } from \"react-confirm-alert\";\r\n\r\nexport const ProductsFooter = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { totalPieces, totalGrossAmount, orderDetails, currentOrder, setShowBasket } = rootStore.orderStore;\r\n const { user } = rootStore.userStore;\r\n const handleCheckout = () => {\r\n if(orderDetails.length === 0){\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

Confirm No Item Selection

\r\n
\r\n
\r\n

There are no items in your basket, Please select the items or select Skip Item Selection

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n }\r\n else\r\n user?.isCustomer ? history.push(\"/basket\") : history.push(\"/newcustomer\");\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n {currentOrder && currentOrder.orderNo > 0 && (\r\n {`Changing Order No ${currentOrder.orderNo}`}\r\n )}\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n setShowBasket(true)}\r\n className=\"btn-medium btn-cancel\"\r\n >\r\n View Order\r\n \r\n \r\n Next\r\n \r\n
\r\n
\r\n
\r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { IOrderDetail } from \"../../models/order\";\r\nimport { FaMinusSquare } from \"react-icons/fa\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\n\r\ninterface IProps {\r\n orderDetail: IOrderDetail;\r\n}\r\nexport const OrderDetailRow: React.FC = observer(({ orderDetail }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { deleteOrderDetail } = rootStore.orderStore;\r\n\r\n return (\r\n \r\n
\r\n {orderDetail.itemType === \"I\" ? `${orderDetail.quantity} x` : \"\"}\r\n
\r\n\r\n \r\n {orderDetail.subCategory}\r\n \r\n {/*
\r\n £{orderDetail.price.toFixed(2)}\r\n
*/}\r\n
\r\n £{orderDetail.lineTotal.toFixed(2)}\r\n
\r\n
\r\n \r\n deleteOrderDetail(orderDetail.mainLineNo, orderDetail.lineNo)\r\n }\r\n />\r\n
\r\n \r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { OrderDetailRow } from \"./OrderDetailRow\";\r\ninterface IProps{\r\n handleDiscardChanges : () => void;\r\n}\r\nexport const BasketOrderDetails : React.FC = observer(({handleDiscardChanges}) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { orderDetails } = rootStore.orderStore;\r\n return (\r\n
\r\n
\r\n

Details

\r\n \r\n
\r\n
\r\n {orderDetails && orderDetails.length > 0 ? (\r\n orderDetails\r\n .sort((d1, d2) => d1.mainLineNo - d2.mainLineNo)\r\n .map((od) => )\r\n ) : (\r\n
\r\n No items selected\r\n
\r\n )}\r\n
\r\n
\r\n );\r\n});\r\n","import { observer } from 'mobx-react-lite'\r\nimport React, { useContext } from 'react'\r\nimport { FaTimesCircle } from \"react-icons/fa\";\r\nimport { RootStoreContext } from '../../stores/rootStore';\r\nimport { BasketOrderDetails } from './BasketOrderDetails';\r\n\r\ninterface IProps {\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n handleCheckOut: () => void;\r\n handleDiscardChanges: () => void;\r\n}\r\n\r\nconst BasketDialog: React.FC = ({\r\n showDialog,\r\n hideDialog,\r\n handleCheckOut,\r\n handleDiscardChanges\r\n}) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { totalPieces, totalGrossAmount, totalDiscount } = rootStore.orderStore;\r\n const { user } = rootStore.userStore;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Order

\r\n \r\n hideDialog()} />\r\n \r\n
\r\n
\r\n \r\n
\r\n

Totals

\r\n
\r\n
\r\n
Total Pieces
\r\n
{totalPieces}
\r\n
\r\n\r\n
\r\n
Total Amount
\r\n
\r\n £\r\n {totalGrossAmount < user!.minOrderValue\r\n ? (user!.minOrderValue - totalDiscount).toFixed(2)\r\n : (totalGrossAmount - totalDiscount).toFixed(2)}\r\n
\r\n
\r\n\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n )\r\n}\r\n\r\nexport default observer(BasketDialog);","import React, { useContext, useEffect } from \"react\";\r\nimport { Header } from \"../components/Layout/Header\";\r\nimport { Toolbar } from \"../components/Toolbar/Toolbar\";\r\nimport { ProductList } from \"../components/Products/ProductList\";\r\nimport { Footer } from \"../components/Layout/Footer\";\r\nimport { ProductsFooter } from \"../components/Products/ProductFooter\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\nimport { confirmAlert } from \"react-confirm-alert\";\r\nimport { history } from \"../\";\r\nimport BasketDialog from \"../components/Basket/BasketDialog\";\r\nimport { observer } from \"mobx-react-lite\";\r\n\r\nexport const OrderBookingPage = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { loadCategories } = rootStore.categoryStore;\r\n const { setPrevRoute } = rootStore.commonStore;\r\n const {orderDetails, resetOrder, currentOrder, showBasket, setShowBasket } = rootStore.orderStore;\r\n const { user } = rootStore.userStore;\r\n useEffect(()=>{\r\n setPrevRoute(window.location.pathname);\r\n },[])\r\n useEffect(() => {\r\n loadCategories();\r\n }, [loadCategories]);\r\n\r\n const handleCheckout = () => {\r\n if(orderDetails.length === 0){\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

Confirm No Item Selection

\r\n
\r\n
\r\n

There are no items in your basket, Please select the items or select Skip Item Selection

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n }\r\n else{\r\n setShowBasket(false);\r\n if(user?.isCustomer)\r\n history.push(\"/basket\");\r\n else\r\n history.push(\"/newcustomer\");\r\n }\r\n }\r\n const handleDiscardChanges = () => {\r\n if((currentOrder && currentOrder?.orderNo > 0) || orderDetails.length > 0){\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

Confirm Cancel Order

\r\n
\r\n
\r\n {currentOrder && currentOrder?.orderNo > 0 ? (\r\n

Do you want to cancel the changes you have made to this order?

\r\n ) : (\r\n

Do you want to cancel the order?

\r\n )}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n }\r\n else\r\n setShowBasket(false);\r\n }\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n \r\n { showBasket && (setShowBasket(false))} handleCheckOut={handleCheckout} handleDiscardChanges={handleDiscardChanges} />}\r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n});\r\n","import React, { useState, useEffect, useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\ninterface IProps {\r\n day: Date;\r\n dayName: string;\r\n selectedDay: Date | undefined;\r\n setSelectedDay: (day: Date) => void;\r\n}\r\nexport const CollectionTimeSlotHeaderButton: React.FC = observer(\r\n ({ day, dayName, selectedDay, setSelectedDay }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n collectionSlotsAvailable,\r\n } = rootStore.timeSlotStore;\r\n const [dayNo, setDayNo] = useState(0);\r\n const [enabled, setEnabled] = useState(true);\r\n useEffect(() => {\r\n if (day) {\r\n setEnabled(collectionSlotsAvailable(day));\r\n setDayNo(new Date(day!).getDate());\r\n }\r\n }, [day, collectionSlotsAvailable]);\r\n return (\r\n {\r\n if (selectedDay !== day && enabled) setSelectedDay(day);\r\n }}\r\n >\r\n {dayName}\r\n {dayNo}\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext } from \"react\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { CollectionTimeSlotHeaderButton } from \"./CollectionTimeSlotHeaderButton\";\r\ninterface IProps {\r\n selectedDay: Date | undefined;\r\n setSelectedDay: (day: Date) => void;\r\n}\r\nexport const CollectionTimeSlotHeader: React.FC = observer(\r\n ({ selectedDay, setSelectedDay }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { weeklyCollectionSlots } = rootStore.timeSlotStore;\r\n return (\r\n
\r\n {weeklyCollectionSlots &&\r\n weeklyCollectionSlots.map((t, index) => (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n);\r\n","import React from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { ITimeSlot } from \"../../../models/order\";\r\nimport { getTimeString } from \"../../../utils/Utils\";\r\ninterface IProps {\r\n timeSlot: ITimeSlot;\r\n localTimeSlot: ITimeSlot | undefined;\r\n setTimeSlot: (timeSlot: ITimeSlot) => void;\r\n}\r\nexport const CollectionTimeSlotRow: React.FC = observer(\r\n ({ timeSlot, localTimeSlot, setTimeSlot }) => {\r\n return (\r\n setTimeSlot(timeSlot)}\r\n className={\r\n localTimeSlot?.uniqueRecId === timeSlot.uniqueRecId\r\n ? \"timeslot-time-row timeslot-time-selected\"\r\n : \"timeslot-time-row\"\r\n }\r\n >\r\n
{`${getTimeString(timeSlot.slotTimeFrom)}:00 to ${getTimeString(\r\n timeSlot.slotTimeTo\r\n )}:00`}
\r\n
FREE
\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext, useEffect } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { ITimeSlot } from \"../../../models/order\";\r\nimport { CollectionTimeSlotRow } from \"./CollectionTimeSlotRow\";\r\n\r\ninterface IProps {\r\n timeSlot: ITimeSlot;\r\n day: Date | undefined;\r\n setTimeSlot: (timeSlot: ITimeSlot) => void;\r\n}\r\nexport const CollectionTimeSlotGrid: React.FC = observer(\r\n ({ timeSlot, day, setTimeSlot }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n getCollectionSlotsForDate,\r\n collectionSlotsForDate,\r\n loadingCollectionSlots,\r\n } = rootStore.timeSlotStore;\r\n useEffect(() => {\r\n if(day){\r\n getCollectionSlotsForDate(day)\r\n }\r\n },[day])\r\n if (collectionSlotsForDate.length === 0) {\r\n if (loadingCollectionSlots)\r\n return
Loading slots...
;\r\n return
No time slots available
;\r\n }\r\n return (\r\n
\r\n {collectionSlotsForDate.map((ds) => (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { ITimeSlot } from \"../../../models/order\";\r\nimport { Dialog } from \"../../Common/Dialog\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { CollectionTimeSlotHeader } from \"./CollectionTimeSlotHeader\";\r\nimport { CollectionTimeSlotGrid } from \"./CollectionTimeSlotGrid\";\r\n\r\ninterface IProps {\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n setTimeSlot: (value: ITimeSlot) => void;\r\n}\r\nexport const CollectionTimeSlotDialog: React.FC = observer(\r\n ({ showDialog, hideDialog, setTimeSlot }) => {\r\n const [localTimeSlot, setLocalTimeSlot] = useState();\r\n const [localSelectedDay, setLocalSelectedDay] = useState();\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n defaultCollection,\r\n loadingCollectionSlots,\r\n } = rootStore.timeSlotStore;\r\n\r\n useEffect(() => {\r\n setLocalTimeSlot(defaultCollection);\r\n }, []);\r\n\r\n useEffect(()=>{\r\n if(localTimeSlot){\r\n setLocalSelectedDay(localTimeSlot.slotDate);\r\n }\r\n },[localTimeSlot])\r\n const saveTimeSlot = () => {\r\n setTimeSlot(localTimeSlot!);\r\n hideDialog();\r\n };\r\n\r\n const handleSelectDay = (day: Date) => {\r\n setLocalSelectedDay(day);\r\n setLocalTimeSlot(undefined);\r\n }\r\n return (\r\n \r\n {(loadingCollectionSlots) ? (\r\n
\r\n Loading slot...\r\n
\r\n ) : (\r\n <>\r\n \r\n \r\n \r\n ) }\r\n \r\n );\r\n }\r\n);\r\n","import React, { useState, useEffect, useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\ninterface IProps {\r\n day: Date;\r\n dayName: string;\r\n selectedDay: Date | undefined;\r\n setSelectedDay: (day: Date) => void;\r\n}\r\nexport const DeliveryTimeSlotHeaderButton: React.FC = observer(\r\n ({ day, dayName, selectedDay, setSelectedDay }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n deliverySlotsAvailable\r\n } = rootStore.timeSlotStore;\r\n const [dayNo, setDayNo] = useState(0);\r\n const [enabled, setEnabled] = useState(true);\r\n useEffect(() => {\r\n if (day) {\r\n setEnabled(deliverySlotsAvailable(day));\r\n setDayNo(new Date(day!).getDate());\r\n }\r\n }, [day, deliverySlotsAvailable]);\r\n return (\r\n {\r\n if (selectedDay !== day && enabled) setSelectedDay(day);\r\n }}\r\n >\r\n {dayName}\r\n {dayNo}\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext } from \"react\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { DeliveryTimeSlotHeaderButton } from \"./DeliveryTimeSlotHeaderButton\";\r\n\r\ninterface IProps {\r\n selectedDay: Date | undefined;\r\n setSelectedDay: (day: Date) => void;\r\n}\r\nexport const DeliveryTimeSlotHeader: React.FC = observer(\r\n ({ selectedDay, setSelectedDay }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { weeklyDeliverySlots } = rootStore.timeSlotStore;\r\n return (\r\n
\r\n {weeklyDeliverySlots &&\r\n weeklyDeliverySlots.map((t, index) => (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n);\r\n","import React from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { ITimeSlot } from \"../../../models/order\";\r\nimport { getTimeString } from \"../../../utils/Utils\";\r\ninterface IProps {\r\n timeSlot: ITimeSlot;\r\n localTimeSlot: ITimeSlot | undefined;\r\n setTimeSlot: (timeSlot: ITimeSlot) => void;\r\n}\r\nexport const DeliveryTimeSlotRow: React.FC = observer(\r\n ({ timeSlot, localTimeSlot, setTimeSlot }) => {\r\n return (\r\n setTimeSlot(timeSlot)}\r\n className={\r\n localTimeSlot?.uniqueRecId === timeSlot.uniqueRecId\r\n ? \"timeslot-time-row timeslot-time-selected\"\r\n : \"timeslot-time-row\"\r\n }\r\n >\r\n
{`${getTimeString(timeSlot.slotTimeFrom)}:00 to ${getTimeString(\r\n timeSlot.slotTimeTo\r\n )}:00`}
\r\n
FREE
\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext, useEffect } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { ITimeSlot } from \"../../../models/order\";\r\nimport { DeliveryTimeSlotRow } from \"./DeliveryTimeSlotRow\";\r\n\r\ninterface IProps {\r\n timeSlot: ITimeSlot;\r\n day: Date | undefined;\r\n setTimeSlot: (timeSlot: ITimeSlot) => void;\r\n}\r\nexport const DeliveryTimeSlotGrid: React.FC = observer(\r\n ({ timeSlot, day, setTimeSlot }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n getDeliverySlotsForDate,\r\n deliverySlotsForDate,\r\n loadingDeliverySlots,\r\n } = rootStore.timeSlotStore;\r\n useEffect(() => {\r\n if(day){\r\n getDeliverySlotsForDate(day)\r\n }\r\n },[day])\r\n if (deliverySlotsForDate.length === 0) {\r\n if (loadingDeliverySlots)\r\n return
Loading slots...
;\r\n return
No time slots available
;\r\n }\r\n return (\r\n
\r\n {deliverySlotsForDate.map((ds) => (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { ITimeSlot } from \"../../../models/order\";\r\nimport { Dialog } from \"../../Common/Dialog\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { DeliveryTimeSlotHeader } from \"./DeliveryTimeSlotHeader\";\r\nimport { DeliveryTimeSlotGrid } from \"./DeliveryTimeSlotGrid\";\r\n\r\ninterface IProps {\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n setTimeSlot: (value: ITimeSlot) => void;\r\n}\r\nexport const DeliveryTimeSlotDialog: React.FC = observer(\r\n ({ showDialog, hideDialog, setTimeSlot }) => {\r\n const [localTimeSlot, setLocalTimeSlot] = useState();\r\n const [localSelectedDay, setLocalSelectedDay] = useState();\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n defaultDelivery,\r\n loadingDeliverySlots,\r\n } = rootStore.timeSlotStore;\r\n\r\n useEffect(() => {\r\n setLocalTimeSlot(defaultDelivery);\r\n }, []);\r\n\r\n useEffect(()=>{\r\n if(localTimeSlot){\r\n setLocalSelectedDay(localTimeSlot.slotDate);\r\n }\r\n },[localTimeSlot])\r\n const saveTimeSlot = () => {\r\n setTimeSlot(localTimeSlot!);\r\n hideDialog();\r\n };\r\n\r\n const handleSelectDay = (day: Date) => {\r\n setLocalSelectedDay(day);\r\n setLocalTimeSlot(undefined);\r\n }\r\n return (\r\n \r\n {(loadingDeliverySlots) ? (\r\n
\r\n Loading slot...\r\n
\r\n ) : (\r\n <>\r\n \r\n \r\n \r\n ) }\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext } from \"react\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { getDateStringEx, getTimeString } from \"../../../utils/Utils\";\r\ninterface IProps {\r\n handleClick: () => void;\r\n}\r\nexport const CollectionTimeSlotBox: React.FC = observer(\r\n ({ handleClick }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n noCollectionSlot,\r\n defaultCollection,\r\n loadingCollectionSlots,\r\n } = rootStore.timeSlotStore;\r\n\r\n if (!defaultCollection && !noCollectionSlot)\r\n return (\r\n
\r\n

Collection

\r\n
\r\n Loading slots...\r\n
\r\n
\r\n  \r\n
\r\n
\r\n );\r\n return (\r\n handleClick()}\r\n >\r\n

Collection

\r\n {noCollectionSlot ? (\r\n <>\r\n
\r\n No slots available\r\n
\r\n
\r\n  \r\n
\r\n \r\n ) : (\r\n <>\r\n
\r\n
\r\n \r\n {getDateStringEx(defaultCollection!.slotDate)}\r\n \r\n
\r\n
\r\n {`${getTimeString(defaultCollection!.slotTimeFrom)}:00 - ${getTimeString(defaultCollection!.slotTimeTo)}:00`}\r\n
\r\n
\r\n
{loadingCollectionSlots ? \"Loading slots...\" : \"Click to change date/time\"}
\r\n \r\n )}\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext } from \"react\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { getDateStringEx, getTimeString } from \"../../../utils/Utils\";\r\ninterface IProps {\r\n collectFromShop: boolean;\r\n handleClick: () => void;\r\n}\r\nexport const DeliveryTimeSlotBox: React.FC = observer(\r\n ({ handleClick, collectFromShop }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n noDeliverySlot,\r\n defaultDelivery,\r\n loadingDeliverySlots\r\n } = rootStore.timeSlotStore;\r\n\r\n if (!defaultDelivery && !noDeliverySlot)\r\n return (\r\n
\r\n

Delivery

\r\n
\r\n Loading slots...\r\n
\r\n
\r\n  \r\n
\r\n
\r\n );\r\n return (\r\n handleClick()}\r\n >\r\n

{collectFromShop ? 'Ready By' : 'Delivery'}

\r\n {noDeliverySlot ? (\r\n <>\r\n
\r\n No slots available\r\n
\r\n
\r\n  \r\n
\r\n \r\n ) : (\r\n <>\r\n
\r\n
\r\n \r\n {getDateStringEx(defaultDelivery!.slotDate)}\r\n \r\n
\r\n
\r\n {`${getTimeString(defaultDelivery!.slotTimeFrom)}:00 - ${getTimeString(defaultDelivery!.slotTimeTo)}:00`}\r\n
\r\n
\r\n
{loadingDeliverySlots ? \"Loading slots...\" : \"Click to change date/time\"}
\r\n \r\n )}\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext, useEffect } from \"react\";\r\nimport { Field } from \"react-final-form\";\r\nimport { ITimeSlot } from \"../../models/order\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { addDays, addHours, formatDate } from \"../../utils/Utils\";\r\nimport { CollectionTimeSlotDialog } from \"./CollectionTimeSlot/CollectionTimeSlotDialog\";\r\nimport { DeliveryTimeSlotDialog } from \"./DeliveryTimeSlot/DeliveryTimeSlotDialog\";\r\nimport { CollectionTimeSlotBox } from \"./CollectionTimeSlot/CollectionTimeSlotBox\";\r\nimport { DeliveryTimeSlotBox } from \"./DeliveryTimeSlot/DeliveryTimeSlotBox\";\r\n\r\nexport const DeliveryDetails = observer(\r\n () => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n defaultCollection,\r\n defaultDelivery,\r\n showCollectionTimeSlots,\r\n showDeliveryTimeSlots,\r\n setShowCollectionTimeSlots,\r\n setShowDeliveryTimeSlots,\r\n setDefaultCollection,\r\n setDefaultDelivery,\r\n getDefaultCollection,\r\n getDefaultDelivery,\r\n loadWeeklyCollectionSlots,\r\n loadingCollectionSlots,\r\n loadWeeklyDeliverySlots,\r\n loadingDeliverySlots,\r\n } = rootStore.timeSlotStore;\r\n const {\r\n basketValues, setBasketValues, currentOrder, turnAroundTime\r\n } = rootStore.orderStore;\r\n const { user } = rootStore.userStore;\r\n \r\n useEffect(() => {\r\n if (basketValues.postCode.length) \r\n if(!defaultCollection){\r\n getDefaultCollection(new Date(), basketValues.postCode);\r\n }\r\n }, [defaultCollection, basketValues, currentOrder, getDefaultCollection]);\r\n\r\n useEffect(() => {\r\n if (defaultCollection && basketValues.postCode.length > 0) {\r\n if(!defaultDelivery || new Date(defaultDelivery.slotDate).getTime() < addDays(defaultCollection.slotDate,(user!.minTurnAround > turnAroundTime ? user!.minTurnAround : turnAroundTime)).getTime())\r\n getDefaultDelivery(defaultCollection!.slotDate, basketValues.postCode);\r\n loadWeeklyCollectionSlots(formatDate(addHours(new Date(),user!.minInterval)),basketValues.postCode);\r\n }\r\n }, [defaultCollection, basketValues, currentOrder, defaultDelivery, getDefaultDelivery, loadWeeklyCollectionSlots]);\r\n\r\n useEffect(() => {\r\n if (defaultCollection && defaultDelivery && basketValues.postCode.length > 0)\r\n loadWeeklyDeliverySlots(formatDate(addDays(defaultCollection.slotDate,(user!.minTurnAround > turnAroundTime ? user!.minTurnAround : turnAroundTime))),basketValues.postCode);\r\n }, [defaultDelivery, basketValues, loadWeeklyDeliverySlots]);\r\n\r\n\r\n const handleSetCollectionTimeSlot = (timeSlot: ITimeSlot) => {\r\n if(defaultCollection !== timeSlot){\r\n setDefaultCollection(timeSlot);\r\n if(!defaultDelivery || new Date(defaultDelivery.slotDate).getDate() < addDays(timeSlot.slotDate,user!.minTurnAround).getDate())\r\n getDefaultDelivery(timeSlot.slotDate, basketValues.postCode);\r\n loadWeeklyCollectionSlots(formatDate(addDays(timeSlot.slotDate,user!.minTurnAround)), basketValues.postCode)\r\n loadWeeklyDeliverySlots(formatDate(addDays(timeSlot.slotDate,(user!.minTurnAround > turnAroundTime ? user!.minTurnAround : turnAroundTime))),basketValues.postCode);\r\n }\r\n }\r\n \r\n const handleSetDeliveryTimeSlot = (timeSlot: ITimeSlot) => {\r\n setDefaultDelivery(timeSlot);\r\n };\r\n return (\r\n
\r\n

Collection & Delivery

\r\n
\r\n {if(!loadingCollectionSlots) setShowCollectionTimeSlots(true)}} />\r\n {if(!loadingDeliverySlots) setShowDeliveryTimeSlots(true)}} />\r\n
\r\n
\r\n \r\n {({input, meta}) => (\r\n
\r\n \r\n
\r\n )\r\n }\r\n
\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n \r\n setBasketValues({...basketValues, deliveryNotes: event.target.value})}\r\n >\r\n
\r\n )}\r\n
\r\n {showCollectionTimeSlots && (\r\n setShowCollectionTimeSlots(false)}\r\n showDialog={showCollectionTimeSlots}\r\n setTimeSlot={handleSetCollectionTimeSlot} \r\n />\r\n )}\r\n {showDeliveryTimeSlots && (\r\n setShowDeliveryTimeSlots(false)}\r\n showDialog={showDeliveryTimeSlots}\r\n setTimeSlot={handleSetDeliveryTimeSlot} \r\n />\r\n )}\r\n\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { OrderDetailRow } from \"./OrderDetailRow\";\r\nimport { Field } from \"react-final-form\";\r\n\r\nexport const OrderDetails = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { orderDetails, basketValues, setBasketValues } = rootStore.orderStore;\r\n return (\r\n
\r\n

Order Details

\r\n
\r\n {orderDetails && orderDetails.length > 0 ? (\r\n orderDetails\r\n .sort((d1, d2) => d1.mainLineNo - d2.mainLineNo)\r\n .map((od) => )\r\n ) : (\r\n
\r\n No items selected\r\n
\r\n )}\r\n
\r\n \r\n {({ input }) => (\r\n
\r\n \r\n setBasketValues({...basketValues, orderNotes: event.target.value})}\r\n >\r\n
\r\n )}\r\n
\r\n
\r\n );\r\n});\r\n","import React, { useContext, useState } from \"react\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { Field } from \"react-final-form\";\r\nimport { IOrderBasket } from \"../../models/order\";\r\n\r\ninterface IProps{\r\n formValues: IOrderBasket,\r\n clearVoucher: () => void;\r\n};\r\nexport const BasketTotals:React.FC = observer(({formValues, clearVoucher}) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { totalPieces, totalGrossAmount, totalDiscount, setHeaderDiscount, checkVoucher, setDiscountVoucher } = rootStore.orderStore;\r\n const { user } = rootStore.userStore;\r\n const{ currentShop } = rootStore.commonStore;\r\n const [voucherError, setVoucherError] = useState(\"\")\r\n const handleApply = async (e: React.MouseEvent,voucherCode: string) => {\r\n e.preventDefault();\r\n if(voucherCode?.length === 0)\r\n setVoucherError(\"Voucher code blank!\");\r\n else\r\n {\r\n var dv = await checkVoucher(voucherCode!);\r\n if(dv){\r\n let amount = totalGrossAmount;\r\n let discount = 0;\r\n if(dv.offerType === 0)\r\n discount = dv.flatDiscount;\r\n else\r\n discount = parseFloat((totalGrossAmount*(dv.percentDiscount/100)).toFixed(2));\r\n if(dv.minimumSpend > 0 && dv.maximumSpend > 0){\r\n if(dv.minMaxAfterDiscount){\r\n amount = totalGrossAmount - discount;\r\n }\r\n if(amount >= dv.minimumSpend && amount <= dv.maximumSpend){\r\n setDiscountVoucher(dv);\r\n setHeaderDiscount(discount);\r\n setVoucherError(\"\");\r\n }\r\n else{\r\n setDiscountVoucher(null);\r\n setHeaderDiscount(0);\r\n setVoucherError(`Voucher code not applicable! Total amount must be between ${dv.minimumSpend} and ${dv.maximumSpend}`)\r\n clearVoucher();\r\n }\r\n }\r\n else{\r\n setDiscountVoucher(dv);\r\n setHeaderDiscount(discount);\r\n setVoucherError(\"\");\r\n }\r\n }\r\n else{\r\n setDiscountVoucher(null);\r\n setHeaderDiscount(0);\r\n setVoucherError(\"Invalid voucher code!\");\r\n clearVoucher();\r\n }\r\n\r\n }\r\n }\r\n return (\r\n
\r\n

Totals

\r\n {currentShop?.hasVouchers && (\r\n
\r\n \r\n {({input,meta}) => (\r\n \r\n )}\r\n \r\n \r\n {() => (\r\n \r\n )}\r\n \r\n
\r\n )}\r\n {voucherError}\r\n
\r\n
\r\n
\r\n Sub Total\r\n \r\n {totalGrossAmount < user!.minOrderValue\r\n ? `( Min order value £20 )`\r\n : \"\"}\r\n \r\n
\r\n
\r\n £\r\n {totalGrossAmount < user!.minOrderValue\r\n ? user!.minOrderValue.toFixed(2)\r\n : totalGrossAmount.toFixed(2)}\r\n
\r\n
\r\n
\r\n
Discount
\r\n
-£{totalDiscount.toFixed(2)}
\r\n
\r\n
\r\n
Total Pieces
\r\n
{totalPieces}
\r\n
\r\n
\r\n
Total Amount
\r\n
\r\n £\r\n {totalGrossAmount < user!.minOrderValue\r\n ? (user!.minOrderValue - totalDiscount).toFixed(2)\r\n : (totalGrossAmount - totalDiscount).toFixed(2)}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n});\r\n","import { observer } from \"mobx-react-lite\";\r\nimport React, { useContext } from \"react\";\r\nimport { history } from \"../../\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\n\r\nexport const BasketFooter = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { currentShop } = rootStore.commonStore;\r\n const { user } = rootStore.userStore;\r\n const { currentOrder } = rootStore.orderStore;\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n {(currentShop?.itemSelectionOptions === 0 || user?.noItemSelect) ? (\r\n <>\r\n ) : (\r\n <>\r\n \r\n {currentOrder && currentOrder.orderNo > 0 && (\r\n {`Changing Order No ${currentOrder.orderNo}`}\r\n )}\r\n \r\n )}\r\n \r\n
\r\n
\r\n\r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { customerFullAddress, customerFullName } from \"../../utils/Utils\";\r\n\r\nexport const NameAddress = observer(() => {\r\n \r\n const rootStore = useContext(RootStoreContext);\r\n const {customer} = rootStore.userStore;\r\n if(!customer)\r\n return (\r\n
\r\n

Name & Address

\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n\r\n \r\n return (\r\n
\r\n

Name & Address

\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { ICustomerCard } from \"../../../models/cards\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\ninterface IProps {\r\n customerCard: ICustomerCard;\r\n}\r\nexport const CustomerCard: React.FC = observer(\r\n ({ customerCard }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { setDefaultCard } = rootStore.userStore;\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {customerCard.cardType}\r\n
\r\n
{customerCard.cardNumber}
\r\n
\r\n {customerCard.cardExpiry}\r\n
\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useContext, useEffect, useState } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { CustomerCard } from \"./CustomerCard\";\r\nimport { RootStoreContext } from \"../../../stores/rootStore\";\r\nimport { ICustomerCard } from \"../../../models/cards\";\r\n\r\nexport const PaymentDetails = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { customer, getCustomerCards, customerCards, showNewCardDialog, cardSaveError, defaultCardUID } = rootStore.userStore;\r\n const [currentCard, setCurrentCard] = useState();\r\n useEffect(() => {\r\n if(customer){\r\n getCustomerCards();\r\n }\r\n }, [customer])\r\n useEffect(() => {\r\n if(defaultCardUID){\r\n var card = customerCards.filter(c => c.uniqueRecId === defaultCardUID)[0];\r\n if(card)\r\n setCurrentCard(card);\r\n }\r\n },[defaultCardUID,customerCards])\r\n return (\r\n
\r\n

Payment Details

\r\n
\r\n
\r\n Card Type\r\n
\r\n
Card Number
\r\n
\r\n Expiry Date\r\n
\r\n
\r\n {customerCards.sort((a) => a.isDefault ? -1 : 1).map((card) => {\r\n return \r\n })}\r\n {(defaultCardUID.length === 0 && cardSaveError.length > 0) && (\r\n {cardSaveError}\r\n )}\r\n
\r\n {currentCard && (\r\n \r\n {`We will charge for this order using your ${currentCard.cardType} ${currentCard.cardNumber}`}\r\n \r\n \r\n )}\r\n \r\n
\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useContext, useEffect, useState } from 'react';\r\nimport { IWorldpayToken } from '../../models/worldpay_models';\r\nimport { RootStoreContext } from '../../stores/rootStore';\r\nimport { customerAddressWithoutPostcode, toTitlecase } from '../../utils/Utils';\r\n\r\nimport { Dialog } from '../Common/Dialog';\r\nexport const WorldPayDialog = () => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { customer, showCardDialog, hideNewCardDialog, saveNewCard, savingCard, cardSaveError, setCardSaveError } = rootStore.userStore;\r\n const { currentShop } = rootStore.commonStore;\r\n const [showError, setShowError] = useState(false);\r\n const [scriptLoaded, setScriptLoaded] = useState(false);\r\n\r\n const handleSave = (response: IWorldpayToken) => {\r\n if(response && response.token){\r\n const {paymentMethod} = response;\r\n const expDate: string = (paymentMethod.expiryMonth && paymentMethod.expiryYear) ? (100 + paymentMethod.expiryMonth).toString().substring(1) + paymentMethod.expiryYear.toString().substring(2) : '';\r\n const stDate: string = (paymentMethod.startMonth && paymentMethod.startYear) ? (100 + paymentMethod.startMonth).toString().substring(1) + paymentMethod.startYear.toString().substring(2) : '';\r\n saveNewCard({\r\n accountCode: customer!.accountCode,\r\n address: customerAddressWithoutPostcode(customer!),\r\n postcode: customer!.postCode,\r\n cardNumber: paymentMethod.maskedCardNumber,\r\n cardType: toTitlecase(paymentMethod.cardType),\r\n expiryDate: expDate,\r\n issueNo: paymentMethod.issueNumber?.toString() || '',\r\n referenceCode: response.token,\r\n startDate: stDate,\r\n payProvider: currentShop!.cardProvider\r\n });\r\n if(cardSaveError.length === 0)\r\n hideNewCardDialog();\r\n }\r\n else{\r\n setCardSaveError(\"An error occured while saving card\");\r\n setShowError(true);\r\n }\r\n }\r\n useEffect(() => {\r\n const script = document.createElement('script');\r\n script.src = 'https://cdn.worldpay.com/v1/worldpay.js';\r\n script.async = false;\r\n script.onload = () => {\r\n setScriptLoaded(true);\r\n // @ts-ignore\r\n Worldpay.useTemplateForm({\r\n 'clientKey': (currentShop ? currentShop.cardKey : process.env.REACT_APP_WORLDPAY_KEY),\r\n 'form':'paymentForm',\r\n 'paymentSection':'paymentSection',\r\n 'display':'inline',\r\n 'saveButton':false,\r\n 'templateOptions': {images:{enabled:false}},\r\n 'reusable':true,\r\n // @ts-ignore\r\n 'callback': handleSave,\r\n });\r\n };\r\n document.body.appendChild(script);\r\n return () => {\r\n document.body.removeChild(script);\r\n }\r\n }, [])\r\n useEffect(() => {\r\n if(!savingCard)\r\n if(cardSaveError.length > 0)\r\n setShowError(true);\r\n else\r\n setShowError(false);\r\n },[savingCard])\r\n if(!scriptLoaded)\r\n return
Connecting with payment gateway...
\r\n return (\r\n //@ts-ignore\r\n \r\n
\r\n
\r\n
\r\n {!savingCard && showError && ({cardSaveError})}\r\n
\r\n );\r\n \r\n}\r\n\r\n","import { PaymentElement, useElements, useStripe } from '@stripe/react-stripe-js';\r\nimport { SetupIntentResult } from '@stripe/stripe-js';\r\nimport { observer } from 'mobx-react-lite';\r\nimport React, { useContext, useState } from 'react'\r\nimport { RootStoreContext } from '../../stores/rootStore';\r\nimport { Dialog } from '../Common/Dialog'\r\n\r\nexport const StripeDialog = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { showCardDialog, hideNewCardDialog, saveNewStripeCard, savingCard, cardSaveError, setCardSaveError, cancelStripeIntent } = rootStore.userStore;\r\n const [showError, setShowError] = useState(false);\r\n const stripe_api = useStripe();\r\n const stripe_elements = useElements();\r\n const handleCancel = async () => {\r\n await cancelStripeIntent();\r\n hideNewCardDialog();\r\n }\r\n const handleSubmit = async () => {\r\n\r\n if(!stripe_api || !stripe_elements){\r\n setCardSaveError(\"Loading...\");\r\n setShowError(true);\r\n return;\r\n }\r\n setCardSaveError(\"\");\r\n setShowError(false);\r\n let returnURL = `${window.location.protocol}//${window.location.host}/cardstatus` \r\n // @ts-ignore\r\n stripe_api.confirmSetup({elements: stripe_elements, confirmParams : { return_url: returnURL}, redirect: 'if_required'})\r\n .then( async (response: SetupIntentResult) => {\r\n if(response.error){\r\n setCardSaveError(response.error.message!);\r\n setShowError(true);\r\n } else if(response.setupIntent){\r\n switch(response.setupIntent.status){\r\n case 'succeeded':\r\n if(response.setupIntent.payment_method){\r\n saveNewStripeCard(response.setupIntent.payment_method)\r\n .then(() => {\r\n if(!savingCard && cardSaveError)\r\n setShowError(true);\r\n });\r\n if(cardSaveError.length === 0)\r\n hideNewCardDialog();\r\n }\r\n break;\r\n case 'processing':\r\n setCardSaveError(\"Processing..\")\r\n setShowError(true);\r\n break;\r\n case \"requires_payment_method\":\r\n setCardSaveError('Failed to process payment details. Please try another payment method');\r\n setShowError(true);\r\n break;\r\n default:\r\n setCardSaveError(\"An error occured while saving your card!\");\r\n setShowError(true);\r\n break;\r\n }\r\n }\r\n })\r\n }\r\n return (\r\n \r\n
\r\n \r\n \r\n {!savingCard && showError && ({cardSaveError})}\r\n
\r\n )\r\n});\r\n","import { Elements } from \"@stripe/react-stripe-js\";\r\nimport { loadStripe, Stripe, StripeElementsOptions } from \"@stripe/stripe-js\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { StripeDialog } from \"./StripeDialog\";\r\n\r\n\r\nexport const StripeDialogWrapper = observer(() => {\r\n \r\n const rootStore = useContext(RootStoreContext);\r\n const { currentShop } = rootStore.commonStore;\r\n const { createStripeIntent, stripeIntent } = rootStore.userStore;\r\n const [stripePromise, setStripePromise] = useState | null>(null); \r\n const [stripeOptions, setStripeOptions] = useState(undefined);\r\n\r\n useEffect(() => {\r\n if(!stripeIntent){\r\n createStripeIntent();\r\n } else if(stripeIntent && stripeIntent!.secret.length > 0){\r\n setStripeOptions({clientSecret: stripeIntent!.secret, appearance: {}}); \r\n }\r\n },[stripeIntent])\r\n\r\n useEffect(() => {\r\n if(currentShop){\r\n if(!stripePromise)\r\n setStripePromise(loadStripe(currentShop!.cardKey));\r\n }\r\n },[currentShop, stripePromise])\r\n\r\n if(!stripeOptions)\r\n return

Loading

;\r\n return (\r\n \r\n \r\n \r\n\r\n )\r\n});","import React, { useContext, useEffect } from \"react\";\r\nimport { Header } from \"../components/Layout/Header\";\r\nimport { Footer } from \"../components/Layout/Footer\";\r\nimport { DeliveryDetails } from \"../components/Basket/DeliveryDetails\";\r\nimport { OrderDetails } from \"../components/Basket/OrderDetails\";\r\nimport { BasketTotals } from \"../components/Basket/BasketTotals\";\r\nimport { BasketFooter } from \"../components/Basket/BasketFooter\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\nimport { Form as FinalForm } from \"react-final-form\";\r\nimport { IOrderBasket } from \"../models/order\";\r\nimport { FORM_ERROR, ValidationErrors } from \"final-form\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { history } from \"../\";\r\nimport { NameAddress } from \"../components/Basket/NameAddress\";\r\nimport { PaymentDetails } from \"../components/Basket/PaymentDetails/PaymentDetails\";\r\nimport { WorldPayDialog } from \"../components/WorldPay/WorldPayDialog\";\r\nimport { confirmAlert } from \"react-confirm-alert\";\r\nimport { StripeDialogWrapper } from \"../components/Stripe/StripeDialogWrapper\";\r\n\r\nexport const BasketPage = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {\r\n currentOrder,\r\n createOrder,\r\n saveOrder,\r\n setLoadingOrder,\r\n basketValues,\r\n setBasketValues,\r\n orderSaved\r\n } = rootStore.orderStore;\r\n const {\r\n defaultCollection,\r\n defaultDelivery,\r\n noDeliverySlot,\r\n noCollectionSlot\r\n } = rootStore.timeSlotStore;\r\n const { user, customer, customerInfo, showCardDialog, defaultCardUID, setCardSaveError, customerCards } = rootStore.userStore;\r\n const { currentShop,setPrevRoute } = rootStore.commonStore;\r\n useEffect(()=>{\r\n setPrevRoute(window.location.pathname);\r\n if(orderSaved === 1 && currentOrder?.orderNo === 0)\r\n history.push(\"/order\");\r\n },[])\r\n useEffect(() => {\r\n if (!currentOrder && customer){\r\n createOrder(user!.accountCode);\r\n setLoadingOrder(false);\r\n }\r\n if(!customer)\r\n setLoadingOrder(true);\r\n },[currentOrder, customer])\r\n useEffect(() => {\r\n if (user)\r\n if (user!.isCustomer && !customer) {\r\n customerInfo();\r\n setLoadingOrder(true);\r\n } else\r\n setLoadingOrder(false);\r\n }, [user, customerInfo,setLoadingOrder]);\r\n\r\n useEffect(() => {\r\n if (customer && basketValues.firstName.length === 0) {\r\n setBasketValues({\r\n accountCode: customer.accountCode,\r\n title: customer.title,\r\n firstName: customer.firstName,\r\n middleName: customer.middleName,\r\n surname: customer.surname,\r\n address1: customer.address1,\r\n address2: customer.address2,\r\n postCode: customer.postCode,\r\n emailId: customer.emailId,\r\n mobileNo: customer.mobileNo,\r\n password: customer.password,\r\n confirmPassword: customer.password,\r\n deliveryNotes: customer.deliveryNotes,\r\n orderNotes: \"\",\r\n discountCode: \"\",\r\n headerDiscount: 0,\r\n grossAmount: 0,\r\n minCharge: 0,\r\n collectFromShop: false\r\n });\r\n }\r\n }, [customer, basketValues, setBasketValues]);\r\nuseEffect(()=>{\r\n if(currentOrder){\r\n if(currentOrder.orderNotes.length > 0)\r\n setBasketValues({...basketValues,orderNotes: currentOrder.orderNotes});\r\n if(currentOrder.discountCode.length > 0)\r\n setBasketValues({...basketValues,discountCode: currentOrder.discountCode});\r\n if(currentOrder.headerDiscount > 0)\r\n setBasketValues({...basketValues,headerDiscount: currentOrder.headerDiscount});\r\n if(currentOrder.grossAmount > 0)\r\n setBasketValues({...basketValues,grossAmount: currentOrder.grossAmount});\r\n if(currentOrder.minCharge > 0)\r\n setBasketValues({...basketValues,minCharge: currentOrder.minCharge});\r\n if(currentOrder.collectFromShop)\r\n setBasketValues({...basketValues,collectFromShop: currentOrder.collectFromShop});\r\n }\r\n},[currentOrder])\r\n\r\n const validate = async () => {\r\n const errors: ValidationErrors = [];\r\n if (!defaultDelivery)\r\n if (noDeliverySlot) errors.deliveryNotes = \"No slots available\";\r\n else errors.deliveryNotes = \"Kindly select a delivery slot\";\r\n if (!defaultCollection)\r\n if (noCollectionSlot) errors.deliveryNotes = \"No slots available\";\r\n else errors.deliveryNotes = \"Kindly select a collection slot\";\r\n if(currentShop!.hasCardModule && defaultCardUID.length === 0){\r\n if(customerCards.length > 0)\r\n setCardSaveError(\"Please select a card for payment\")\r\n else\r\n setCardSaveError(\"Please add a credit/debit card for payment\")\r\n } else\r\n setCardSaveError(\"\");\r\n \r\n return errors;\r\n };\r\n let cardDialog = null;\r\n switch(currentShop!.cardProvider)\r\n {\r\n case 'WORLDPAY': cardDialog = ; break;\r\n case 'STRIPE' : cardDialog = ; break;\r\n default: cardDialog = ;\r\n }\r\n return (\r\n <>\r\n
\r\n {\r\n utils.changeValue(state, 'discountCode', () => '')\r\n },\r\n }}\r\n validate={validate}\r\n onSubmit={(values: IOrderBasket) => {\r\n if(customerCards.length === 0 && !user?.hasCredit){\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

No Credit/Debit Card

\r\n
\r\n
\r\n

You need to add atleast one credit/debit card

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );}})\r\n } else{\r\n setBasketValues(values);\r\n saveOrder()\r\n .then(() => history.push(\"/info\"))\r\n .catch((error) => ({\r\n [FORM_ERROR]: error,\r\n }))\r\n } \r\n}\r\n }\r\n render={({\r\n handleSubmit, values, form\r\n }) => (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n {currentShop!.hasCardModule && !user?.hasCredit && ()}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n )}\r\n />\r\n {currentShop!.hasCardModule && showCardDialog && cardDialog}\r\n \r\n );\r\n});\r\n","import React, { useContext, useEffect, useState } from 'react'\r\nimport { RootStoreContext } from '../../stores/rootStore';\r\nimport { addHours } from '../../utils/Utils';\r\nimport { history } from '../..';\r\nimport { observer } from 'mobx-react-lite';\r\nimport { confirmAlert } from 'react-confirm-alert';\r\nimport { ITimeSlot } from '../../models/order';\r\nimport agent from '../../api/agent';\r\n\r\ninterface IProps{\r\n uid: string;\r\n orderNo: number;\r\n collectionDate: Date;\r\n status: number;\r\n deliveryVisit: string;\r\n setOrdersType: () => void;\r\n}\r\nexport const MyOrdersFooter : React.FC = observer(({uid, orderNo, collectionDate, status, deliveryVisit, setOrdersType}) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { editOrder, orderDetails, currentOrder, setVisitSlot, setShowChangeSlotDialog, setSelectedVisitUID } = rootStore.orderStore;\r\n const { user } = rootStore.userStore;\r\n const [timeSlotField, setTimeSlotField] = useState();\r\n const [ currentDate, setCurrentDate] = useState(new Date());\r\n useEffect(() => {\r\n getVisit();\r\n }, [])\r\n useEffect(() => {\r\n if(user)\r\n setCurrentDate(addHours(new Date(),user.cutOffOrderEdit));\r\n },[user])\r\n const getVisit = async () => {\r\n const res = await agent.Visit.visitById(deliveryVisit);\r\n setTimeSlotField(res);\r\n }\r\n const handleShowChangeSlotDialog = () => {\r\n setOrdersType();\r\n setSelectedVisitUID(deliveryVisit);\r\n setVisitSlot(timeSlotField);\r\n setShowChangeSlotDialog(true);\r\n }\r\n const handleChangeOrder = (uid: string, orderno: number) => {\r\n if(orderDetails.length > 0){\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

Confirm Cancel Order

\r\n
\r\n
\r\n {(currentOrder && currentOrder?.orderNo > 0) ? (\r\n

You are in the middle of changing an order. Do you want to proceed to change order no {orderno}?

\r\n ) : (\r\n

You are in the middle of creating an order. Do you want to proceed to change order no {orderno}?

\r\n )}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n } else {\r\n editOrder(uid);\r\n history.push(\"/order\");\r\n }\r\n }\r\n \r\n if(timeSlotField === undefined)\r\n return
Loading...
\r\n return (\r\n <>\r\n
\r\n {(status === 1 && new Date(collectionDate).getTime() > new Date(currentDate).getTime()) && ()}\r\n {(status === 2 || status === 3) && ()}\r\n
\r\n \r\n )\r\n});\r\n","import { observer } from 'mobx-react-lite'\r\nimport React from 'react'\r\nimport { IOrderDetailEntity } from '../../models/order';\r\n\r\ninterface IProps{\r\n orderDetails: IOrderDetailEntity[]\r\n}\r\nexport const MyOrdersGrid : React.FC = observer(({orderDetails}) => {\r\n return (\r\n
\r\n
\r\n
Qty
\r\n
Item
\r\n
Price
\r\n
\r\n {orderDetails.map((detail,i) => (\r\n
\r\n
{detail.quantity}
\r\n
{detail.item}
\r\n
{detail.price.toFixed(2)}
\r\n
\r\n ))}\r\n
\r\n )\r\n});\r\n","import { observer } from 'mobx-react-lite';\r\nimport React from 'react'\r\nimport { IAppOrderEntity } from '../../models/order'\r\nimport { displayDate, displayDateTime } from '../../utils/Utils';\r\nimport { MyOrdersFooter } from './MyOrdersFooter';\r\nimport { MyOrdersGrid } from './MyOrdersGrid';\r\ninterface IProp{\r\n orders: IAppOrderEntity[];\r\n orderType: number;\r\n setOrdersType: (type: number) => void;\r\n}\r\nexport const AppOrdersList : React.FC = observer(({ orders, orderType, setOrdersType}) => {\r\n const handleSetOrderType = () => setOrdersType(orderType);\r\n return (\r\n
\r\n {orders?.map(order => (\r\n
\r\n
\r\n
\r\n
Order No: {order.orderNo}
\r\n
Total: £ {order.total.toFixed(2)}
\r\n
\r\n
\r\n
Order Date: {displayDate(order.orderDate)}
\r\n
\r\n
\r\n
Collection Date: {displayDateTime(order.collectionDate)}
\r\n
Delivery Date: {displayDateTime(order.deliveryDate)}
\r\n
\r\n
\r\n \r\n \r\n
\r\n ))}\r\n
\r\n )\r\n});\r\n","import { observer } from 'mobx-react-lite'\r\nimport React from 'react'\r\nimport { FaArrowAltCircleRight } from 'react-icons/fa'\r\ninterface IProps{\r\n status: number;\r\n}\r\nexport const MyOrderStatus : React.FC = observer(({status}) => {\r\n return (\r\n
\r\n
\r\n
= 1 ? \"myorders-order-status-complete\" : \"myorders-order-status-icon\"}>
\r\n
Awaiting Pickup
\r\n
\r\n
\r\n
= 2 ? \"myorders-order-status-complete\" : \"myorders-order-status-icon\"}>
\r\n
Driver Picked Up
\r\n
\r\n
\r\n
= 3 ? \"myorders-order-status-complete\" : \"myorders-order-status-icon\"}>
\r\n
In Processing
\r\n
\r\n
\r\n
= 4 ? \"myorders-order-status-complete\" : \"myorders-order-status-icon\"}>
\r\n
Ready
\r\n
\r\n
\r\n
= 5 ? \"myorders-order-status-complete\" : \"myorders-order-status-icon\"}>
\r\n
On Delivery
\r\n
\r\n
\r\n
= 6 ? \"myorders-order-status-complete\" : \"myorders-order-status-icon\"}>
\r\n
Delivered
\r\n
\r\n
\r\n )\r\n});\r\n","import React from 'react'\r\nimport { IBundleOrderEntity } from '../../models/order'\r\nimport { displayDateTime } from '../../utils/Utils'\r\nimport { MyOrdersGrid } from './MyOrdersGrid'\r\nimport { MyOrdersFooter } from './MyOrdersFooter';\r\nimport { observer } from 'mobx-react-lite';\r\ninterface IProp{\r\n dateFieldText: string;\r\n orders: IBundleOrderEntity[];\r\n setOrdersType: () => void;\r\n}\r\nexport const BundleOrdersList : React.FC = observer(({ dateFieldText, orders, setOrdersType}) => {\r\n return (\r\n
\r\n {orders.map(order => (\r\n
\r\n
\r\n
Order No: {order.orderNo}
\r\n
{dateFieldText}: {displayDateTime(order.deliveryDate)}
\r\n
\r\n \r\n \r\n
\r\n ))}\r\n
\r\n )\r\n});\r\n","import { observer } from 'mobx-react-lite'\r\nimport React from 'react'\r\nimport { IBundleOrderGroupEntity } from '../../models/order'\r\nimport { displayDate, displayDateTime} from '../../utils/Utils'\r\nimport { BundleOrdersList } from './BundleOrdersList';\r\n\r\ninterface IProp{\r\n orders: IBundleOrderGroupEntity[];\r\n orderType: number;\r\n setOrdersType: (type: number) => void;\r\n}\r\nexport const BundleOrderGroup : React.FC = observer(({orders, orderType, setOrdersType}) => {\r\n const handleSetOrderType = () => setOrdersType(orderType);\r\n return (\r\n
\r\n {orders.map(bundle => (\r\n
\r\n
\r\n
\r\n
Bundle No: {bundle.orderNo}
\r\n
Total: £ {bundle.total.toFixed(2)}
\r\n
\r\n
\r\n
Order Date: {displayDate(bundle.orderDate)}
\r\n { bundle.collectionDate && (
Collection Date: {displayDateTime(bundle.collectionDate)}
)}\r\n
\r\n
\r\n \r\n
))}\r\n
\r\n )\r\n});\r\n","import React, { useContext } from 'react'\r\nimport { history } from \"../../\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\n\r\nexport const BackToOrdersFooter = () => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { currentShop } = rootStore.commonStore;\r\n const { user } = rootStore.userStore;\r\nreturn (\r\n
\r\n
\r\n {(currentShop?.itemSelectionOptions === 0 || user?.noItemSelect) ? (\r\n <>\r\n ) : (\r\n \r\n )}\r\n
\r\n
\r\n)\r\n}\r\n","import React from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { ITimeSlot } from \"../../models/order\";\r\nimport { getTimeString } from \"../../utils/Utils\";\r\n\r\ninterface IProps {\r\n timeSlot: ITimeSlot;\r\n localTimeSlot: ITimeSlot | undefined;\r\n setTimeSlot: (timeSlot: ITimeSlot) => void;\r\n}\r\nexport const ChangeSlotRow: React.FC = observer(\r\n ({ timeSlot, localTimeSlot, setTimeSlot }) => {\r\n return (\r\n setTimeSlot(timeSlot)}\r\n className={\r\n localTimeSlot?.uniqueRecId === timeSlot.uniqueRecId\r\n ? \"timeslot-time-row timeslot-time-selected\"\r\n : \"timeslot-time-row\"\r\n }\r\n >\r\n
{`${getTimeString(timeSlot.slotTimeFrom)}:00 to ${getTimeString(\r\n timeSlot.slotTimeTo\r\n )}:00`}
\r\n
FREE
\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { ITimeSlot } from \"../../models/order\";\r\nimport { ChangeSlotRow } from \"./ChangeSlotRow\";\r\n\r\ninterface IProps {\r\n timeSlot: ITimeSlot;\r\n setTimeSlot: (timeSlot: ITimeSlot) => void;\r\n}\r\nexport const ChangeSlotGrid: React.FC = observer(\r\n ({ timeSlot, setTimeSlot }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { loadingSlots, slotsForDate } = rootStore.timeSlotStore;\r\n if (loadingSlots)\r\n return
Loading slots...
;\r\n else \r\n if(slotsForDate.length === 0)\r\n return
No slots available for selected date
\r\n return (\r\n
\r\n {slotsForDate.map((ds:ITimeSlot) => (\r\n \r\n ))}\r\n
\r\n );\r\n }\r\n);\r\n","import React from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { getDateString } from \"../../utils/Utils\";\r\ninterface IProps{\r\n selectedDate: Date;\r\n setSelectedDate: (value:string) => void\r\n}\r\nexport const ChangeSlotHeader : React.FC = observer(\r\n ({selectedDate, setSelectedDate}) => {\r\n const handleChange = (event: React.ChangeEvent) => {\r\n setSelectedDate(event.target.value);\r\n }\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n);","import React, { useState, useContext, useEffect } from \"react\";\r\nimport { ITimeSlot } from \"../../models/order\";\r\nimport { Dialog } from \"../Common/Dialog\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { ChangeSlotGrid } from \"./ChangeSlotGrid\";\r\nimport { ChangeSlotHeader } from \"./ChangeSlotHeader\";\r\nimport { formatDate, getDateFromString } from \"../../utils/Utils\";\r\n\r\ninterface IProps {\r\n showDialog: boolean;\r\n hideDialog: () => void;\r\n selectedSlot: ITimeSlot;\r\n setTimeSlot: (value: ITimeSlot) => void;\r\n}\r\nexport const ChangeSlotDialog: React.FC = observer(\r\n ({ showDialog, hideDialog, setTimeSlot, selectedSlot }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { user, customer, customerInfo } = rootStore.userStore;\r\n const { loadSlotsForDate } = rootStore.timeSlotStore;\r\n const [selectedDate, setSelectedDate] = useState(selectedSlot.slotDate);\r\n const [localTimeSlot, setLocalTimeSlot] = useState(selectedSlot);\r\n useEffect(() => {\r\n if (user && user.isCustomer)\r\n if (!customer) \r\n customerInfo();\r\n }, [user]);\r\n useEffect(() =>{\r\n if(selectedDate && customer)\r\n loadSlotsForDate(formatDate(selectedDate),customer.postCode)\r\n },[selectedDate,customer]);\r\n\r\n const saveTimeSlot = () => {\r\n setTimeSlot(localTimeSlot!);\r\n hideDialog();\r\n };\r\n const handleDateChange = (value:string) => {\r\n setSelectedDate(getDateFromString(value));\r\n }\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n);\r\n","import { observer } from \"mobx-react-lite\";\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport { Header } from \"../components/Layout/Header\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\nimport { AppOrdersList } from \"../components/Orders/AppOrdersList\";\r\nimport { MyOrderStatus } from \"../components/Orders/MyOrderStatus\";\r\nimport { BundleOrderGroup } from \"../components/Orders/BundleOrderGroup\";\r\nimport { BackToOrdersFooter } from \"../components/Common/BackToOrdersFooter\";\r\nimport { Footer } from \"../components/Layout/Footer\";\r\nimport { ChangeSlotDialog } from \"../components/Subscriptions/ChangeSlotDialog\";\r\nimport { ITimeSlot } from \"../models/order\";\r\n\r\nexport const MyOrdersPage = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {setPrevRoute} = rootStore.commonStore;\r\n const { \r\n getUnPickedOrders, unPickedOrders, loadingUnPickedOrders,\r\n getPickedOrders, pickedOrders, loadingPickedOrders,\r\n getOrdersInProcess, ordersInProcess, loadingOrdersInProcess,\r\n getOrdersReady, ordersReady, loadingOrdersReady,\r\n getOrdersOnDelivery, ordersOnDelivery, loadingOrdersOnDelivery,\r\n getOrdersDelivered, ordersDelivered, loadingOrdersDelivered,\r\n showChangeSlotDialog, setShowChangeSlotDialog, changeVisitSlot, selectedVisitUID, setSelectedVisitUID, visitSlot, setVisitSlot\r\n } = rootStore.orderStore;\r\n const [showDelivered, setShowDelivered] = useState(false);\r\n const [ordersType, setOrdersType] = useState(-1);\r\n useEffect(() =>{\r\n setPrevRoute(window.location.pathname);\r\n getUnPickedOrders();\r\n getPickedOrders();\r\n getOrdersInProcess();\r\n getOrdersReady();\r\n getOrdersOnDelivery();\r\n getOrdersDelivered();\r\n},[])\r\n\r\nconst handleSlotChange = (slot: ITimeSlot) =>{\r\n if(visitSlot !== slot){\r\n changeVisitSlot(selectedVisitUID,slot.uniqueRecId,ordersType);\r\n setVisitSlot(slot);\r\n setShowChangeSlotDialog(false);\r\n setOrdersType(-1);\r\n }\r\n }\r\n const handleHideDialog = () => {\r\n setSelectedVisitUID(\"\");\r\n setVisitSlot(undefined);\r\n setOrdersType(-1);\r\n setShowChangeSlotDialog(false);\r\n }\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n
\r\n { unPickedOrders.length > 0 && (\r\n <>\r\n
\r\n

Order(s) Awaiting Pickup

\r\n \r\n
\r\n \r\n \r\n )}\r\n \r\n { pickedOrders.length > 0 && (\r\n <>\r\n
\r\n

Order(s) Picked Up

\r\n \r\n
\r\n \r\n \r\n )}\r\n { ordersInProcess.length > 0 && (\r\n <>\r\n
\r\n

Order(s) In Processing

\r\n \r\n
\r\n \r\n \r\n )}\r\n { ordersReady.length > 0 && (\r\n <>\r\n
\r\n

Order(s) Ready

\r\n \r\n
\r\n \r\n \r\n )}\r\n { ordersOnDelivery.length > 0 && (\r\n <>\r\n
\r\n

Order(s) on Delivery

\r\n \r\n
\r\n \r\n \r\n )}\r\n { ordersDelivered.length > 0 && (\r\n <>\r\n
\r\n

Order(s) Delivered

\r\n \r\n
\r\n {showDelivered && ()}\r\n \r\n )}\r\n { \r\n (!loadingUnPickedOrders && unPickedOrders.length === 0 &&\r\n !loadingPickedOrders && pickedOrders.length === 0 &&\r\n !loadingOrdersInProcess && ordersInProcess.length === 0 &&\r\n !loadingOrdersReady && ordersReady.length === 0 &&\r\n !loadingOrdersOnDelivery && ordersOnDelivery.length === 0 &&\r\n !loadingOrdersDelivered && ordersDelivered.length === 0) &&\r\n (\r\n
You have no orders
\r\n )\r\n }\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n {showChangeSlotDialog && ()}\r\n \r\n );\r\n});\r\n","import React from \"react\";\r\nimport { Field } from \"react-final-form\";\r\nimport { observer } from \"mobx-react-lite\";\r\n\r\nexport const ContactDetails = observer(() => {\r\n return (\r\n
\r\n

Address

\r\n \r\n {({ input, meta }) => (\r\n <>\r\n
\r\n \r\n \r\n
\r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n\r\n \r\n )}\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n \r\n \r\n
\r\n )}\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n \r\n \r\n
\r\n )}\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n \r\n \r\n
\r\n )}\r\n
\r\n \r\n {({ input, meta }) => (\r\n <>\r\n
\r\n \r\n \r\n
\r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n\r\n \r\n )}\r\n
\r\n
\r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { Field } from \"react-final-form\";\r\n\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { LoadingComponent } from \"../Common/LoadingComponent\";\r\n\r\nexport const ProfilePersonalDetails = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { customer } = rootStore.userStore;\r\n if(!customer)\r\n return \r\n return (\r\n
\r\n
\r\n
Personal Details
\r\n
{customer.accountCode}
\r\n
\r\n \r\n {({ input, meta }) => (\r\n <>\r\n
\r\n \r\n \r\n
\r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n\r\n \r\n )}\r\n
\r\n \r\n \r\n {({ input, meta }) => (\r\n
\r\n \r\n \r\n
\r\n )}\r\n
\r\n \r\n {({ input, meta }) => (\r\n <>\r\n
\r\n \r\n \r\n \r\n
\r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n \r\n )}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n});","import React from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { history } from \"../../\";\r\n\r\nexport const ProfileFooter = observer(() => {\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n});\r\n","import React, { useContext } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { ICustomerCard } from \"../../models/cards\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { FaMinusSquare } from \"react-icons/fa\";\r\nimport { confirmAlert } from \"react-confirm-alert\";\r\ninterface IProps {\r\n customerCard: ICustomerCard;\r\n}\r\nexport const CardDetailRow: React.FC = observer(\r\n ({ customerCard }) => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { setDefaultCard, deactivateCustomerCard } = rootStore.userStore;\r\n const handleDelete = () => {\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

Delete Credit/Debit Card Confirmation

\r\n
\r\n
\r\n

`Are you sure you want to delete {customerCard.cardType} {customerCard.cardNumber}?`

\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n }\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {customerCard.cardType}\r\n
\r\n
{customerCard.cardNumber}
\r\n
\r\n {customerCard.cardExpiry}\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n);\r\n","import React, { useContext, useEffect } from \"react\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { CardDetailRow } from \"./CardDetailRow\";\r\n\r\nexport const CardDetails = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { customer, getCustomerCards, customerCards, showNewCardDialog, cardSaveError, defaultCardUID } = rootStore.userStore;\r\n useEffect(() => {\r\n if(customer){\r\n getCustomerCards();\r\n }\r\n }, [customer])\r\n return (\r\n <>\r\n
\r\n
Default
\r\n
Card Type
\r\n
Card Number
\r\n
Expiry Date
\r\n
Delete
\r\n
\r\n {customerCards.sort((a) => a.isDefault ? -1 : 1).map((card) => {\r\n return \r\n })}\r\n {(defaultCardUID.length === 0 && cardSaveError.length > 0) && (\r\n {cardSaveError}\r\n )}\r\n
\r\n \r\n
\r\n \r\n );\r\n }\r\n);\r\n","import React, { useContext, useState } from \"react\";\r\nimport { RootStoreContext } from \"../../stores/rootStore\";\r\nimport { Form as FinalForm, Field } from \"react-final-form\";\r\nimport { FaKey } from \"react-icons/fa\";\r\nimport { FORM_ERROR, ValidationErrors } from \"final-form\";\r\nimport { observer } from \"mobx-react-lite\";\r\n\r\n\r\nexport const PasswordBox = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { verifyPassword, setPasswordVerified } = rootStore.userStore;\r\n const [saveError, setSaveError] = useState(\"\")\r\n \r\n const validate = (value: string) => {\r\n const errors: ValidationErrors = [];\r\n if(!value) return errors.password(\"Kindly type your password\")\r\n };\r\n return (\r\n <>\r\n
\r\n

Authorisation

\r\n {\r\n verifyPassword(value.password).then((res) => {\r\n setPasswordVerified(res)\r\n if(!res){\r\n setSaveError(\"Invalid Password\");\r\n return { [FORM_ERROR]: 'Invalid Password' }\r\n }\r\n });\r\n }\r\n }\r\n render={({\r\n handleSubmit,\r\n submitError,\r\n submitting,\r\n invalid,\r\n pristine,\r\n dirtySinceLastSubmit,\r\n }) => (\r\n
\r\n
\r\n This section requires authorisation.
Kindly type your password to access this section.\r\n
\r\n \r\n {({ input, meta }) => (\r\n
\r\n
\r\n \r\n
\r\n \r\n {meta.touched && (meta.error || meta.submitError) && (\r\n \r\n {meta.error || meta.submitError}\r\n \r\n )}\r\n
\r\n )}\r\n
\r\n {submitError && !dirtySinceLastSubmit && (\r\n {submitError}\r\n )}\r\n { saveError.length > 0 && (\r\n {saveError}\r\n )}\r\n \r\n Authorise\r\n \r\n \r\n )}\r\n />\r\n
\r\n \r\n );\r\n});\r\n","import { Form as FinalForm } from \"react-final-form\";\r\nimport { FORM_ERROR, ValidationErrors } from \"final-form\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport React, { useContext, useEffect, useState } from \"react\";\r\nimport PostCodeLookUp from \"../api/agentPostCode\";\r\nimport { ContactDetails } from \"../components/NewCustomer/ContactDetails\";\r\nimport { ProfilePersonalDetails } from \"../components/Profile/ProfilePersonalDetails\";\r\nimport { ICustomerProfile } from \"../models/user\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\nimport { Footer } from \"../components/Layout/Footer\";\r\nimport { history } from \"../\";\r\nimport { ProfileFooter } from \"../components/Profile/ProfileFooter\";\r\nimport { CardDetails } from \"../components/Profile/CardDetails\";\r\nimport { Header } from \"../components/Layout/Header\";\r\nimport { PasswordBox } from \"../components/Common/PasswordBox\";\r\nimport { confirmAlert } from \"react-confirm-alert\";\r\nimport { WorldPayDialog } from \"../components/WorldPay/WorldPayDialog\";\r\nimport { StripeDialogWrapper } from \"../components/Stripe/StripeDialogWrapper\";\r\n\r\nexport const ProfilePage = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {setPrevRoute, currentShop} = rootStore.commonStore;\r\n const { user, updateCustomer, customerInfo, customer, passwordVerified, setPasswordVerified, defaultCardUID,showCardDialog } = rootStore.userStore;\r\n const [customerValues, setCustomerValues] = useState({\r\n title: \"\",\r\n firstName: \"\",\r\n middleName: \"\",\r\n surname: \"\",\r\n address1: \"\",\r\n address2: \"\",\r\n address3: \"\",\r\n address4: \"\",\r\n postCode: \"\",\r\n });\r\n useEffect(() => {\r\n setPrevRoute(window.location.pathname);\r\n setPasswordVerified(false);\r\n }, [])\r\n useEffect(() => {\r\n if (user && user.isCustomer)\r\n if (!customer) \r\n customerInfo();\r\n }, [user]);\r\n useEffect(() => {\r\n if(customer){\r\n setCustomerValues({\r\n title: customer.title,\r\n firstName: customer.firstName,\r\n middleName: customer.middleName,\r\n surname: customer.surname,\r\n address1: customer.address1,\r\n address2: customer.address2,\r\n address3: customer.address3,\r\n address4: customer.address4,\r\n postCode: customer.postCode,\r\n });\r\n }\r\n }, [customer])\r\n\r\n const validate = async (values: ICustomerProfile) => {\r\n const errors: ValidationErrors = [];\r\n if (!values.firstName) errors.firstName = \"First name is required\";\r\n if (!values.surname) errors.surname = \"Surname is required\";\r\n if (!values.address1) errors.address1 = \"Address is required\";\r\n if (!values.postCode) errors.postCode = \"Post code is required\";\r\n else\r\n await PostCodeLookUp.lookUp(values.postCode)\r\n .then((res) => {\r\n if (!res) errors.postCode = \"Invalid post code\";\r\n })\r\n .catch(() => (errors.postCode = \"Invalid post code\"));\r\n return errors;\r\n };\r\n let cardDialog = null;\r\n switch(currentShop!.cardProvider)\r\n {\r\n case 'WORLDPAY': cardDialog = ; break;\r\n case 'STRIPE' : cardDialog = ; break;\r\n default: cardDialog = ;\r\n }\r\nif(!passwordVerified){\r\n return (\r\n
\r\n
\r\n
\r\n \r\n

\r\n {currentShop?.shopName || \"My Drycleaner\"}\r\n

\r\n
\r\n \r\n
\r\n
\r\n )\r\n}\r\nelse\r\n return (\r\n <>\r\n
\r\n {\r\n if(defaultCardUID.length === 0 && !user?.hasCredit){\r\n confirmAlert({\r\n customUI: ({ onClose }) => {\r\n return (\r\n
\r\n
\r\n

No Default Card

\r\n
\r\n
\r\n

Please select a default credit/debit card

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n });\r\n } else\r\n updateCustomer(values)\r\n .then(() => history.push(\"/order\"))\r\n .catch((error) => ({\r\n [FORM_ERROR]: error,\r\n }))\r\n }}\r\n render={({handleSubmit})=>(\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n {!user?.hasCredit && (\r\n
\r\n
\r\n

Payment Details

\r\n \r\n
\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n )}\r\n />\r\n {currentShop!.hasCardModule && showCardDialog && cardDialog}\r\n \r\n );\r\n});\r\n","import { observer } from 'mobx-react-lite';\r\nimport React, { useContext, useEffect } from 'react'\r\nimport { RootStoreContext } from '../../stores/rootStore'\r\n\r\nexport const CurrentOffers = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { myOffers, loadMyOffers, loadingMyOffers} = rootStore.userStore;\r\n\r\n useEffect(() =>{\r\n loadMyOffers()\r\n },[])\r\n\r\n return (\r\n <>\r\n
\r\n

Current Offers

\r\n
\r\n { loadingMyOffers ? (Loading offers...) : (\r\n
\r\n
\r\n
Voucher Code
\r\n
Expiry Date
\r\n
Description
\r\n
\r\n { myOffers?.map((offer,i) => (\r\n
\r\n
{offer.voucherCode}
\r\n
{offer.expiryDate}
\r\n
{offer.description}
\r\n
\r\n ))}\r\n { myOffers.length === 0 && (\r\n Currently there are no offers for you\r\n )}\r\n
\r\n )}\r\n\r\n\r\n \r\n )\r\n});\r\n","import { observer } from 'mobx-react-lite';\r\nimport React, { useContext, useEffect } from 'react'\r\nimport { RootStoreContext } from '../../stores/rootStore'\r\n\r\nexport const SpecialPrices = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { myPriceGrid, loadMyPriceGrid, loadingMyPriceGrid} = rootStore.userStore;\r\n\r\n useEffect(() =>{\r\n loadMyPriceGrid()\r\n },[])\r\n\r\n return (\r\n <>\r\n
\r\n

Special Prices

\r\n
\r\n { loadingMyPriceGrid ? (Loading special prices...) : (\r\n
\r\n
\r\n
Item Name
\r\n
Price
\r\n
\r\n { myPriceGrid?.map((price,i) => (\r\n
\r\n
{price.itemName}
\r\n
{price.price.toFixed(2)}
\r\n
\r\n ))}\r\n { myPriceGrid.length === 0 && (\r\n Currently there are no special prices for you\r\n )}\r\n
\r\n )}\r\n\r\n\r\n \r\n )\r\n});\r\n","import { observer } from \"mobx-react-lite\";\r\nimport React, { useContext, useEffect } from \"react\";\r\nimport { BackToOrdersFooter } from \"../components/Common/BackToOrdersFooter\";\r\nimport { Footer } from \"../components/Layout/Footer\";\r\nimport { Header } from \"../components/Layout/Header\";\r\nimport { CurrentOffers } from \"../components/Offers/CurrentOffers\";\r\nimport { SpecialPrices } from \"../components/Offers/SpecialPrices\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\n\r\nexport const MyOffersPage = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const {setPrevRoute} = rootStore.commonStore;\r\n const {customer, customerInfo} = rootStore.userStore;\r\n\r\n useEffect(() =>{\r\n setPrevRoute(window.location.pathname);\r\n},[])\r\n useEffect(() =>{\r\n if(!customer)\r\n customerInfo();\r\n },[customer])\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n
\r\n {(customer) && (customer?.membershipType.length > 0) && (\r\n
Membership Type : {customer!.membershipType}
\r\n )}\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n});\r\n","import React, { useContext, useEffect } from \"react\";\r\nimport { Header } from \"../components/Layout/Header\";\r\nimport { Footer } from \"../components/Layout/Footer\";\r\nimport { RootStoreContext } from \"../stores/rootStore\";\r\nimport { observer } from \"mobx-react-lite\";\r\nimport { LoadingComponent } from \"../components/Common/LoadingComponent\";\r\nexport const InfoPage = observer(() => {\r\n const rootStore = useContext(RootStoreContext);\r\n const { message, setPrevRoute } = rootStore.commonStore;\r\n const { savingOrder } = rootStore.orderStore;\r\nuseEffect(() =>{\r\n setPrevRoute(window.location.pathname);\r\n},[])\r\nif (savingOrder)\r\n return ;\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n
\r\n { message && (
)}\r\n
\r\n
\r\n
\r\n