Создание заказа, карта, поиск, починка аватара

This commit is contained in:
Халимов Рустам
2026-03-06 13:51:08 +03:00
parent 663ec55887
commit 2ad8456505
423 changed files with 35422 additions and 4644 deletions
@@ -1 +0,0 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[859],{5104:(e,s,r)=>{Promise.resolve().then(r.t.bind(r,8173,23)),Promise.resolve().then(r.bind(r,3242))},3242:(e,s,r)=>{"use strict";r.d(s,{LoginForm:()=>p});var t=r(5155);r(2115);var l=r(9606),n=r(2679),a=r(534),o=r(4505),c=r(6046),i=r(3312),d=r(3900),h=r(4870),u=r(9749),m=r(2928);let x=a.Ikc({phone:a.YjP().min(10,"Номер телефона должен содержать минимум 10 цифр"),password:a.YjP().min(6,"Пароль должен быть не менее 6 символов")});function p(){let e=(0,c.useRouter)(),{login:s,isLoading:r}=(0,m.B)(),a=(0,l.mN)({resolver:(0,n.u)(x),defaultValues:{phone:"",password:""}});async function p(r){try{let t=r.phone.replace(/\D/g,""),l=t.startsWith("7")?"+".concat(t):"+7".concat(t);await s(l,r.password),e.push("/dashboard/profile")}catch(e){console.error(e),a.setError("root",{message:"Неверный номер телефона или пароль"})}}return(0,t.jsxs)(u.Zp,{className:"w-full max-w-md mx-auto",children:[(0,t.jsxs)(u.aR,{children:[(0,t.jsx)(u.ZB,{className:"text-2xl",children:"Вход в систему"}),(0,t.jsx)(u.BT,{children:"Введите ваш номер телефона и пароль для доступа к профилю."})]}),(0,t.jsx)(u.Wu,{children:(0,t.jsx)(h.lV,{...a,children:(0,t.jsxs)("form",{onSubmit:a.handleSubmit(p),className:"space-y-4",children:[(0,t.jsx)(h.zB,{control:a.control,name:"phone",render:e=>{let{field:s}=e;return(0,t.jsxs)(h.eI,{children:[(0,t.jsx)(h.lR,{children:"Телефон"}),(0,t.jsx)(h.MJ,{children:(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,t.jsx)("div",{className:"flex h-10 items-center justify-center rounded-md border border-input bg-muted px-3 text-sm",children:"+7"}),(0,t.jsx)(d.p,{placeholder:"(999) 000-00-00",value:s.value||"",onChange:e=>{let r=e.target.value.replace(/\D/g,"");e.target.value.length>(s.value||"").length&&(e.target.value.startsWith("8")||e.target.value.startsWith("7"))&&0===(s.value||"").length&&(r=r.substring(1));let t="";(r=r.substring(0,10)).length>0&&(t+="("+r.substring(0,3)),r.length>=4&&(t+=") "+r.substring(3,6)),r.length>=7&&(t+="-"+r.substring(6,8)),r.length>=9&&(t+="-"+r.substring(8,10)),s.onChange(t)},className:"rounded-l-none"})]})}),(0,t.jsx)(h.C5,{})]})}}),(0,t.jsx)(h.zB,{control:a.control,name:"password",render:e=>{let{field:s}=e;return(0,t.jsxs)(h.eI,{children:[(0,t.jsx)(h.lR,{children:"Пароль"}),(0,t.jsx)(h.MJ,{children:(0,t.jsx)(d.p,{type:"password",placeholder:"******",...s})}),(0,t.jsx)(h.C5,{})]})}}),a.formState.errors.root&&(0,t.jsx)("p",{className:"text-sm font-medium text-destructive",children:a.formState.errors.root.message}),(0,t.jsxs)(i.$,{type:"submit",className:"w-full bg-blue-600 hover:bg-blue-700",disabled:r,children:[r&&(0,t.jsx)(o.A,{className:"mr-2 h-4 w-4 animate-spin"}),"Войти"]})]})})})]})}}},e=>{var s=s=>e(e.s=s);e.O(0,[92,273,173,70,441,517,358],()=>s(5104)),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long