PageSourceSearch

https://isku-ramen.ru/_nuxt/ks7ciBS2.js

js isku-ramen.ru collected 2026-09-25 03:32:58 UTC 4,605 bytes, 1 lines download raw bytes

1import{_ as H}from"./CKIyRLok.js";import{d as P,p as F,s as N,O as R,A as q,l as b,ab as J,al as C,ad as y,o as j,c as B,a as t,b as l,ai as K,u as a,i as v,j as f,k as z,e as G,I as L,J as Q,a1 as W,ac as g,av as X,ay as Z,aF as ee,f as ae,m as se,K as oe}from"./CvSJSCRR.js";import{_ as te}from"./C6p0MPew.js";const le={class:"profile"},ne={class:"container _narrow"},re={class:"profile__info"},ie={class:"row"},ue={class:"profile__info-col col col-6 col-sm-12"},_e={class:"profile__info-col col col-6 col-sm-12"},ce={class:"profile__info-col col col-6 col-sm-12"},de={class:"profile__info-col col col-6 col-sm-12"},me={class:"profile__info-col col col-6 col-sm-12"},pe={class:"profile__subs"},ve={class:"profile__cta"},fe=P({__name:"Edit",setup(V){const Y=F(),{app_settings:$}=N(Y),x=F(),{user:o}=N(x),k=R(),T=q(),u=b(o.value.sms_is_active),_=b(o.value.email_is_active),c=b(o.value.push_is_active),{errors:r,setErrors:ye,setFieldValue:h,validate:U}=J({initialValues:{name:o.value.name||"",phone:o.value.username||"",email:o.value.email||"",birthday:o.value.birthday?C(o.value.birthday).format("DD/MM/YYYY"):""}}),{value:O,meta:ge}=y("name",s=>g(s)?g(s).length>=2?!0:"Введите имя":!0),{value:S,meta:Ye}=y("phone",s=>{if(!g(s))return!0;const{valid:e,phone_error_text:i}=X(s);return e||i}),{value:w,meta:xe}=y("email",s=>$.value.registration_email_is_mandatory&&s===""?(r.value.email="Почта обязательна","Почта обязательна"):Z(s)?!0:"Проверьте адрес электронной почты"),M=new Date;M.setFullYear(M.getFullYear());const{value:d,meta:ke}=y("birthday",s=>g(s)?ee(s,M)?!0:"Неверная дата рождения":!0),A=G(()=>Object.keys(r.value).length!==0),D=b(!1),I=async()=>{const{valid:s,errors:e}=await U();if(!s)return;D.value=!0;const i={name:O.value,email:w.value,phone:S.value,birth:d.value?C(d.value,"DD/MM/YYYY").format("YYYY-MM-DD"):"",can_send_sms:u.value,can_send_email:_.value,can_send_push:c.value};await L("profile/set-user-data",{method:"POST",headers:Q(),body:i}).catch(p=>W(p,"Ошибка, проверьте заполненные поля"))&&(k.success("Профиль обновлен"),x.updateUser({...i,birthday:d.value?C(d.value,"DD/MM/YYYY").toDate():null,email_is_active:_.value,sms_is_active:u.value,push_is_active:c.value}),T.push("/profile")),D.value=!1};return(s,e)=>{const i=H,m=K,p=te,E=z;return j(),B("div",le,[t("div",ne,[l(i,{class:"profile__nav"}),t("div",re,[t("div",ie,[t("div",ue,[l(m,{name:"name",label:"Имя",placeholder:"",value:a(O),error:a(r).name,onOnChange:e[0]||(e[0]=n=>a(h)("name",n))},null,8,["value","error"])]),t("div",_e,[l(m,{name:"phone",label:"Номер телефона",placeholder:"+7",mask:"+7 (###) ###-##-##",disabled:!0,clearable:!1,value:a(S),error:a(r).phone,onOnChange:e[1]||(e[1]=n=>a(h)("phone",n))},null,8,["value","error"])]),t("div",ce,[l(m,{name:"email",label:"Электронная почта",placeholder:"",value:a(w),error:a(r).email,onOnChange:e[2]||(e[2]=n=>a(h)("email",n))},null,8,["value","error"])]),t("div",de,[l(m,{name:"birthday",label:"Дата рождения",placeholder:"ДД/ММ/ГГГГ",mask:"##/##/####",inputmode:"numeric",value:a(d),error:a(r).birthday,disabled:!!a(o).birthday,clearable:!a(o).birthday,onOnChange:e[3]||(e[3]=n=>a(h)("birthday",n))},null,8,["value","error","disabled","clearable"])]),t("div",me,[e[10]||(e[10]=t("span",{class:"text-s c-gray"},"Получение рекламных рассылок",-1)),t("div",pe,[l(p,{class:"profile__sub",type:"radio",checked:a(u),onChange:e[4]||(e[4]=n=>u.value=!a(u))},{default:v(()=>[...e[7]||(e[7]=[f("SMS",-1)])]),_:1},8,["checked"]),l(p,{class:"profile__sub",type:"radio",checked:a(_),onChange:e[5]||(e[5]=n=>_.value=!a(_))},{default:v(()=>[...e[8]||(e[8]=[f("e-mail",-1)])]),_:1},8,["checked"]),l(p,{class:"profile__sub",type:"radio",checked:a(c),onChange:e[6]||(e[6]=n=>c.value=!a(c))},{default:v(()=>[...e[9]||(e[9]=[f("Пуш-уведомления",-1)])]),_:1},8,["checked"])])])])]),t("div",ve,[l(E,{loading:a(D),disabled:a(A),onClick:I},{default:v(()=>[...e[11]||(e[11]=[f(" Сохранить изменения ",-1)])]),_:1},8,["loading","disabled"]),l(E,{theme:"secondary",to:"/profile"},{default:v(()=>[...e[12]||(e[12]=[f(" Отменить ",-1)])]),_:1})])])])}}}),he=ae(fe,[["__scopeId","data-v-6be67e43"]]),be={class:"page__content"},$e=P({__name:"edit",setup(V){const{$env:Y,$log:$}=se();return oe({title:`Редактировать профиль - ${Y.projectName}`}),(x,o)=>{const k=he;return j(),B("main",be,[l(k)])}}});
1export{$e as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.