{"version":3,"sources":["@shared/network.ts","@store/models/places.ts","@entity/profile.ts","@shared/interaction.ts","@shared/helpers.ts","@store/models/profile.ts","@store/models/deliveryAddresses.ts","@shared/storageDB.ts","@store/service/security.ts","@store/root.ts","@store/service/socket.ts","@store/index.ts","@shared/components/alert.tsx","@shared/layouts/default/extra/header.tsx","@shared/layouts/default/extra/nav.tsx","@shared/components/formInput.tsx","@shared/layouts/default/extra/changePassword.tsx","@shared/layouts/default/index.tsx","@entity/order.ts","pages/currentOrder.tsx","@shared/useAlert.tsx","pages/profile/form.tsx","@entity/deliveryAddresses.ts","pages/profile/deliveryAddresses.tsx","pages/profile/changePassword.tsx","pages/profile/index.tsx","pages/historyOrder.tsx","@entity/bonus.ts","pages/bonusProgram/_places.tsx","pages/bonusProgram/index.tsx","pages/writeOffsOfBonuses.tsx","pages/gift.tsx","pages/link.tsx","@shared/layouts/authorization.tsx","pages/security/_confirmModal.tsx","@storeZusland/useRegistration.ts","pages/security/LoginV2.tsx","AppRouter.tsx","index.tsx"],"names":["EnumMethod","get","data","a","fnFetch","GET","post","POST","getCookie","cname","name","ca","decodeURIComponent","document","cookie","split","i","length","c","charAt","substring","indexOf","method","route","token","body","response","error","status","headers","fetch","JSON","stringify","query","json","console","places","createModel","state","loading","items","reducers","update","payload","effects","dispatch","init","defaultPassword","oldPassword","password","passwordConfirm","getError","dataSource","content","errors","toGetData","_","isObject","Object","keys","forEach","key","item","concat","isArray","row","isString","push","trim","idx","confirm","message","window","alert","findById","array","id","findIndex","o","cloneObject","ovject","clone","parse","arraySplice","size","arr","arrays","splice","profile","phone","email","birthDate","getData","securityService","deliveryAddresses","addresses","save","moment","format","iAgree","setNewPassword","add","delete","appName","request","caches","open","put","Response","ls","defaultValue","undefined","cache","match","value","EnumSenderSecurity","DB","retrieve","destroy","saveState","_dispatch","needChangePassword","initialState","authData","isAuthorized","isReady","setData","navigate","rootState","storage","location","pathname","includes","logout","login","reCAPTCHA","loginV2","log","needToRegister","registration","connectionId","socketService","sender","Telegram","link","COMMON_SMS","forgotPassword","changePassword","reload","models","setConnectionId","connection","signalR","withUrl","configureLogging","Information","build","on","start","then","invoke","catch","err","toString","store","EnumAlertType","connect","d","fnLogout","nav","className","href","target","title","rel","isMobile","to","routes","onClick","DesktopNav","navigations","map","val","getProps","props","isCurrent","icon","isActive","PhoneInput","placeholder","onChange","disabled","mask","e","inputProps","PasswordInput","styled","DatePicker","React","useState","visible","setVisible","type","CheckboxInput","label","checked","initialValues","validationSchema","Yup","shape","required","security","fnChangePassword","formik","useFormik","onSubmit","values","setSubmitting","onClose","showCloseButton","handleSubmit","setFieldValue","isSubmitting","data-badge","DefaultLayout","currentOrder","historyOrder","bonusProgram","writeOffsOfBonuses","giftСard","Mobile","children","grayFooter","layoutClass","overflow","style","overflowX","Helmet","color","Desktop","defaultOrder","pickup","address","date","deliveryTime","deliveryTimeString","newDB","number","place","sum","total","bonuses","orderItems","currentOrderDescription","caption","field","Alert","faIcon","description","Icon","order","setState","setStatus","getStatus","restaurantId","orderId","useEffect","discount","placesSplice","placeKey","lodash","p","danger","textTransform","fontWeight","cellSpacing","cellPadding","srcImage","image","backgroundImage","amount","price","colSpan","Math","abs","AlertModel","Demodal","create","closeText","modal","useModal","height","isOpen","close","display","alignItems","justifyContent","marginBottom","set","textAlign","lineHeight","fontSize","resolve","fnSave","handleChange","defaultDeliveryAddresses","userId","city","street","house","flat","intercom","housing","entrance","floor","fields","span","AddressForm","fnAddAddress","isValid","resetForm","setConfiguration","gutterWidth","xs","fnDeleteAddress","getStrength","test","join","Profile","render","PureComponent","visibleKey","orders","pageNum","index","page","setPage","pageIndex","flexDirection","width","margin","isVisible","placesName","placeLink","setVisibleKey","sumBy","ImageUrl","breakLabel","nextLabel","primaryColor","initialPage","onPageChange","selected","pageRangeDisplayed","marginPagesDisplayed","pageCount","ceil","previousLabel","defaultBonus","bonusProcent","bonusRemainder","bonusSum","cardHash","cardNumber","restaurant","Places","bonus","setSelected","setPlace","activeBonuse","setActiveBonuse","filter","bonusLink","ref","useRef","getACard","useCallback","find","activeBonuseArr","b","bonusItem","isAndroid","backgroundColor","isIOS","documentsLink","scrollTo","top","innerHeight","left","behavior","BonusProgram","getPlacesByBonus","componentDidMount","bonusAdd","bonusWriteOff","bonusAfter","card","onlyElectric","setOnlyElectric","createdAt","cardBarcode","hash","marginLeft","Link","useParams","setLoading","onGetPlace","axios","paylaod","CodeInput","input","ConfirmModal","onRepeat","useDispatch","code","SMS","autoFocus","submitForm","useRegistration","setPhone","agreement","getErrorByField","touched","fnLogin","fnLoginV2","executeRecaptcha","useGoogleReCaptcha","useNavigate","confirmModal","setConfirmModal","vlink","navigator","serviceWorker","getRegistration","reg","unregister","path","ReactDOM","reCaptchaKey","IntlProvider","locale","ruRU","formatDate","formatStr","ru","Container","getElementById"],"mappings":"2KAQKA,E,0FAAAA,K,UAAAA,E,aAAAA,M,KAKE,IAAMC,EAAG,uCAAG,WAAOC,GAAP,SAAAC,EAAA,sEACFC,EAAQJ,EAAWK,IAAKH,GADtB,mFAAH,sDAGHI,EAAI,uCAAG,WAAOJ,GAAP,SAAAC,EAAA,sEACHC,EAAQJ,EAAWO,KAAML,GADtB,mFAAH,sDASXM,EAAY,SAACC,GAIf,IAHA,IAAMC,EAAOD,EAAQ,IAEfE,EADgBC,mBAAmBC,SAASC,QACzBC,MAAM,KACtBC,EAAI,EAAGA,EAAIL,EAAGM,OAAQD,IAAK,CAEhC,IADA,IAAIE,EAAIP,EAAGK,GACY,MAAhBE,EAAEC,OAAO,IACZD,EAAIA,EAAEE,UAAU,GAEpB,GAAwB,IAApBF,EAAEG,QAAQX,GACV,OAAOQ,EAAEE,UAAUV,EAAKO,OAAQC,EAAED,QAG1C,MAAO,IAELb,EAAO,uCAAG,WAAOkB,EAAP,sCAAAnB,EAAA,yDACZoB,EADY,EACZA,MADY,IAEZC,aAFY,MAEJ,KAFI,MAGZC,YAHY,MAGL,KAHK,EAKRC,EAA6B,CAC7BC,OAAO,EACPD,SAAU,CACNE,O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R,GAEjD,OADG,OAAHA,QAAG,IAAHA,KAAKC,aACE1U,OAAOH,OAAO,iBACpByD,MAAK,WACN5H,QAAQsG,IAAI,kLAGlB,MAAO9G,OAGV,IAEEwL,EAAStF,QAKTsF,EAASvF,aAYV,kBAAC,IAAD,KACI,kBAAC,GAAD,CAAMwT,KAAMnQ,GAAOjC,KAAMA,KAAK,SAC9B,kBAAC,GAAD,CAAMoS,KAAMnQ,GAAO6P,MAAO9R,KAAK,UAC/B,kBAAC,GAAD,CAASoS,KAAMnQ,GAAOzF,UACtB,kBAAC,GAAD,CAAc4V,KAAMnQ,GAAOiD,eAC3B,kBAAC,GAAD,CAAoBkN,KAAMnQ,GAAOmD,qBACjC,kBAAC,GAAD,CAAcgN,KAAMnQ,GAAOkD,eAC3B,kBAAC,GAAD,CAAciN,KAAMnQ,GAAOgD,eAC3B,kBAAC,GAAD,CAAUmN,KAAMnQ,GAAOoD,iBAnB3B,kBAAC,IAAD,KACI,kBAAC,GAAD,CAAM+M,KAAMnQ,GAAOjC,KAAMA,KAAK,SAC9B,kBAAC,GAAD,CAAMoS,KAAMnQ,GAAO6P,MAAO9R,KAAK,UAC/B,kBAAC,GAAD,CAASoS,KAAMnQ,GAAO3C,SAR1B,yBAAKoC,UAAU,eACX,kBAAC,gBAAD,CAActF,KAAM,GAAI0J,MAAM,gB,OCjC1CuM,SACI,gBAAC,IAAD,CAAUjR,MAAOA,GACb,gBAAC,IAAD,CAAyBkR,aAAa,4CAClC,gBAACC,EAAA,EAAD,CAAcC,OAAQC,IAAMC,WAPxC,SAAoBxb,EAAWyb,GAC3B,OAAOzV,IAAOhG,EAAMyb,EAAW,CAAEH,OAAQI,SAO7B,gBAAC,GAAD,OAEJ,gBAAC,IAAQC,UAAT,QAGRhb,SAASib,eAAe,W","file":"static/js/main.ca0c44b9.chunk.js","sourcesContent":["export interface IRequestResponse {\n error: boolean,\n response: {\n status: number,\n data: any\n }\n}\n\nenum EnumMethod {\n GET = \"GET\",\n POST = \"POST\",\n}\n\nexport const get = async (data: TfnFetchData) => {\n return await fnFetch(EnumMethod.GET, data);\n}\nexport const post = async (data: TfnFetchData) => {\n return await fnFetch(EnumMethod.POST, data);\n}\n\ntype TfnFetchData = {\n route: string,\n token?: string | null,\n body?: any | null\n}\nconst getCookie = (cname:string) => {\n const name = cname + \"=\";\n const decodedCookie = decodeURIComponent(document.cookie);\n const ca = decodedCookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) === 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n}\nconst fnFetch = async (method: EnumMethod, {\n route,\n token = null,\n body = null\n}: TfnFetchData) => {\n let response: IRequestResponse = {\n error: false,\n response: {\n status: 200,\n data: null\n }\n }\n if (route) {\n let headers: any = {\n \"Accept\": \"application/json\",\n \"Content-Type\": \"application/json\",\n \"XSRF-TOKEN\": getCookie(\"XSRF-TOKEN\")\n };\n if (token) headers[\"Authorization\"] = \"Bearer \" + token;\n const query = await fetch(route, {\n method,\n headers,\n body: body?JSON.stringify(body):null,\n });\n \n try {\n const status = query.status,\n data = await query.json();\n\n response.response = {status, data}\n } catch (error) {\n const status = query.status;\n console.error(\"[catch] error\", error);\n response.error = true;\n response.response.status = status;\n }\n } else {\n console.error(\"[catch] [ROUTE] обязателен для заполнения\");\n response.error = true;\n }\n return response;\n}","import {createModel} from \"@rematch/core\";\nimport type {RootModel} from \"../root\";\nimport {TPlace} from \"@entity/place\";\nimport {get} from \"@shared/network\";\n\ntype TModelPlaces = {\n loading: boolean,\n items: TPlace[]\n}\n\nexport const places = createModel()({\n name: \"places\",\n state: {\n loading: true,\n items: []\n } as TModelPlaces,\n reducers: {\n update(state: TModelPlaces, payload: object) {\n return {\n ...state,\n ...payload\n };\n },\n },\n effects: (dispatch) => ({\n async init(payload: object, state) {\n const {response, error} = await get({route: `api/auth/restaurants`});\n if (!error && response.status === 200) {\n const items: TPlace[] = response.data;\n dispatch.places.update({loading: false, items})\n } else dispatch.places.update({loading: false})\n }\n })\n})","export type TProfile = {\n id: number,\n name: string,\n phone: string,\n email: string,\n birthDate: string | null,\n}\n\nexport const defaultProfile: TProfile = {\n id: 0,\n name: \"\",\n phone: \"\",\n email: \"\",\n birthDate: \"\"\n}\n\nexport type TPassword = {\n oldPassword: string, \n password: string, \n passwordConfirm: string\n}\n\nexport const defaultPassword:TPassword = {\n oldPassword: \"\", \n password: \"\", \n passwordConfirm: \"\"\n}","import _ from \"lodash\"\n\ninterface AnyObject {\n [key: string]: any;\n}\n\nexport const toGetData = (data: AnyObject | string): string[] => {\n let content: string[] = [];\n if (_.isObject(data)) {\n Object.keys(data).forEach((key: string) => {\n let item: string[] = toGetData(data[key] as AnyObject);\n content = content.concat(item)\n })\n } else if (_.isArray(data)) {\n content.forEach((row: any) => {\n let item = toGetData(row);\n content = content.concat(item)\n });\n } else if (_.isString(data)) {\n content.push(data.trim())\n }\n return content;\n}\n\nexport const getError = (dataSource: any): string => {\n let content = \"Что-то пошло не так. Попробуйте еще раз\",\n errors = toGetData(dataSource);\n\n if (errors.length > 0) {\n content = \"\";\n errors.forEach((row: string, idx: number) => {\n if (errors.length > 1) {\n content += `${(idx + 1)}) ${row}`;\n } else content += row;\n if ((idx + 1) !== errors.length) content += \"\\n\";\n });\n }\n\n return content;\n}\n\nexport const confirm = (message: string): boolean => {\n return window.confirm(message);\n}\n\nexport const alert = (message: string): void => {\n window.alert(message);\n}","import _ from \"lodash\";\n\nexport const findById = (array: Array, id: number) => {\n return _.findIndex(array, function(o: any) { return o.id === id})\n}\n\nexport const cloneObject = (ovject: any): any => {\n var clone = JSON.stringify(ovject);\n return JSON.parse(clone);\n};\n\nexport const parseBool = (str: any): boolean => {\n if(str === null) return false;\n\n if (typeof str === 'boolean') {\n return (str === true);\n }\n\n if(typeof str === 'string') {\n if(str === \"\") return false;\n\n str = str.replace(/^\\s+|\\s+$/g, '');\n if(str.toLowerCase() === 'true' || str.toLowerCase() === 'yes') return true;\n\n str = str.replace(/,/g, '.');\n str = str.replace(/^\\s*\\s*/g, '-');\n }\n\n if(!isNaN(str)) return (parseFloat(str) !== 0);\n\n return false;\n}\n\nexport const twoObjectsAreEqual = (objectOne: any, objectTwo: any): boolean => {\n try {\n return JSON.stringify(objectOne) === JSON.stringify(objectTwo);\n } catch (e) {\n return false;\n }\n}\n\nexport const isObject = (any: any): boolean => {\n return _.isObject(any);\n}\n\nexport const valueExist = (value: any): boolean => {\n return !_.isNull(value) && !_.isEmpty(value) && !_.isUndefined(value)\n}\n\nexport const isBlank = (str: any): boolean => {\n return (!str || /^\\s*$/.test(str));\n}\n\nexport const printErrorMessage = (data: any, status: number): string => {\n let content: any = `Ошибка #${status}`;\n\n if (data && !_.isUndefined(data.errors)) {\n content = data.errors;\n if (_.isObject(data.errors)) {\n content = Object.keys(data.errors).map((key: string) => {\n return data.errors[key];\n });\n }\n } else if (typeof data === \"string\") {\n content = data;\n }\n\n return content;\n}\n\nexport const combineTwoObjectsByPattern = (pattern: any, current: any, modifies: any) => {\n const response = cloneObject(pattern);\n Object.keys(response).forEach((key: string) => {\n response[key] = modifies[key]?modifies[key]:(current[key]?current[key]:pattern[key])\n });\n return response;\n}\n\nexport const arraySplice = (data: any[] = [], size: number = 4): Array => {\n let arr: Array = [], arrays = cloneObject(data);\n\n while (arrays.length > 0) {\n arr.push(arrays.splice(0, size));\n }\n\n return arr;\n}","import {createModel} from \"@rematch/core\";\nimport type {RootModel} from \"../root\";\nimport {defaultProfile, TPassword, TProfile} from \"@entity/profile\";\nimport {get, post} from \"@shared/network\";\nimport {getError, alert} from \"@shared/interaction\";\nimport { cloneObject } from \"@shared/helpers\";\nimport moment from \"moment\";\n\ntype TModelProfile = {\n loading: boolean,\n item: TProfile\n}\n\nexport type TSaveProfile = {\n iAgree: boolean\n} & TProfile\n\nexport const profile = createModel()({\n name: \"profile\",\n state: {\n loading: true,\n item: defaultProfile\n } as TModelProfile,\n reducers: {\n update(state: TModelProfile, payload: object) {\n return {...state, ...payload};\n },\n },\n effects: (dispatch) => ({\n async getData(payload: object, state): Promise {\n const {securityService} = state,\n {response, error} = await get({route: `api/profile`, token: securityService.token});\n if (!error && response.status === 200) {\n dispatch.profile.update({item: response.data, loading: false})\n dispatch.deliveryAddresses.init(response.data.addresses)\n return true;\n } else return false;\n },\n async save(payload: TProfile, state): Promise {\n const {securityService} = state;\n\n let body = cloneObject(payload);\n if (body.birthDate) body.birthDate = moment(body.birthDate, \"DD.MM.YYYY\").format(\"YYYY-MM-DD\")\n delete body.iAgree;\n delete body.addresses;\n\n const {response, error} = await post({route: `api/profile`, body, token: securityService.token});\n if (!error && response.status === 200) {\n await dispatch.profile.update({item: payload})\n return true;\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return false;\n },\n async setNewPassword(payload: TPassword, state): Promise {\n let body = cloneObject(payload);\n const {securityService} = state;\n\n const {response, error} = await post({route: `api/auth/setNewPassword`, body, token: securityService.token});\n if (!error && response.status === 200) {\n const data: {message: string} = response.data;\n alert(data.message);\n return true;\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return false;\n },\n })\n})","import {createModel} from \"@rematch/core\";\nimport type {RootModel} from \"../root\";\nimport {TDeliveryAddresses} from \"@entity/deliveryAddresses\";\nimport {cloneObject} from \"@shared/helpers\";\nimport {confirm, getError, alert} from \"@shared/interaction\";\nimport {post} from \"@shared/network\";\n\ntype TModelDeliveryAddresses = {\n loading: boolean,\n items: TDeliveryAddresses[]\n}\n\nexport const deliveryAddresses = createModel()({\n name: \"deliveryAddresses\",\n state: {\n loading: true,\n items: []\n } as TModelDeliveryAddresses,\n reducers: {\n update(state: TModelDeliveryAddresses, payload: object) {\n return {...state, ...payload};\n },\n },\n effects: (dispatch) => ({\n async init(payload: object[], state) {\n dispatch.deliveryAddresses.update({loading: false, items: payload})\n },\n async add(payload: TDeliveryAddresses, state): Promise {\n const {securityService} = state,\n {response, error} = await post({route: `api/profile/addAddress`, body: payload, token: securityService.token});\n if (!error && response.status === 200) {\n const items: TDeliveryAddresses[] = cloneObject(state.deliveryAddresses.items);\n let item: TDeliveryAddresses = response.data;\n items.push(item);\n\n await dispatch.deliveryAddresses.update({items})\n return true;\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return false;\n },\n async delete(payload: number, state): Promise {\n if (confirm(\"Удалить адрес доставки?\")) {\n const {deliveryAddresses, securityService} = state,\n items: TDeliveryAddresses[] = [];\n deliveryAddresses.items.forEach(item => {\n if (item.id !== payload) items.push(item);\n else {\n post({route: `api/profile/deleteAddress`, body: item, token: securityService.token});\n }\n })\n await dispatch.deliveryAddresses.update({items})\n }\n }\n })\n})","import * as ls from \"local-storage\";\nconst appName = \"@RestaLK\";\n\nasync function save(request: string, dataSource: any) {\n const cacheAvailable = 'caches' in window;\n if (cacheAvailable) {\n const cache = await window.caches.open(appName);\n cache.put(request, new Response(JSON.stringify(dataSource)))\n } else {\n ls.set(`${appName}${request}`, JSON.stringify(dataSource));\n }\n}\n\nasync function retrieve(request: string, defaultValue: any = undefined) {\n const cacheAvailable = 'caches' in window;\n if (cacheAvailable) {\n const cache = await window.caches.open(appName),\n response = await cache.match(request);\n\n if (response && response.status === 200) {\n const json = await response.json();\n return json;\n }\n } else {\n const value: any = ls.get(`${appName}${request}`);\n if (value !== null && typeof value === \"string\") {\n return JSON.parse(value);\n } else if (value !== null) return value\n }\n return defaultValue;\n}\n\nasync function destroy(request: string) {\n const cacheAvailable = 'caches' in window;\n if (cacheAvailable) {\n const cache = await window.caches.open(appName);\n cache.delete(request);\n } else {\n ls.remove(`${appName}${request}`);\n }\n return true;\n}\n\nconst DB = {\n save,\n retrieve,\n destroy\n}\nexport default DB;","import { navigate } from \"@reach/router\";\nimport { createModel } from \"@rematch/core\";\nimport { cloneObject } from \"@shared/helpers\";\nimport { getError, alert } from \"@shared/interaction\";\nimport { post } from \"@shared/network\";\nimport DB from \"@shared/storageDB\";\nimport { Dispatch } from \"@store\";\nimport { TCodeModel } from \"pages/security/_confirmModal\";\nimport type { RootModel } from \"../root\";\n\ntype TSecurityService = {\n id: number,\n token: string,\n isAuthorized: boolean,\n isReady: boolean,\n needChangePassword: boolean,\n}\nexport enum EnumSenderSecurity {\n UnKnow = 0,\n Telegram = 1,\n Whatsapp = 2,\n SMS = 3,\n COMMON_SMS = 4,\n}\nexport type TLoginPayload = {\n phone: string,\n password: string,\n remember: boolean\n reCAPTCHA?: string;\n}\n\nexport type TLoginPayloadV2 = {\n phone: string,\n reCAPTCHA?: string;\n agreement: boolean,\n}\n\nexport type TRegistrationPayload = {\n id: string,\n passwordConfirm: string,\n sender: EnumSenderSecurity,\n reCAPTCHA: string,\n agreement: boolean\n\n email: string\n name: string\n} & TLoginPayload\nexport type TForgotPasswordPayload = {\n phone: string,\n sender: EnumSenderSecurity,\n reCAPTCHA: string\n}\nexport type PromiceConfirm = {\n id?: string,\n link?: string,\n message?: string,\n error: boolean\n}\n\nexport type TChangePassword = {\n password: string,\n passwordConfirm: string,\n}\n\nconst saveState = async (data: {\n authData: {\n id: number,\n token: string,\n }\n}, _dispatch: Dispatch, needChangePassword: boolean): Promise => {\n const state: TSecurityService = cloneObject(initialState);\n state.id = data.authData.id;\n state.token = data.authData.token;\n state.isAuthorized = true;\n state.isReady = true;\n DB.save(\":Security\", state);\n\n state.needChangePassword = needChangePassword;\n\n await _dispatch.securityService.setData(state);\n _dispatch.profile.getData({});\n navigate(\"/\");\n}\n\nconst initialState: TSecurityService = {\n id: 0,\n token: \"\",\n isAuthorized: false,\n isReady: false,\n needChangePassword: false,\n}\nexport const securityService = createModel()({\n name: \"securityService\",\n state: initialState as TSecurityService,\n reducers: {\n setData(state, payload: object) {\n return { ...state, ...payload };\n }\n },\n effects: _dispatch => ({\n async init(payload: object, rootState): Promise {\n const storage: TSecurityService = await DB.retrieve(\":Security\", initialState);\n if (storage.isAuthorized) {\n await _dispatch.securityService.setData({ token: storage.token });\n if (await _dispatch.profile.getData({})) {\n _dispatch.securityService.setData({ isReady: true, isAuthorized: true });\n if (!window.location.pathname.includes(\"/card\")\n && window.location.pathname !== \"/write-offs-of-bonuses\"\n && window.location.pathname !== \"/history\"\n && window.location.pathname !== \"/profile\"\n && window.location.pathname !== \"/bonus-program\"\n && window.location.pathname !== \"/gift-card\"\n && !window.location.pathname.includes(\"/link\")\n && !window.location.pathname.includes(\"/vlink\")) {\n navigate(\"/\");\n }\n\n } else {\n _dispatch.securityService.setData({ ...initialState, isReady: true });\n _dispatch.securityService.logout({})\n }\n } else {\n await _dispatch.securityService.setData({ isReady: true });\n if (!window.location.pathname.includes(\"/card\") && !window.location.pathname.includes(\"/link\") && !window.location.pathname.includes(\"/vlink\")) {\n navigate(\"/login\");\n }\n }\n return;\n },\n async login(payload: TLoginPayload, rootState): Promise {\n let body = {\n // login: `+7 ${payload.phone}`,\n login: payload.phone,\n password: payload.password,\n reCAPTCHA: payload.reCAPTCHA\n }\n const { response, error } = await post({ route: `api/auth`, body });\n if (!error && response.status === 200) {\n await saveState(response.data, _dispatch, rootState.securityService.needChangePassword)\n return true;\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return true;\n },\n async loginV2(payload: TLoginPayloadV2, rootState): Promise<{\n message?: string,\n needToRegister?: boolean,\n error: boolean\n }> {\n let body = {\n phone: payload.phone,\n reCAPTCHA: payload.reCAPTCHA\n }\n\n const { response, error } = await post({ route: `api/auth/byphone`, body });\n console.log(body, response, error);\n\n if (!error && response.status === 200) {\n // await saveState(response.data, _dispatch, rootState.securityService.needChangePassword)\n const data: { message: string } = response.data;\n return { message: data.message, error: false };\n } else if (response.status == 404) {\n return { error: true, needToRegister: true }\n } else {\n console.log(response.data, error);\n\n const message: string = getError(response.data);\n alert(message);\n }\n return { error: true };\n },\n async registration(payload: TRegistrationPayload, state): Promise {\n let body = cloneObject(payload);\n // body.phone = `+7 ${body.phone}`;\n body.connectionId = state.socketService.connectionId;\n\n // const {response, error} = await post({route: `api/auth/register`, body});\n const { response, error } = await post({ route: `api/auth/registerV2`, body });\n if (!error && response.status === 200) {\n if (body.sender === EnumSenderSecurity.Telegram) {\n const data: { id: string, link: string } = response.data;\n return { link: data.link, id: data.id, error: false };\n } else if (body.sender === EnumSenderSecurity.COMMON_SMS) {\n const data: { message: string } = response.data;\n return { message: data.message, error: false };\n }\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return { error: true };\n },\n async forgotPassword(payload: TForgotPasswordPayload): Promise {\n let body: TRegistrationPayload = cloneObject(payload);\n // body.phone = `+7 ${body.phone}`;\n\n _dispatch.securityService.needChangePassword(true)\n\n const { response, error } = await post({ route: `api/auth/forgotPass`, body });\n // const {response, error} = await post({route: `api/auth/forgot`, body});\n if (!error && response.status === 200) {\n const data: { link?: string, message?: string } = response.data;\n return { link: data.link, message: data.message, error: false };\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return { error: true };\n },\n async confirm(payload: TCodeModel, rootState): Promise {\n let body: TCodeModel = cloneObject(payload);\n // if (body.phone.charAt(0) !== \"7\") body.phone = `+7 ${body.phone}`;\n\n const { response, error } = await post({ route: `api/auth/confirm`, body });\n if (!error && response.status === 200) {\n await saveState(response.data, _dispatch, rootState.securityService.needChangePassword)\n return true;\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return false;\n },\n async changePassword(payload: TChangePassword, rootState): Promise {\n const { profile } = rootState;\n let body = cloneObject(payload);\n body.phone = profile.item.phone;\n\n const { response, error } = await post({ route: `api/auth/changePassword`, body });\n if (!error && response.status === 200) {\n _dispatch.securityService.setData({ needChangePassword: false });\n const data: { message: string } = response.data;\n alert(data.message);\n return true;\n } else {\n const message: string = getError(response.data);\n alert(message);\n }\n return false;\n },\n async logout(payload: object, rootState): Promise {\n DB.destroy(\":Security\");\n window.location.reload();\n },\n needChangePassword(payload: boolean, rootState): void {\n _dispatch.securityService.setData({ needChangePassword: payload })\n }\n })\n})","import {Models} from \"@rematch/core\"\nimport {places} from \"./models/places\";\nimport {profile} from \"./models/profile\";\nimport {deliveryAddresses} from \"./models/deliveryAddresses\";\nimport {securityService} from \"./service/security\";\nimport {socketService} from \"./service/socket\";\n\nexport interface RootModel extends Models {\n places: typeof places,\n profile: typeof profile,\n deliveryAddresses: typeof deliveryAddresses,\n securityService: typeof securityService,\n socketService: typeof socketService,\n}\n\nexport const models: RootModel = {\n profile,\n deliveryAddresses,\n places,\n securityService,\n socketService\n}\n","import {createModel} from \"@rematch/core\";\nimport type {RootModel} from \"../root\";\nimport * as signalR from \"@microsoft/signalr\";\nimport { TCodeModel } from \"pages/security/_confirmModal\";\n\ntype TModelSocket = {\n connectionId: null | string\n}\n\nexport const socketService = createModel()({\n name: \"socketService\",\n state: {\n connectionId: null\n } as TModelSocket,\n reducers: {\n setConnectionId(state: TModelSocket, payload: string) {\n return {\n ...state,\n connectionId: payload\n };\n },\n },\n effects: (dispatch) => ({\n init(payload: object, state) {\n const connection = new signalR.HubConnectionBuilder()\n .withUrl(\"/ws\")\n .configureLogging(signalR.LogLevel.Information)\n .build();\n\n connection.on(\"ReceiveMessageOne\", (response: any) => {\n const payload = response as TCodeModel;\n dispatch.securityService.confirm(payload)\n })\n\n connection.start()\n .then(() => {\n connection.invoke('getConnectionId')\n .then((connectionId) => {\n dispatch.socketService.setConnectionId(connectionId)\n }).catch(err => {\n console.error(\"connected\", err.toString())\n });\n }).catch((err: any) => {\n console.error(\"catch\", err.toString());\n });\n }\n })\n})","import {init, RematchDispatch, RematchRootState} from \"@rematch/core\"\nimport {models, RootModel} from \"./root\"\n\nexport const store = init({\n models,\n})\n\nexport type Store = typeof store\nexport type Dispatch = RematchDispatch\nexport type RootState = RematchRootState\n\nstore.dispatch.places.init({})\nstore.dispatch.securityService.init({})\nstore.dispatch.socketService.init({})","import React from \"react\";\nimport {Icon} from \"rsuite\";\nimport {SVGIcon} from \"rsuite/lib/@types/common\";\nimport {IconNames} from \"rsuite/lib/Icon\";\n\nexport enum EnumAlertType {\n success,\n warning,\n danger\n}\n\ntype TProps = {\n icon?: IconNames | SVGIcon,\n faIcon?: JSX.Element,\n title: string,\n type: EnumAlertType,\n description?: string | JSX.Element\n}\n\nconst Alert: React.FC = ({\n icon, faIcon, title, description, type\n}) => {\n return (\n
\n
\n {icon?:faIcon?faIcon:<>}\n
\n
{title}
\n {description &&
{description}
}\n
\n )\n}\n\nexport default Alert;","import React from \"react\"\nimport {Link, navigate} from \"@reach/router\"\nimport {routes} from \"AppRouter\"\nimport {Dispatch, RootState} from \"@store\"\nimport {connect} from \"react-redux\"\nimport {confirm} from \"@shared/interaction\"\nimport {isMobile} from \"react-device-detect\"\n\ntype Props = {\n profile: RootState[\"profile\"][\"item\"],\n fnLogout: Dispatch[\"securityService\"][\"logout\"],\n nav?: boolean\n}\n\nconst DesktopHeader: React.FC = ({\n profile, fnLogout, nav\n}) => {\n const logout = () => {\n if (confirm(\"Выйти из личного кабинета?\")) fnLogout({})\n }\n return (\n
\n \n
\n
    \n
  • \n {profile.name}\n
  • \n
  • \n {!profile.name ? (\n\n \n ) : (\n \n )}\n
  • \n
