PageSourceSearch

https://planeta-avtodv.ru/_next/static/chunks/pages/settings/companies-d6d7f874c066d46a.js

js planeta-avtodv.ru collected 2026-10-08 10:01:06 UTC 7,756 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6619],{3772:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/companies",function(){return r(5516)}])},4604:function(e,s,r){"use strict";r.d(s,{Z:function(){return d}});var n=r(4335);let i="/groups",a="/users",t="/items",l="/orders",o="/carts",c="/companies";var d={groups:{index:e=>(0,n.R1)(`${i}`,e),show:(e,s,r)=>(s={...s,id:void 0},(0,n.R1)(`${i}/${e}`,s,r))},users:{index:e=>(0,n.R1)(`${a}`,e),create:e=>(0,n.sg)(`${a}`,e),show:e=>(0,n.R1)(`${a}/${e}`),init:e=>(0,n.sg)("/init"),profile:()=>(0,n.R1)(`${a}/profile`),signIn:e=>(0,n.sg)("/sign_in",e),update:(e,s)=>(0,n.nc)(`${a}/${e}`,s),change_password:e=>(0,n.nc)(`${a}/change_password`,e),remember_password:e=>(0,n.sg)(`${a}/remember_password`,e)},items:{show:e=>(0,n.R1)(`${t}/${e}`),rand:()=>(0,n.R1)(`${t}/rand`),set_favorite:e=>(0,n.sg)(`${t}/${e}/set_favorite`)},orders:{sync:e=>(0,n.sg)(`${l}/sync`,e),init:()=>(0,n.R1)(`${l}/init`),checkOut:e=>(0,n.sg)(`${l}/checkout`,e),index:e=>(0,n.R1)(`${l}`,{page:e}),show:e=>(0,n.R1)(`${l}/${e}`)},search:{index:e=>(0,n.R1)("/search",e)},carts:{index:()=>(0,n.R1)(`${o}`),show:e=>(0,n.R1)(`${o}/${e}`),quote:(e,s)=>(0,n.sg)(`${o}/${e}/quote`,{excludedItemIds:s}),add_item:e=>(0,n.sg)(`${o}/add_item`,e),create_cart:e=>(0,n.sg)(`${o}`,e),move_item:e=>(0,n.sg)([o,"move_item"].join("/"),e),deleteItem:e=>(0,n.sg)([o,"delete_item"].join("/"),e),checkout:e=>(0,n.sg)([o,"checkout"].join("/"),e)},companies:{index:()=>(0,n.R1)(`${c}`),create:e=>(0,n.sg)(c,e),update:(e,s)=>(0,n.nc)([c,e].join("/"),s)}}},6150:function(e,s,r){"use strict";var n=r(5893);r(7294),s.Z=e=>(e.error&&["Input"].push("Input--error"),(0,n.jsx)("input",{...e,className:"bg-gray-50 border border-gray-300 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5"}))},448:function(e,s,r){"use strict";var n=r(5893);r(7294),s.Z=e=>(0,n.jsxs)("div",{className:"Form_Line",children:[(0,n.jsx)("div",{className:"Form_Line_label",children:e.label}),(0,n.jsx)("div",{className:"Form_Line_children",children:e.children})]})},8132:function(e,s,r){"use strict";var n=r(5893);r(7294);var i=r(1664),a=r.n(i);s.Z=e=>(0,n.jsxs)("div",{className:"mt-5",children:[(0,n.jsx)("div",{className:"bg-[#f5f5f5] text-center text-xs font-semibold uppercase text-[#666]",children:"ОБЩИЕ"}),(0,n.jsx)(a(),{href:"/orders",className:"block border-l-[3px] border-transparent px-[15px] py-[10px] text-[13px] font-semibold text-[#333] no-underline hover:border-[#111] hover:bg-[#f0f0f0]",children:"Заказы"}),(0,n.jsx)(a(),{href:"/accounting",className:"block border-l-[3px] border-transparent px-[15px] py-[10px] text-[13px] font-semibold text-[#333] no-underline hover:border-[#111] hover:bg-[#f0f0f0]",children:"Взаиморасчеты"}),(0,n.jsx)("div",{className:"bg-[#f5f5f5] text-center text-xs font-semibold uppercase text-[#666]",children:"Настройки"}),(0,n.jsx)(a(),{href:"/settings/companies",className:"block border-l-[3px] border-transparent px-[15px] py-[10px] text-[13px] font-semibold text-[#333] no-underline hover:border-[#111] hover:bg-[#f0f0f0]",children:"Организация"}),(0,n.jsx)(a(),{href:"/settings/password",className:"block border-l-[3px] border-transparent px-[15px] py-[10px] text-[13px] font-semibold text-[#333] no-underline hover:border-[#111] hover:bg-[#f0f0f0]",children:"Смена пароля"})]})},9814:function(e,s,r){"use strict";var n=r(5893),i=r(7294),a=r(8132),t=r(4981),l=r(1594);s.Z=({children:e})=>{let[s,r]=i.useState(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"MobileMenuBar",children:(0,n.jsxs)("button",{type:"button",className:"MobileMenuButton",onClick:()=>r(!0),children:[(0,n.jsx)(t.Z,{"aria-hidden":"true"}),(0,n.jsx)("span",{children:"Разделы"})]})}),(0,n.jsxs)("div",{className:`MobileMenuDrawer ${s?"MobileMenuDrawer--open":""}`,"aria-hidden":!s,children:[(0,n.jsx)("button",{type:"button",className:"MobileMenuDrawer-backdrop",onClick:()=>r(!1),"aria-label":"Закрыть меню"}),(0,n.jsxs)("div",{className:"MobileMenuDrawer-panel",children:[(0,n.jsxs)("div",{className:"MobileMenuDrawer-header",children:[(0,n.jsx)("span",{children:"Разделы"}),(0,n.jsx)("button",{type:"button",className:"MobileMenuDrawer-close",onClick:()=>r(!1),"aria-label":"Закрыть меню",children:(0,n.jsx)(l.Z,{"aria-hidden":"true"})})]}),(0,n.jsx)("div",{onClick:()=>r(!1),children:(0,n.jsx)(a.Z,{})})]})]}),(0,n.jsxs)("div",{className:"App-wrapper",children:[(0,n.jsx)("div",{className:"App-spacer"}),(0,n.jsx)("div",{className:"App-menu App-column--sticky",children:(0,n.jsx)(a.Z,{})}),(0,n.jsx)("div",{className:"App-content",children:e}),(0,n.jsx)("div",{className:"App-sidebar"})]})]})}},5516:function(e,s,r){"use strict";r.r(s),r.d(s,{default:function(){return x}});var n=r(5893),i=r(7294),a=r(512),t=r(6150),l=r(6310),o=r(448),c=r(1163),d=r(4604),u=({company:e,setCompany:s})=>{let[r,u]=i.useState(void 0),p=(null==e?void 0:e.id)?e:{name:"",inn:"",city:"",tel:""},x=(0,c.useRouter)(),m=l.Ry().shape({name:l.Z_().required("Необходимо ввести название организации"),inn:l.Z_().required("Необходимо ввести ИНН организации"),city:l.Z_().required("Необходимо ввести город организации"),tel:l.Z_().required("Необходимо ввести телефон организации")});return(0,n.jsxs)("div",{children:[x.query&&x.query.should_update&&(0,n.jsx)("p",{children:"Вы перешли по ссылки востановления пароля. Введите новый пароль."}),(0,n.jsx)(a.J9,{initialValues:p,validationSchema:m,onSubmit:async(r,n)=>{if(u(void 0),null==e?void 0:e.id){let i=await d.Z.companies.update(e.id,{company:r});i.success?(u({message:i.message}),s(i.company)):n.setErrors(i.errors)}else{let e=await d.Z.companies.create({company:r});e.success?(u({message:e.message}),s(e.company)):n.setErrors(e.errors)}n.setSubmitting(!1)},render:({values:e,errors:s,touched:i,handleChange:l,handleBlur:c})=>(0,n.jsxs)(a.l0,{children:[r&&(0,n.jsx)(o.Z,{children:(0,n.jsx)("div",{children:r.message})}),(0,n.jsxs)(o.Z,{label:"Наименование организации",children:[(0,n.jsx)(t.Z,{type:"input",name:"name",placeholder:"Наименование организации",onChange:e=>{l(e)},onBlur:e=>{c(e)},value:e.name}),s.name&&i.name&&(0,n.jsxs)("div",{className:"Form_Error",children:[" ",s.name]})]}),(0,n.jsxs)(o.Z,{label:"ИНН",children:[(0,n.jsx)(t.Z,{type:"input",name:"inn",placeholder:"ИНН",onChange:e=>{l(e)},onBlur:e=>{c(e)},value:e.inn}),s.inn&&i.inn&&(0,n.jsxs)("div",{className:"Form_Error",children:[" ",s.inn]})]}),(0,n.jsxs)(o.Z,{label:"Город",children:[(0,n.jsx)(t.Z,{type:"input",name:"city",placeholder:"Город",onChange:e=>{l(e)},onBlur:e=>{c(e)},value:e.city}),s.city&&i.city&&(0,n.jsxs)("div",{className:"Form_Error",children:[" ",s.city]})]}),(0,n.jsxs)(o.Z,{label:"Телефон",children:[(0,n.jsx)(t.Z,{type:"input",name:"tel",placeholder:"Телефон",onChange:e=>{l(e)},onBlur:e=>{c(e)},value:e.tel}),s.tel&&i.tel&&(0,n.jsxs)("div",{className:"Form_Error",children:[" ",s.tel]})]}),(0,n.jsx)(o.Z,{children:(0,n.jsx)("button",{className:"Button",type:"submit",children:"Сохранить"})})]})})]})},p=r(9814),x=()=>{let[e,s]=i.useState(void 0);return i.useEffect(()=>{(async()=>{let e=await d.Z.companies.index();e.company&&s(e.company)})()},[]),(0,n.jsx)(p.Z,{children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{children:"Организации"}),e&&(0,n.jsx)(u,{company:e,setCompany:s})]})})}}},function(e){e.O(0,[6310,512,2888,9774,179],function(){return e(e.s=3772)}),_N_E=e.O()}]);

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.