\n
\n
\n )\n}\n\nconst mapState = (state: RootState) => ({\n profile: state.profile.item\n}),\n mapDispatch = (d: any) => {\n const dispatch: Dispatch = d;\n return {\n fnLogout: dispatch.securityService.logout,\n }\n }\nexport default connect(mapState, mapDispatch)(DesktopHeader);","import { Link, LinkGetProps } from \"@reach/router\";\nimport React from \"react\"\nimport { TNav } from \"..\";\n\ntype TProps = {\n navigations: TNav[],\n isMobile: boolean\n}\n\nconst isActive = ({ isCurrent }: LinkGetProps, isMobile: boolean, item: TNav) => {\n if (!isMobile) return isCurrent ? { className: \"active\" } : {}\n else return isCurrent ? { className: `active ${item.icon}` } : { className: `${item.icon}` }\n}\n\nconst DesktopNav: React.FC = ({\n navigations, isMobile\n}) => {\n return (\n \n )\n}\n\nexport default DesktopNav;","import { EnumSenderSecurity } from \"@store/service/security\";\nimport { Formik } from \"formik\";\nimport moment from \"moment\";\nimport React from \"react\";\nimport InputMask from \"react-input-mask\";\nimport { DatePicker } from \"rsuite\";\nimport styled from \"styled-components\";\n\ntype TInput = {\n value: string,\n onChange: (value: string) => void,\n placeholder: string,\n disabled?: boolean,\n error?: string\n name?: string\n type?: string\n}\n\nexport const PhoneInput: React.FC = ({\n value, placeholder, onChange, disabled, error, name\n}) => {\n return (\n
\n
\n ) => onChange(e.target.value)}\n disabled={disabled}>\n {(inputProps: any) => }\n \n
\n
{error}
\n
\n )\n}\n\nconst CustomDatePicker = styled(DatePicker)`\n width: 100%;\n\n .rs-btn-default {\n border-radius: 0;\n\n &:hover {\n border-color: #dbdbdb!important;\n }\n\n .rs-picker-toggle-value {\n color: #030306;\n }\n }\n`;\n\nexport const DateInput: React.FC = ({\n value, placeholder, onChange, disabled, error, name, type\n}) => {\n if (type === \"hidden\") return \n return (\n
\n {\n onChange(moment(evt).format(\"D.MM.YYYY\"))\n }}\n format=\"D.MM.YYYY\"\n cleanable={false}\n />\n
\n )\n}\n\nexport const PasswordInput: React.FC = ({\n value, placeholder, onChange, disabled, error\n}) => {\n const [visible, setVisible] = React.useState(false);\n return (\n
\n
\n ) => onChange(e.target.value)}\n disabled={disabled} />\n
setVisible(!visible)}>\n \n
\n
\n
{error}
\n
\n )\n}\n\ntype TCheckboxInput = {\n checked: boolean,\n label: string | JSX.Element,\n onChange: (checked: boolean) => void\n disabled: boolean\n}\nexport const CheckboxInput: React.FC = ({\n label, checked, onChange, disabled\n}) => {\n return (\n
\n {disabled ? (
\n \n
) : (\n
\n \n
\n )}\n
\n )\n\n}\ntype TConfirmationButtons = {\n value: EnumSenderSecurity,\n onChange: (value: EnumSenderSecurity) => void,\n disabled?: number[],\n error?: string\n}\nexport const ConfirmationButtons: React.FC = ({\n value,\n onChange,\n disabled,\n error\n}) => {\n let isDisabledTelegram = false,\n // isDisabledWhatsapp = false,\n isDisabledSMS = false;\n\n if (disabled && disabled.length > 0) {\n isDisabledTelegram = disabled.includes(EnumSenderSecurity.Telegram);\n // isDisabledWhatsapp = disabled.includes(EnumSenderSecurity.Whatsapp);\n isDisabledSMS = disabled.includes(EnumSenderSecurity.COMMON_SMS);\n }\n\n return (\n
\n
Отправить код подтверждения:
\n
\n
\n
!isDisabledSMS && onChange(EnumSenderSecurity.COMMON_SMS)}>\n SMS\n
\n
\n {/*
\n
!isDisabledWhatsapp && onChange(EnumSenderSecurity.Whatsapp)}>\n \n WhatsApp\n
\n
*/}\n
\n {/*
!isDisabledTelegram && onChange(EnumSenderSecurity.Telegram)}>\n \n Telegram\n
*/}\n
{error}
\n
\n )\n}","import React from \"react\"\nimport {connect} from \"react-redux\";\nimport Rodal from \"rodal\";\nimport * as Yup from \"yup\";\nimport {useFormik} from \"formik\";\nimport {Dispatch, RootState} from \"@store\";\nimport {TChangePassword} from \"@store/service/security\";\nimport {PasswordInput} from \"@shared/components/formInput\";\nimport { isMobile } from \"react-device-detect\";\n\ntype TProps = {\n security: RootState[\"securityService\"],\n fnChangePassword: Dispatch[\"securityService\"][\"changePassword\"]\n}\n\nconst initialValues: TChangePassword = {\n password: \"\",\n passwordConfirm: \"\",\n},\nvalidationSchema = Yup.object().shape({\n password: Yup.string().required(\"Поле обязательно для заполнения\"),\n passwordConfirm: Yup.string().required(\"Поле обязательно для заполнения\"),\n});\n// getErrorByField = (formik: any, field: string) => {\n// return formik.errors[field] && formik.touched[field] ? formik.errors[field] : undefined\n// }\n\nconst ChangePassword: React.FC = ({security, fnChangePassword}) => {\n const formik = useFormik({\n initialValues,\n validationSchema,\n onSubmit: async (values: TChangePassword) => {\n formik.setSubmitting(true)\n const status = await fnChangePassword(values);\n if (!status) formik.setSubmitting(false);\n },\n });\n return (\n {}} showCloseButton={false} className={isMobile? \"mobile\": undefined}>\n
\n
\n
Смена пароля
\n
\n formik.setFieldValue(\"password\", value, false)}\n disabled={formik.isSubmitting}\n // error={getErrorByField(formik, \"password\")}\n />\n formik.setFieldValue(\"passwordConfirm\", value, false)}\n disabled={formik.isSubmitting}\n // error={getErrorByField(formik, \"passwordConfirm\")}\n />\n
\n \n
\n \n
\n
\n
\n )\n}\nconst mapState = (state: RootState) => ({\n security: state.securityService,\n}),\nmapDispatch = (d: any) => {\n const dispatch = d as Dispatch;\n return {\n fnChangePassword: dispatch.securityService.changePassword,\n }\n}\nexport default connect(mapState, mapDispatch)(ChangePassword);","import { routes } from \"AppRouter\";\nimport React from \"react\";\nimport { isMobile } from \"react-device-detect\";\nimport { Helmet } from \"react-helmet\";\nimport { MetroSpinner } from \"react-spinners-kit\";\nimport { TDefaultProps } from \"..\";\nimport DesktopHeader from \"./extra/header\";\nimport DesktopNav from \"./extra/nav\";\nimport ChangePassword from \"./extra/changePassword\";\n\ntype Props = {\n loading: boolean,\n children: JSX.Element,\n grayFooter?: boolean,\n layoutClass?: string,\n nav?: boolean\n overflow?: boolean\n} & TDefaultProps;\n\nexport type TNav = {\n name: string,\n to: string,\n icon: string\n}\n\nconst DefaultLayout: React.FC = (props) => {\n const navigations: TNav[] = [\n { name: \"Текущий заказ\", to: routes.currentOrder, icon: \"currentOrder\" },\n { name: \"История заказов\", to: routes.historyOrder, icon: \"historyOrder\" },\n { name: \"Профиль\", to: routes.profile, icon: \"profile\" },\n { name: \"Бонусная программа\", to: routes.bonusProgram, icon: \"bonusProgram\" },\n { name: \"Движение бонусов\", to: routes.writeOffsOfBonuses, icon: \"writeOffBonus\" },\n { name: \"Подарочные сертификаты\", to: routes.giftСard, icon: \"gift\" },\n ];\n return (\n
\n {isMobile ? :\n }\n \n
\n )\n}\nexport default DefaultLayout;\n\nconst Mobile: React.FC = ({\n title, navigations, loading,\n grayFooter, children, layoutClass, nav, overflow=false\n}) => (\n
\n \n {title}\n \n \n {nav !== false && }\n {isMobile &&
{title}
}\n
\n {loading ? (\n
\n \n
\n ) : children}\n
\n \n
\n)\nconst Desktop: React.FC = ({\n title, navigations, loading,\n grayFooter, children, layoutClass, nav, overflow=false\n}) => (\n
\n \n {title}\n \n \n \n {nav !== false && }\n
\n {loading ? (\n
\n \n
\n ) : children}\n
\n \n
\n)","import {TOrderItem} from \"./orderItem\";\n\nexport type TOrder = {\n [index: string]: any,\n pickup: boolean,\n address: string, // Адрес доставки\n date: string,\n deliveryTime: string | null,\n deliveryTimeString: string, // Время доставки\n newDB: boolean,\n number: number, // Номер заказа\n place: number, // Id ресторана\n sum: number, // Сумма заказа\n total: number, // С учетом скидки или доставки\n bonuses: string | null, // Бонусы\n orderItems: TOrderItem[]\n}\n\nexport type TBonuses = {\n date: string,\n place: number, // Id ресторана\n bonusAdd: number,\n bonusWriteOff: number,\n bonusAfter: number\n}\n\nexport type TCard = {\n cardBarcode: string,\n cardNumber: string,\n restaurantId: number,\n sum: number,\n userId: number,\n hash: string,\n clientId:string,\n createdAt: string,\n}\n\nexport const defaultOrder: TOrder = {\n pickup: false,\n address: \"\",\n date: \"\",\n deliveryTime: null,\n deliveryTimeString: \"\",\n newDB: false,\n number: 0,\n place: 0,\n sum: 0,\n total: 0,\n bonuses: null,\n orderItems: []\n}\n\nexport const currentOrderDescription = [\n {caption: \"Номер заказа\", field: \"number\"},\n {caption: \"Время принятия заказа\", field: \"date\"},\n {caption: \"Адрес доставки\", field: \"address\"},\n {caption: \"Время доставки\", field: \"deliveryTimeString\"},\n]","import React, { FC, useEffect, useState } from \"react\";\nimport DefaultLayout from \"@shared/layouts/default\";\nimport { TDefaultPageProps } from \"pages\";\nimport { currentOrderDescription, defaultOrder, TOrder } from \"@entity/order\";\nimport { isMobile } from \"react-device-detect\";\nimport { RootState } from \"@store\";\nimport { connect } from \"react-redux\";\nimport { get } from \"@shared/network\";\nimport { getError } from \"@shared/interaction\";\nimport Alert, { EnumAlertType } from \"@shared/components/alert\";\nimport moment from \"moment\";\nimport _ from \"lodash\";\nimport { arraySplice } from \"@shared/helpers\";\nimport lodash from \"lodash\";\n\ntype TProps = {\n security: RootState[\"securityService\"],\n places: RootState[\"places\"][\"items\"]\n} & TDefaultPageProps\n\ntype TState = {\n loading: boolean,\n order: TOrder,\n error: {\n visible: boolean,\n message: string\n },\n}\n\nconst CurrentOrder: FC = ({\n security, places\n}) => {\n const [state, setState] = useState({\n loading: true,\n order: defaultOrder,\n error: {\n visible: false,\n message: \"\"\n },\n });\n const [status, setStatus] = useState(null);\n\n const getStatus = async (restaurantId: number, orderId: number) => {\n // setTimeout(async () => {\n const { response, error } = await get({ route: `api/order/status/${restaurantId}/${orderId}`, token: security.token });\n if (!error && response.status === 200) {\n try {\n setStatus(response.data.status);\n } catch (error) {\n\n }\n }\n // getStatus(restaurantId, orderId);\n // }, 15000)\n }\n\n const getData = async (): Promise => {\n const { response, error } = await get({ route: `api/order/current`, token: security.token });\n if (!error && response.status === 200) {\n const order: TOrder = response.data;\n\n if (order.number > 0 && order?.status) setStatus(order.status);\n\n if (order.number > 0) getStatus(order.place, order.number);\n setState({ ...state, order, loading: false });\n } else setState({\n ...state,\n loading: false,\n error: {\n visible: true,\n message: getError(response.data)\n }\n })\n }\n\n useEffect(() => {\n getData();\n }, []);\n\n const { loading, order, error } = state,\n discount = order.sum - order.total,\n placesSplice = arraySplice(places),\n placeKey = lodash.findIndex(places, p => p.id === order.place);\n\n return (\n \n {error.visible ? (\n \n ) : order.number === 0 ? (\n
\n
\n
\n
В вашей тарелке пусто
\n
Чтобы сделать заказ, выберите ресторан
\n
\n
\n {placesSplice.map((splice, idx) => (\n
\n {splice.map((place, i) => (\n \n ))}\n
\n ))}\n
\n
\n ) : (\n
\n
\n
\n {status && (\n
\n
Статус заказа:
\n
{status}
\n
\n )}\n {placeKey !== -1 && (\n
\n
Заведение:
\n \n
\n )}\n {currentOrderDescription.map((val, idx) => {\n if (val.field === \"deliveryTimeString\") return <>;\n\n if (val.field === \"address\" && order.pickup) return <>;\n if (val.field === \"deliveryTimeString\" && !order[val.field]) return <>;\n let caption = val.caption, value = order[val.field];\n\n if (val.field === \"date\") value = moment(order[val.field]).format(\"DD.MM.YYYY HH:mm\");\n if (val.field === \"deliveryTimeString\") caption = \"Время самовывоза\";\n\n return (\n
\n
{caption}:
\n
{value}
\n
\n )\n })}\n
\n
\n
\n \n \n {order.orderItems.map((item, idx) => {\n const key = _.findIndex(places, p => p.id === order.place);\n let srcImage = item.image;\n if (key !== -1 && srcImage.indexOf(places[key].link) === -1) {\n srcImage = places[key].link + srcImage;\n }\n return (\n <>\n \n {!isMobile && (\n \n )}\n \n \n \n \n \n \n \n \n )\n })}\n {order.sum === order.total && order.pickup ? (\n \n \n \n ) : order.sum === order.total && !order.pickup ? (\n <>\n \n \n \n \n \n \n \n \n \n \n ) : (\n <>\n \n \n \n \n \n \n \n \n \n \n )}\n \n
\n
\n
\n {item.name}\n \n x{item.amount}\n \n {item.price * item.amount} руб\n
\n Сумма к оплате: {order.total} руб\n
\n Сумма заказа: {order.sum} руб\n
\n Доставка: Бесплатно!\n
\n Сумма к оплате: {order.total} руб\n
\n Сумма заказа: {order.sum} руб\n
\n {discount > 0 ? (\n <>\n Скидка: {discount} руб\n \n ) : (\n <>\n Доставка: {Math.abs(discount)} руб\n \n )}\n
\n Сумма к оплате: {order.total} руб\n
\n
\n {/* */}\n
\n
\n
\n )}\n \n )\n}\n\nconst mapState = (state: RootState) => ({\n security: state.securityService,\n places: state.places.items,\n})\nexport default connect(mapState)(CurrentOrder);","import React from \"react\";\nimport {Demodal, useModal} from \"demodal\";\nimport Rodal from \"rodal\";\nimport {Notification} from \"react-iconly\";\nimport {isMobile} from \"react-device-detect\";\n\ntype AlertProps = {\n title: string;\n titleCSS?: React.CSSProperties;\n width?: string;\n message?: string;\n messageJSX?: React.ReactNode;\n icon?: React.ReactNode;\n closeText?: string;\n}\n\nconst AlertModel = Demodal.create(({\n title,\n closeText = \"Ок\",\n}: AlertProps) => {\n const modal = useModal()\n\n const resolve = (value: boolean) => () => {\n modal.resolve(value)\n modal.close()\n }\n\n return (\n \n
\n
\n
\n \n
\n
\n {title}\n
\n
\n \n
\n
\n
\n
\n )\n});\n\nexport const Alert = (props: AlertProps) => Demodal.open(AlertModel, props)","import React from \"react\";\nimport {connect} from \"react-redux\";\nimport * as Yup from \"yup\";\nimport {useFormik} from \"formik\";\nimport {Dispatch, RootState} from \"@store\";\nimport {CheckboxInput} from \"@shared/components/formInput\";\nimport {TSaveProfile} from \"@store/models/profile\";\nimport InputMask from \"react-input-mask\";\nimport {isMobile} from \"react-device-detect\";\nimport moment from \"moment\";\nimport {Alert} from \"../../@shared/useAlert\";\n\ntype TProps = {\n profile: RootState[\"profile\"][\"item\"],\n fnSave: Dispatch[\"profile\"][\"save\"]\n}\n\nconst validationSchema = Yup.object().shape({\n name: Yup.string().required(\"Поле обязательно для заполнения\"),\n email: Yup.string().email(\"Неверный адрес электронной почты\").required(\"Поле обязательно для заполнения\"),\n})\n\nconst Form: React.FC = ({\n profile, fnSave\n}) => {\n const formik = useFormik({\n initialValues: {\n ...profile,\n birthDate: profile.birthDate ? moment(profile.birthDate).format(\"DD.MM.YYYY\") : \"\",\n iAgree: false\n } as TSaveProfile,\n validationSchema,\n onSubmit: async (values: TSaveProfile) => {\n await fnSave(values);\n formik.setSubmitting(false);\n Alert({title: \"Данные успешно сохранены!\"});\n },\n });\n return (\n
\n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n {formik.values.phone}\n
\n
\n
\n \n \n {(inputProps: any) => }\n \n
\n
\n
\n
\n formik.setFieldValue(\"iAgree\", value, false)}/>\n
\n
\n \n
\n
\n
\n )\n}\n\nconst mapState = (state: RootState) => ({\n profile: state.profile.item\n}),\nmapDispatch = (d: any) => {\n const dispatch: Dispatch = d;\n return {\n fnSave: dispatch.profile.save,\n }\n}\nexport default connect(mapState, mapDispatch)(Form);","export type TDeliveryAddresses = {\n [index: string]: any,\n id: number,\n userId: number,\n city: string, // Город\n street: string, // Улица\n house: string, // Дом\n flat: string, // Квартира\n intercom: string, // Домофон\n housing: string, // Корпус\n entrance: string, // Подъезд\n floor: number | null, // Этаж\n}\n\nexport const defaultDeliveryAddresses: TDeliveryAddresses = {\n userId: 0,\n id: 0,\n city: \"\",\n street: \"\",\n house: \"\",\n flat: \"\",\n intercom: \"\",\n housing: \"\",\n entrance: \"\",\n floor: null,\n}","import React from \"react\";\nimport {connect} from \"react-redux\";\nimport {Dispatch, RootState} from \"@store\";\nimport {defaultDeliveryAddresses, TDeliveryAddresses} from \"@entity/deliveryAddresses\";\nimport {useFormik} from \"formik\";\nimport * as Yup from \"yup\";\nimport {Col, Row, setConfiguration} from \"react-grid-system\";\nimport {isMobile} from \"react-device-detect\";\n\ntype TProps = {\n loading: RootState[\"deliveryAddresses\"][\"loading\"],\n items: RootState[\"deliveryAddresses\"][\"items\"],\n fnAddAddress: Dispatch[\"deliveryAddresses\"][\"add\"],\n fnDeleteAddress: Dispatch[\"deliveryAddresses\"][\"delete\"],\n}\n\nconst fields = [\n {name: \"house\", caption: \"Дом\", type: \"text\", required: true, span: isMobile?12:2},\n {name: \"housing\", caption: \"Корпус\", type: \"text\", required: false, span: isMobile?6:2},\n {name: \"intercom\", caption: \"Домофон\", type: \"text\", required: false, span: isMobile?6:2},\n {name: \"entrance\", caption: \"Подъезд\", type: \"text\", required: false, span: isMobile?6:2},\n {name: \"flat\", caption: \"Квартира\", type: \"text\", required: false, span: isMobile?12:2},\n {name: \"floor\", caption: \"Этаж\", type: \"number\", required: false, span: isMobile?6:2},\n];\n\nconst validationSchema = Yup.object().shape({\n city: Yup.string().required(`Поле \"Город\" обязательно для заполнения`),\n street: Yup.string().required(`Поле \"Улица\" обязательно для заполнения`),\n house: Yup.string().required(`Поле \"Дом\" обязательно для заполнения`),\n})\n\nconst AddressForm: React.FC<{\n fnAddAddress: Dispatch[\"deliveryAddresses\"][\"add\"]\n}> = ({\n fnAddAddress\n}) => {\n const formik = useFormik({\n initialValues: defaultDeliveryAddresses,\n onSubmit: async (values: TDeliveryAddresses) => {\n formik.setSubmitting(true);\n let isValid = await validationSchema.isValid(values);\n if (isValid && fnAddAddress) {\n const status = await fnAddAddress(values);\n if (status) {\n formik.resetForm({})\n }\n }\n formik.setSubmitting(false);\n },\n });\n setConfiguration({ gutterWidth: isMobile?10:25 });\n return (\n
\n \n \n \n \n \n \n \n \n \n {fields.map((field, idx) => {\n let placeholder = field.caption;\n if (field.required) placeholder += \" *\";\n return (\n \n \n \n )\n })}\n \n \n \n \n \n \n
\n )\n}\n\nconst DeliveryAddresses: React.FC = ({\n loading, items, fnAddAddress, fnDeleteAddress\n}) => {\n if (loading) return <>;\n return (\n
\n {items.length > 0 && (\n
\n
Адреса доставки
\n
    \n {items.map((item, idx) => {\n let address = `${idx + 1}. ${item.city}, ул. ${item.street}`;\n if (item.housing) address += `, корп. ${item.housing}`;\n address += `, д. ${item.house}`;\n if (item.flat) address += `, кв. ${item.flat}`;\n \n return (\n
  • \n {address}\n \n
  • \n )\n })}\n
\n
\n )}\n
\n
Добавить адрес
\n \n
\n
\n )\n}\n\nconst mapState = (state: RootState) => ({\n loading: state.deliveryAddresses.loading,\n items: state.deliveryAddresses.items,\n}),\nmapDispatch = (d: any) => {\n const dispatch: Dispatch = d;\n return {\n fnAddAddress: dispatch.deliveryAddresses.add,\n fnDeleteAddress: dispatch.deliveryAddresses.delete,\n }\n}\nexport default connect(mapState, mapDispatch)(DeliveryAddresses);","import React from \"react\";\nimport {connect} from \"react-redux\";\nimport {Dispatch} from \"@store\";\nimport {useFormik} from \"formik\";\nimport * as Yup from \"yup\";\nimport {setConfiguration} from \"react-grid-system\";\nimport {isMobile} from \"react-device-detect\";\nimport {TPassword, defaultPassword} from \"@entity/profile\";\n\n\nconst getStrength = (password: string) => {\n let errors: string[] = [];\n\n if (password.length < 6) {\n errors.push(\"Пароль должен содержать не менее 6 символов\")\n }\n if (!/[0-9]/.test(password)) {\n errors.push(\"Пароль должен содержать хотябы одно число\")\n }\n if (!/[a-z]/.test(password)) {\n errors.push(\"Пароль должен содержать строчную букву\")\n }\n if (!/[A-Z]/.test(password)) {\n errors.push(\"Пароль должен содержать заглавную букву\")\n }\n // if (!/[$&+,:;=?@#|\"<>.^*()%!-]/.test(password)) {\n // errors.push(\"Пароль должен содержать специальный символ\")\n // }\n\n return errors\n}\n\n\nconst validationSchema = Yup.object().shape({\n oldPassword: Yup.string().required(`Поле \"Старый пароль\" обязательно для заполнения`),\n password: Yup.string().required(`Поле \"Новый пароль\" обязательно для заполнения`),\n passwordConfirm: Yup.string().required(`Поле \"Подтверждение нового пароля\" обязательно для заполнения`),\n})\n\nconst ChangePasswordForm: React.FC<{\n setNewPassword?: Dispatch[\"profile\"][\"setNewPassword\"]\n}> = ({\n setNewPassword\n}) => {\n const formik = useFormik({\n initialValues: defaultPassword,\n onSubmit: async (values: TPassword) => {\n formik.setSubmitting(true);\n let isValid = await validationSchema.isValid(values);\n if (isValid && setNewPassword) {\n const err = getStrength(values.password);\n if (err.length === 0) {\n const status = await setNewPassword(values);\n if (status) {\n formik.resetForm({})\n }\n } else {\n alert(err.join(`${\"\\n\"}`))\n }\n\n }\n formik.setSubmitting(false);\n },\n });\n setConfiguration({ gutterWidth: isMobile ? 10 : 25 });\n\n console.log();\n \n return (\n
\n
Изменить пароль
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n Изменить пароль\n \n
\n
\n
\n )\n }\nconst mapDispatch = (d: any) => {\n const dispatch: Dispatch = d;\n return {\n setNewPassword: dispatch.profile.setNewPassword,\n }\n}\nexport default connect(null, mapDispatch)(ChangePasswordForm);","import React from \"react\";\nimport Form from \"./form\";\nimport {TDefaultPageProps} from \"pages\";\nimport DefaultLayout from \"@shared/layouts/default\";\nimport DeliveryAddresses from \"./deliveryAddresses\";\nimport ChangePasswordForm from \"./changePassword\";\nimport { isMobile } from \"react-device-detect\";\n\ntype TProps = {\n\n} & TDefaultPageProps\n\nclass Profile extends React.PureComponent {\n render = () => {\n return (\n \n
\n
\n \n \n
\n
\n )\n }\n}\n\nexport default Profile;","import React, { FC, useEffect, useState } from \"react\";\nimport { TOrder } from \"@entity/order\";\nimport DefaultLayout from \"@shared/layouts/default\";\nimport _ from \"lodash\";\nimport ReactPaginate from \"react-paginate\";\nimport moment from \"moment\";\nimport { TDefaultPageProps } from \"pages\";\nimport { Col, Row } from \"react-grid-system\";\nimport { isMobile } from \"react-device-detect\";\nimport { get } from \"@shared/network\";\nimport { getError } from \"@shared/interaction\";\nimport { RootState } from \"@store\";\nimport { connect } from \"react-redux\";\nimport Alert, { EnumAlertType } from \"@shared/components/alert\";\nimport { findById } from \"@shared/helpers\";\nimport { CaretLeft, CaretRight } from \"react-iconly\";\n\ntype TProps = {\n security: RootState[\"securityService\"],\n places: RootState[\"places\"][\"items\"]\n} & TDefaultPageProps\n\ntype TState = {\n loading: boolean,\n visibleKey: number,\n orders: TOrder[],\n error: {\n visible: boolean,\n message: string\n },\n}\n\nconst HistoryOrder: FC = ({\n security, places\n}) => {\n const [state, setState] = useState({\n loading: true,\n visibleKey: -1,\n orders: [],\n error: {\n visible: false,\n message: \"\"\n },\n });\n const [page, setPage] = useState({\n amount: 0,\n pageNum: 10,\n index: 1\n })\n\n const getData = async (pageIndex: number) => {\n const { response, error } = await get({ route: `api/order/orders/${pageIndex}`, token: security.token });\n if (!error && response.status === 200) {\n\n setState({ ...state, loading: false, orders: response.data.orders });\n\n setPage({\n index: pageIndex,\n amount: response.data.amount,\n pageNum: response.data.pageNum,\n })\n } else setState({\n ...state,\n loading: false,\n error: {\n visible: true,\n message: getError(response.data)\n }\n })\n },\n setVisibleKey = (key: number) => setState({ ...state, visibleKey: key });\n\n useEffect(() => {\n getData(1);\n }, []);\n\n const { loading, orders, visibleKey, error } = state,\n span = 2.4;\n\n return (\n \n {error.visible ? (\n \n ) : (\n
\n
\n \n № заказа\n {!isMobile && (\n Ресторан\n )}\n Дата\n Кол-во блюд\n Сумма заказа\n {isMobile && (\n \n )}\n \n
\n {orders.map((order: TOrder, idx) => {\n const isVisible = visibleKey === idx,\n key = findById(places, order.place);\n\n let placesName: string = \"\", placeLink: string = \"\"\n if (key !== -1) {\n placesName = places[key].name;\n placeLink = places[key].link;\n }\n\n return (\n
\n setVisibleKey(isVisible ? -1 : idx)}>\n \n {order.number}\n \n {!isMobile && (\n \n {placesName}\n \n )}\n \n {moment(order.date).format(\"DD.MM.YYYY\")}\n {isMobile && (\n {placesName}\n )}\n \n {_.sumBy(order.orderItems, i => i.amount)}\n \n {order.total + ' p. '}\n {!isMobile && (\n \n )}\n \n {isMobile && (\n \n \n \n )}\n \n {isVisible && (\n
\n {order.orderItems.map((item, i) => {\n let ImageUrl: string = item.image;\n if (item.image && ImageUrl.indexOf(\"https://\") === -1 && ImageUrl.indexOf(\"http://\") === -1) ImageUrl = placeLink + ImageUrl;\n\n return (\n \n \n {!isMobile &&
}\n
\n {item.name}\n
\n \n \n x{item.amount}\n \n \n {`${item.price * item.amount} руб`}\n \n \n )\n })}\n {order.total - order.sum > 10 ? (\n \n \n {!isMobile &&
}\n
\n Доставка\n
\n \n \n x1\n \n \n {`${order.total - order.sum} руб`}\n \n \n ) : order.sum - order.total > 0 ? (\n \n \n {!isMobile &&
}\n
\n Скидка за самовывоз\n
\n \n \n\n \n \n -{`${order.sum - order.total} руб`}\n \n \n ) : <>}\n
\n )}\n
\n )\n })}\n
\n
\n
\n \n }\n initialPage={page.index - 1}\n onPageChange={page => {\n getData(page.selected + 1)\n }}\n pageRangeDisplayed={isMobile? 3: 5}\n marginPagesDisplayed={2}\n pageCount={Math.ceil(page.amount / page.pageNum)}\n previousLabel={\n \n } />\n
\n
\n )}\n \n )\n}\n\nconst mapState = (state: RootState) => ({\n security: state.securityService,\n places: state.places.items,\n})\nexport default connect(mapState)(HistoryOrder);","export type TBonus = {\n bonusProcent: number,\n bonusRemainder: number,\n bonusSum: number,\n cardHash: string | null,\n cardNumber: string | null,\n restaurant: number\n}\n\nexport const defaultBonus: TBonus = {\n bonusProcent: 0,\n bonusRemainder: 0,\n bonusSum: 0,\n cardHash: null,\n cardNumber: null,\n restaurant: 0\n}","import React, {useCallback, useEffect, useRef, useState} from \"react\";\nimport _ from \"lodash\";\nimport {RootState} from \"@store\";\nimport {defaultBonus, TBonus} from \"@entity/bonus\";\nimport {arraySplice} from \"@shared/helpers\";\nimport lodash from \"lodash\";\nimport {TPlace} from \"@entity/place\";\nimport {get} from \"@shared/network\";\nimport {Col, Row} from \"react-grid-system\";\nimport {isAndroid, isIOS, isMobile} from \"react-device-detect\";\n\ntype TProps = {\n places: RootState[\"places\"];\n bonus: TBonus[];\n selected: TBonus;\n security: RootState[\"securityService\"];\n setSelected: (selected: TBonus) => void;\n}\n\nconst Places: React.FC = ({\n places, bonus, selected, security,\n setSelected\n}) => {\n const [place, setPlace] = useState()\n const [activeBonuse, setActiveBonuse] = useState([])\n const filter = lodash.filter(places.items, i => !i.bonusLink !== true),\n placesSplice = arraySplice(filter);\n\n const ref = useRef(null)\n\n const getACard = useCallback((place: TPlace) => {\n get({route: `api/log/clickBonusPage/${place.id}`, token: security.token});\n }, [])\n\n const getPlacesByBonus = (): TPlace | undefined => {\n return lodash.find(places.items, p => p.id === selected.restaurant);\n }\n\n useEffect(() => {\n setPlace(getPlacesByBonus());\n const activeBonuseArr: TBonus[] = bonus.filter((b: TBonus) => b.cardNumber)\n setActiveBonuse(activeBonuseArr)\n }, [places, bonus, selected])\n\n\n return (\n <>\n
\n {placesSplice.map((splice, idx) => (\n
\n {splice.map((place, i) => {\n const key = _.findIndex(bonus, (b: TBonus) => b.restaurant === place.id),\n bonusItem = key !== -1 ? bonus[key] : defaultBonus;\n if (bonusItem.cardNumber === null) {\n // return (\n //
(getACard(place), window.open(place.bonusLink + \"\"))}>\n //
\n //
\n //
\n // получить карту\n //
\n //
\n // )\n\n return (\n
\n
\n
\n
\n нет карты\n
\n
\n )\n }\n\n return (\n <>\n {place !== undefined && isMobile && activeBonuse.length !== 0 && selected.restaurant === place.id ? (\n
\n
{\n setSelected(bonusItem)\n }}>\n
\n
\n
\n {bonusItem.bonusSum} бонусов\n
\n
\n
\n
\n
{place?.name}
\n
Карта № {selected.cardNumber}
\n
\n \n \n
\n
\n {selected.bonusSum}
\n бонусов\n
\n
На вашей карте
\n
\n \n \n
\n
{selected.bonusProcent}%
\n
Статус карты
\n
\n \n {/* \n
\n
{selected.bonusRemainder} р.
\n
\n До следующего уровня
\n осталось потратить\n
\n
\n */}\n
\n
\n
\n
Добавить бонусную карту в кошелёк
\n
\n {isAndroid &&
\n
\n
\n {place !== undefined && place.documentsLink !== null && (\n \n Ссылка на оферту бонусной программы\n \n )}\n
\n
\n
\n
\n ) : (\n
{\n setSelected(bonusItem)\n window.scrollTo({\n top: window.innerHeight,\n left: 0,\n behavior: \"smooth\",\n })\n }}>\n
\n
\n
\n {bonusItem.bonusSum} бонусов\n
\n
\n )}\n \n )\n })}\n
\n ))}\n
\n \n )\n}\n\nexport default Places;","import DefaultLayout from \"@shared/layouts/default\";\nimport {RootState} from \"@store\";\nimport {TDefaultPageProps} from \"pages\";\nimport React from \"react\";\nimport {Col, Row, setConfiguration} from \"react-grid-system\";\nimport {connect} from \"react-redux\";\nimport {isMobile, isIOS, isAndroid} from \"react-device-detect\";\nimport {get} from \"@shared/network\";\nimport Alert, {EnumAlertType} from \"@shared/components/alert\";\nimport {defaultBonus, TBonus} from \"@entity/bonus\";\nimport {getError} from \"@shared/interaction\";\n\n// import PlacesMobile from \"./_placesMobile\";\n// import PlacesDesktop from \"./_placesDesktopNew\";\n// import PlacesDesktop from \"./_placesDesktop\";\nimport Places from \"./_places\";\n\nimport {TPlace} from \"@entity/place\";\nimport lodash from \"lodash\";\n\ntype TProps = {\n places: RootState[\"places\"],\n security: RootState[\"securityService\"],\n} & TDefaultPageProps;\n\ntype TState = {\n loading: boolean,\n selected: TBonus,\n bonus: TBonus[],\n error: {\n visible: boolean,\n message: string\n },\n}\n\nclass BonusProgram extends React.PureComponent {\n\n readonly state = {\n selected: defaultBonus,\n loading: true,\n bonus: [],\n error: {\n visible: false,\n message: \"\"\n },\n }\n\n setSelected = (selected: TBonus) => {\n this.setState({selected})\n }\n\n getPlacesByBonus = (): TPlace | undefined => {\n const {places} = this.props,\n {selected} = this.state;\n return lodash.find(places.items, p => p.id === selected.restaurant);\n }\n\n componentDidMount = async () => {\n const {security} = this.props,\n {response, error} = await get({route: `api/bonus`, token: security.token});\n if (!error && response.status === 200) {\n const bonus: TBonus[] = response.data;\n let selected: TBonus = defaultBonus;\n\n const activeBonuse = bonus.filter((b: TBonus) => b.cardNumber);\n if (activeBonuse.length > 0) selected = activeBonuse[0]\n\n this.setState({loading: false, bonus, selected});\n } else this.setState({\n loading: false,\n error: {\n visible: true,\n message: getError(response.data)\n }\n })\n }\n\n getACard = (place?: TPlace) => {\n const {security} = this.props;\n if (place) get({route: `api/log/clickBonusCard/${place.id}`, token: security.token});\n }\n\n render = () => {\n const {places, security} = this.props,\n {selected, loading, error, bonus} = this.state,\n activeBonuse = bonus.filter((b: TBonus) => b.cardNumber),\n place = this.getPlacesByBonus();\n\n if (isMobile) setConfiguration({gutterWidth: 4});\n return (\n \n {error.visible ? (\n \n ) : (\n
\n \n {activeBonuse.length === 0 || isMobile ? (\n <>\n ) : (\n
\n
\n
{place?.name}
\n
Карта № {selected.cardNumber}
\n
\n \n \n
\n
\n {selected.bonusSum}
\n бонусов\n
\n
На вашей карте
\n
\n \n \n
\n
{selected.bonusProcent}%
\n
Статус карты
\n
\n \n {/* \n
\n
{selected.bonusRemainder} р.
\n
\n До следующего уровня
\n осталось потратить\n
\n
\n */}\n
\n
\n
\n {place !== undefined && place.documentsLink !== null && (\n \n Ссылка на оферту бонусной программы\n \n )}\n
\n
\n
\n
Добавить бонусную карту в кошелёк
\n
\n
\n
\n
\n )}\n
\n )}\n
\n )\n }\n}\n\nconst mapState = (state: RootState) => ({\n places: state.places,\n security: state.securityService,\n})\nexport default connect(mapState)(BonusProgram);","import React, { FC, useEffect, useLayoutEffect, useState } from \"react\";\nimport { TBonuses, TOrder } from \"@entity/order\";\nimport DefaultLayout from \"@shared/layouts/default\";\nimport _ from \"lodash\";\nimport ReactPaginate from \"react-paginate\";\nimport moment from \"moment\";\nimport { TDefaultPageProps } from \"pages\";\nimport { Col, Row } from \"react-grid-system\";\nimport { isMobile } from \"react-device-detect\";\nimport { get } from \"@shared/network\";\nimport { getError } from \"@shared/interaction\";\nimport { RootState } from \"@store\";\nimport { connect } from \"react-redux\";\nimport Alert, { EnumAlertType } from \"@shared/components/alert\";\nimport { findById } from \"@shared/helpers\";\nimport { CaretLeft, CaretRight } from \"react-iconly\";\n\ntype TProps = {\n security: RootState[\"securityService\"],\n places: RootState[\"places\"][\"items\"]\n} & TDefaultPageProps\n\ntype TState = {\n loading: boolean,\n orders: TBonuses[],\n error: {\n visible: boolean,\n message: string\n },\n}\n\nconst WriteOffsOfBonuses: FC = ({\n security, places\n}) => {\n const [state, setState] = useState({\n loading: true,\n orders: [],\n error: {\n visible: false,\n message: \"\"\n },\n });\n const [page, setPage] = useState({\n amount: 0,\n pageNum: 10,\n index: 1\n })\n\n const getData = async (pageIndex: number) => {\n const { response, error } = await get({ route: `api/bonus/history/${pageIndex}`, token: security.token });\n if (!error && response.status === 200) {\n setState({ ...state, loading: false, orders: response.data.items });\n setPage({\n index: pageIndex,\n amount: response.data.amount,\n pageNum: response.data.pageNum,\n })\n } else {\n setState({\n ...state,\n loading: false,\n error: {\n visible: true,\n message: getError(response.data)\n }\n })\n }\n };\n\n useEffect(() => {\n if (security.token) getData(1);\n }, [security.token]);\n\n const { loading, orders, error } = state,\n span = isMobile ? 3 : 3;\n\n return (\n \n {error.visible ? (\n \n ) : (\n
\n
\n \n Дата\n Ресторан\n Движение бонусов\n Остаток бонусов\n {!isMobile && }\n \n
\n {orders.map((order: TBonuses, idx) => {\n let placesName: string = \"\", placeLink: string = \"\",\n key = findById(places, order.place);\n\n if (key !== -1) {\n placesName = places[key].name;\n }\n\n return (\n
\n \n \n {moment(order.date).format(\"DD.MM.YYYY\")}\n \n \n {placesName}\n \n {order.bonusAdd != 0 ? (\n +{order.bonusAdd}\n ) : (\n -{order.bonusWriteOff}\n )}\n \n {order.bonusAfter}\n \n\n \n
\n )\n })}\n
\n
\n
\n \n }\n initialPage={page.index - 1}\n onPageChange={page => {\n getData(page.selected + 1)\n }}\n pageRangeDisplayed={isMobile? 3: 5}\n marginPagesDisplayed={2}\n pageCount={Math.ceil(page.amount / page.pageNum)}\n previousLabel={\n \n } />\n
\n
\n )}\n
\n )\n}\n\nconst mapState = (state: RootState) => ({\n security: state.securityService,\n places: state.places.items,\n})\nexport default connect(mapState)(WriteOffsOfBonuses);","import React, { FC, useEffect, useState } from \"react\";\nimport { TCard } from \"@entity/order\";\nimport DefaultLayout from \"@shared/layouts/default\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport { TDefaultPageProps } from \"pages\";\nimport { Col, Row } from \"react-grid-system\";\nimport { isMobile } from \"react-device-detect\";\nimport { get } from \"@shared/network\";\nimport { getError } from \"@shared/interaction\";\nimport { RootState } from \"@store\";\nimport { connect } from \"react-redux\";\nimport Alert, { EnumAlertType } from \"@shared/components/alert\";\nimport { findById } from \"@shared/helpers\";\n\ntype TProps = {\n security: RootState[\"securityService\"],\n places: RootState[\"places\"][\"items\"]\n} & TDefaultPageProps\n\ntype TState = {\n loading: boolean,\n visibleKey: number,\n card: TCard[],\n error: {\n visible: boolean,\n message: string\n },\n}\n\nconst GiftСard: FC = ({\n security, places\n}) => {\n const [state, setState] = useState({\n loading: true,\n visibleKey: -1,\n card: [],\n error: {\n visible: false,\n message: \"\"\n },\n });\n const [page, setPage] = useState({\n amount: 0,\n pageNum: 10,\n index: 1\n })\n\n const [onlyElectric, setOnlyElectric] = useState(true)\n\n const getData = async (pageIndex: number) => {\n setState({\n loading: true,\n visibleKey: -1,\n card: [],\n error: {\n visible: false,\n message: \"\"\n },\n })\n const { response, error } = await get({ route: `api/bonus/deposits?onlyElectr=${onlyElectric}`, token: security.token });\n if (!error && response.status === 200) {\n setState({ ...state, loading: false, card: response.data });\n\n setPage({\n index: pageIndex,\n amount: response.data.amount,\n pageNum: response.data.pageNum,\n })\n } else setState({\n ...state,\n loading: false,\n error: {\n visible: true,\n message: getError(response.data)\n }\n })\n },\n setVisibleKey = (key: number) => setState({ ...state, visibleKey: key });\n\n useEffect(() => {\n getData(1);\n }, [onlyElectric]);\n\n const { loading, card, visibleKey, error } = state,\n span = isMobile ? 3.5 : 2;\n\n return (\n \n {error.visible ? (\n \n ) : (\n
\n \n
\n {!isMobile && (\n
\n
\n Электронные подарочные сертификаты\n
\n \n
\n )}\n \n Дата покупки\n {!isMobile && Ресторан}\n Номер карты\n Баланс\n {!isMobile &&\n <>\n Дата окончания действия\n Ссылка на электр. сертификат\n }\n \n {isMobile && (\n
\n \n
\n )}\n {card.length === 0 && (\n
\n У Вас нет электронных
подарочных сертификатов.\n
\n )}\n
\n {card.map((order: TCard, idx) => {\n const isVisible = visibleKey === idx,\n key = findById(places, order.restaurantId);\n\n let placesName: string = \"\", placeLink: string = \"\"\n if (key !== -1) {\n placesName = places[key].name;\n placeLink = places[key].link;\n }\n\n return (\n
\n setVisibleKey(isVisible ? -1 : idx)}>\n {/* \n {order.number}\n */}\n \n {moment(order.createdAt).format(\"DD.MM.YYYY\")}\n {isMobile && (\n {placesName}\n )}\n \n {!isMobile && {placesName}}\n {order.cardBarcode}\n \n {order.sum} р.\n \n {!isMobile && (\n <>\n \n {moment(order.createdAt).add(1, 'year').format(\"DD.MM.YYYY\")}\n \n \n Загрузить сертификат\n \n \n )}\n {isMobile && \n \n }\n \n {isVisible && isMobile && (\n
\n \n \n Загрузить сертификат\n
\n Дата окончания действия: {' ' + moment(order.createdAt).add(1, 'year').format(\"DD.MM.YYYY\")}\n
\n \n
\n
\n )}\n
\n )\n })}\n
\n
\n {/*
\n \n }\n initialPage={page.index - 1}\n onPageChange={page => {\n getData(page.selected + 1)\n }}\n pageRangeDisplayed={page.pageNum}\n pageCount={Math.ceil(page.amount / page.pageNum)}\n previousLabel={\n \n }/>\n
*/}\n
\n )}\n
\n )\n}\n\nconst mapState = (state: RootState) => ({\n security: state.securityService,\n places: state.places.items,\n})\nexport default connect(mapState)(GiftСard);","import {useParams} from \"@reach/router\";\nimport axios from \"axios\";\nimport {TDefaultPageProps} from \"pages\";\nimport React, {FC, useEffect, useState} from \"react\";\nimport {MetroSpinner} from \"react-spinners-kit\";\n\n\ntype Props = {\n link: string;\n} & TDefaultPageProps\n\nconst Link: FC = ({link}) => {\n const {data} = useParams()\n const [loading, setLoading] = useState(true)\n\n const onGetPlace = async (data: any) => {\n try {\n const {data: paylaod} = await axios.get(`api/card/${link}/${data}`);\n window.location.href = paylaod.link;\n } catch (error) {\n console.log(error)\n setLoading(false)\n }\n }\n\n useEffect(() => {\n if (data) onGetPlace(data)\n }, [data])\n\n return (\n <>\n {loading && (\n
\n \n
\n )}\n \n )\n\n}\n\nexport default Link","import React from \"react\";\nimport {Helmet} from \"react-helmet\";\nimport {connect} from \"react-redux\";\nimport {MetroSpinner} from \"react-spinners-kit\";\nimport {isMobile} from \"react-device-detect\";\nimport {RootState} from \"@store\";\nimport {TDefaultProps} from \".\";\n\ntype Props = {\n places: RootState[\"places\"],\n} & TDefaultProps\n\nconst AuthorizationLayout: React.FC = (props) => {\n if (isMobile) return \n return \n}\n\nconst Mobile: React.FC = ({title, children}) => (\n
\n \n {title}\n \n
\n
ЛК
\n
\n Ваш
\n личный кабинет\n
\n
\n
\n
\n {children}\n
\n
\n \n
\n)\n\nconst Desktop: React.FC = ({title, places, children}) => {\n return (\n
\n \n {title}\n \n \n \n
\n
\n Ваши
\n рестораны\n
\n
\n
\n
Ваш личный кабинет
\n
\n Пользовательское соглашение\n
\n Этот сайт защищен reCAPTCHA, и применяются the Google Privacy Policy и Terms of Service.\n
\n
\n
\n
\n
\n )\n}\n\nconst mapState = (state: RootState) => ({\n places: state.places,\n})\nexport default connect(mapState)(AuthorizationLayout);","import React from \"react\";\nimport Rodal from \"rodal\";\nimport {useFormik} from \"formik\";\nimport {useDispatch} from \"react-redux\";\nimport {Dispatch} from \"@store\";\nimport {EnumSenderSecurity} from \"@store/service/security\";\nimport {isMobile} from \"react-device-detect\";\nimport styled from \"styled-components\";\n\ntype TConfirmModal = {\n phone: string,\n visible: boolean,\n caption: string,\n sender: EnumSenderSecurity,\n onClose: () => void;\n onRepeat: () => void;\n}\n\nexport type TCodeModel = {\n phone: string,\n code: string\n}\n\nconst CodeInput = styled.input`\n text-align: center;\n height: 46px!important;\n font-size: 18px!important;\n font-weight: 700!important;\n margin: 15px 0 0 0;\n`\n\nconst ConfirmModal: React.FC = ({\n visible, caption, phone, sender, onClose, onRepeat\n}) => {\n const dispatch = useDispatch();\n const formik = useFormik({\n initialValues: {\n phone, \n code: \"\",\n } as TCodeModel,\n onSubmit: async (values: TCodeModel) => {\n formik.setSubmitting(true)\n if (! await dispatch.securityService.confirm(values)) formik.setSubmitting(false)\n },\n });\n return (\n \n {visible && (\n
\n {sender === EnumSenderSecurity.SMS?(\n
Сейчас вам поступит входящий звонок от робота, отвечать на него не нужно. Укажите последние 4 цифры в поле \"Код\".
\n ):
{caption}
}\n
\n {/*\n {\n if (value.length === 4) {\n formik.setFieldValue(\"code\", value);\n formik.submitForm();\n }\n }} />\n */}\n {\n const value = e.target.value;\n formik.setFieldValue(\"code\", value)\n if (value && value.length === 4) {\n formik.submitForm();\n }\n }}\n />\n
\n {sender === EnumSenderSecurity.SMS? (\n
\n Если у вас возникли сложности с авторизация по звонку, вы можете воспользоваться авторизация по SMS\" - \n
\n ): undefined}\n
\n )}\n
\n )\n}\n\nexport default ConfirmModal;","import create from \"zustand\"\n\ninterface RegistrationStore {\n phone: string\n setPhone: (val: string) => void\n}\n\nexport const useRegistration = create(set => ({\n phone: \"\",\n setPhone: phone => set({phone})\n}))","import React from \"react\"\nimport * as Yup from \"yup\";\nimport { useFormik } from \"formik\";\nimport AuthorizationLayout from \"@shared/layouts/authorization\";\nimport { TDefaultPageProps } from \"..\";\nimport { Col, Row } from \"react-grid-system\";\nimport { isMobile } from \"react-device-detect\";\nimport { Link, useNavigate } from \"@reach/router\";\nimport { Dispatch } from \"@store\";\nimport { connect } from \"react-redux\";\nimport { TLoginPayload, TLoginPayloadV2 } from \"@store/service/security\";\nimport { CheckboxInput, PasswordInput, PhoneInput } from \"@shared/components/formInput\";\nimport { routes } from \"AppRouter\";\nimport { useGoogleReCaptcha } from \"react-google-recaptcha-v3\";\nimport ConfirmModal from \"./_confirmModal\";\nimport { useRegistration } from \"@storeZusland/useRegistration\";\n\ntype Props = {\n fnLoginV2?: DispatchProps[\"fnLoginV2\"]\n} & TDefaultPageProps\n\nconst initialValues: TLoginPayloadV2 = {\n phone: \"\",\n agreement: false,\n},\n validationSchema = Yup.object().shape({\n phone: Yup.string().required(\"Поле обязательно для заполнения\"),\n }),\n getErrorByField = (formik: any, field: string) => {\n return formik.errors[field] && formik.touched[field] ? formik.errors[field] : undefined\n }\n\nconst LoginV2: React.FC = ({\n fnLoginV2\n}) => {\n const { executeRecaptcha } = useGoogleReCaptcha();\n const navigate = useNavigate();\n const setPhone = useRegistration(state => state.setPhone)\n\n const [confirmModal, setConfirmModal] = React.useState<{\n message: string,\n visible: boolean\n }>({\n message: \"\",\n visible: false\n })\n\n const formik = useFormik({\n initialValues,\n validationSchema,\n onSubmit: async (values: TLoginPayloadV2) => {\n if (executeRecaptcha && fnLoginV2) {\n const reCAPTCHA = await executeRecaptcha(\"ForgotPassword\");\n\n formik.setSubmitting(true)\n const data = await fnLoginV2({ ...values, reCAPTCHA });\n if (data.message) {\n setConfirmModal({\n message: data.message,\n visible: true\n })\n } else if (data.error && data.needToRegister) {\n setPhone(values.phone)\n navigate(\"/registration\")\n }\n formik.setSubmitting(false)\n }\n },\n });\n\n const repeat = () => {\n\n }\n return (\n \n <>\n
Авторизация
\n
\n \n \n
Введите номер телефона
\n \n
\n formik.setFieldValue(\"phone\", value, false)}\n disabled={formik.isSubmitting}\n name=\"tel\"\n error={getErrorByField(formik, \"phone\")} />\n \n Согласен с обработкой персональных данных\n \n )}\n checked={formik.values.agreement}\n disabled={formik.isSubmitting}\n onChange={(value: boolean) => formik.setFieldValue(\"agreement\", value, false)} />\n
\n formik.submitForm()}\n type=\"submit\">\n Войти\n \n {/* \n \n Войти по паролю\n \n */}\n
\n
\n {confirmModal.visible && (\n {\n setConfirmModal({\n message: \"\",\n visible: false\n });\n }}\n onRepeat={repeat} />\n )}\n \n
\n )\n}\n\nconst mapDispatch = (d: any) => {\n const dispatch = d as Dispatch;\n return {\n fnLogin: dispatch.securityService.login,\n fnLoginV2: dispatch.securityService.loginV2,\n }\n}\ntype DispatchProps = ReturnType\nexport default connect(null, mapDispatch)(LoginV2);","import React, {useEffect} from \"react\";\nimport {Router} from \"@reach/router\"\nimport {connect} from \"react-redux\";\nimport {MetroSpinner} from \"react-spinners-kit\";\nimport {RootState} from \"@store\";\n\nimport Login from \"pages/security/Login\";\nimport Registration from \"pages/security/Registration\";\nimport ForgotPassword from \"pages/security/ForgotPassword\";\nimport CurrentOrder from \"pages/currentOrder\";\nimport Profile from \"pages/profile\";\nimport HistoryOrder from \"pages/historyOrder\";\nimport BonusProgram from \"pages/bonusProgram\";\nimport WriteOffsOfBonuses from \"pages/writeOffsOfBonuses\";\nimport GiftСard from \"pages/gift\";\nimport Link from \"pages/link\";\nimport LoginV2 from \"pages/security/LoginV2\";\n\nexport const routes = {\n // loginPass: \"/login/password\",\n login: \"/login\",\n // registration: \"/registration\",\n // forgotPassword: \"/forgot-password\",\n currentOrder: \"/\",\n historyOrder: \"/history\",\n writeOffsOfBonuses: \"/write-offs-of-bonuses\",\n profile: \"/profile\",\n bonusProgram: \"/bonus-program\",\n giftСard: '/gift-card',\n link: '/link/:data',\n vlink: '/vlink/:data'\n}\n\ntype TProps = {\n security: RootState[\"securityService\"]\n}\n\nconst AppRouter: React.FC = ({\n security\n}) => {\n useEffect(() => {\n try {\n navigator.serviceWorker.getRegistration('/app').then(reg => {\n reg?.unregister();\n return caches.delete('user-cache');\n }).then(() => {\n console.log('Кеш очищен, Service Worker удалён. Эффективно!');\n });\n \n } catch (error) {\n \n }\n }, [])\n \n if (!security.isReady) return (\n
\n \n
\n )\n if (!security.isAuthorized) return (\n \n \n \n \n {/* */}\n {/* */}\n {/* */}\n {/* */}\n \n )\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\nconst mapState = (state: RootState) => ({\n security: state.securityService,\n})\nexport default connect(mapState)(AppRouter);","import * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport registerServiceWorker from \"./registerServiceWorker\";\nimport { Provider } from \"react-redux\";\nimport { Demodal } from \"demodal\";\nimport { store } from \"@store\";\n\nimport { GoogleReCaptchaProvider } from \"react-google-recaptcha-v3\";\n\nimport { IntlProvider } from \"rsuite\";\nimport ruRU from \"rsuite/lib/IntlProvider/locales/ru_RU\";\nimport format from \"date-fns/format\";\nimport ru from \"date-fns/locale/ru\";\n\nimport AppRouter from \"./AppRouter\";\nimport \"./styles/index.scss\"\nimport { CsrfTokenContext } from \"@shopify/react-csrf\";\n\n\nfunction formatDate(data: any, formatStr: any) {\n return format(data, formatStr, { locale: ru });\n}\n\nReactDOM.render(\n \n \n \n \n \n \n \n ,\n document.getElementById(\"root\"));\n\n// registerServiceWorker();\n"],"sourceRoot":""}