PageSourceSearch

https://garlyn.ru/build/assets/Index-fe073c12.js

js garlyn.ru collected 2026-10-01 14:09:23 UTC 5,301 bytes, 1 lines download raw bytes

1import{d as v,T as g,o as y,e as h,w as a,f,g as o,i as n,q as x,u as r,A as C,x as w,y as k,l as S,F as I,Z as $}from"./vue.m-7107e1b8.js";import{D as A}from"./DefaultLayout-1198d6a7.js";import{B as _}from"./Button-ee7a411a.js";/* empty css                                                              */import{M as V}from"./Modal-d517b36f.js";import{P as F}from"./Pagination-c359291a.js";import{I as b}from"./Input-01ac050e.js";import{S as T}from"./Select-22a4539f.js";import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";import{T as U}from"./Table-93ab3bd0.js";import{_ as E}from"./CountItemList-b9f3a33a.js";/* empty css                                                               */import"./helpers-a006d6a8.js";/* empty css                                                               *//* empty css                                                              */const M={class:"mb-3"},D=n("label",{for:"formFile",class:"form-label"},"Загрузите Exel файл с сервисными центрами",-1),L={__name:"Import",setup(l){const u=v(null),t=v(!1),m=g({file:""});function e(){m.processing||(t.value=!0,m.post(route("admin.service_center.import"),{preserveScroll:!0,onSuccess:c=>{console.log("success",c)},onError:c=>{console.log("error",c)},onFinish:()=>{t.value=!1,u.value.close(),window.scrollTo({top:0,behavior:"smooth"}),console.log("form",this.form)}}))}return(c,p)=>(y(),h(_,{onClick:p[1]||(p[1]=i=>u.value.open())},{default:a(()=>[f("Импортировать "),o(V,{ref_key:"modalComponent",ref:u,centered:!0},{body:a(()=>[n("form",{onSubmit:x(e,["prevent"]),id:"form"},[n("div",M,[D,n("input",{type:"file",class:"form-control",onInput:p[0]||(p[0]=i=>r(m).file=i.target.files),multiple:"","aria-describedby":"inputGroupFileAddon03","aria-label":"Upload"},null,32)])],32)]),footer:a(()=>[o(_,{type:"submit",form:"form",disabled:t.value},{default:a(()=>[f("Загрузить")]),_:1},8,["disabled"])]),_:1},512)]),_:1}))}};const N=l=>(w("data-v-c7e84e27"),l=l(),k(),l),P={id:"form"},j={class:"mb-3"},q=N(()=>n("div",{style:{display:"flex","justify-content":"center","margin-bottom":"10px"}},[n("h4",null," Виды ремона")],-1)),G={__name:"Add",props:["categories"],setup(l){const u=l,t=v(null),m=v(!1),e=g({name:"",phones:"",city:"",address:"",allowedCategories:""});function c(){e.processing||(m.value=!0,e.post(route("admin.service_center.store"),{preserveScroll:!0,onSuccess:i=>{console.log("success",i)},onError:i=>{console.log("error",i)},onFinish:()=>{m.value=!1,t.value.close(),window.scrollTo({top:0,behavior:"smooth"}),console.log("form",this.form)}}))}const p=C(()=>u.categories.map(i=>({value:i.id,label:i.name})));return(i,s)=>(y(),h(_,{onClick:s[5]||(s[5]=d=>t.value.open())},{default:a(()=>[f("Добавить СЦ "),o(V,{ref_key:"modalComponent",ref:t},{body:a(()=>[n("form",P,[n("div",j,[o(b,{label:"Название Сервисного центра",type:"text",disabled:!1,placeholder:'ООО "Умная техника"',modelValue:r(e).name,"onUpdate:modelValue":s[0]||(s[0]=d=>r(e).name=d)},null,8,["modelValue"]),o(b,{label:"Телефон",type:"text",disabled:!1,placeholder:"+ 7 (499) 720-30-40, +7 (812) 350-05-03",modelValue:r(e).phones,"onUpdate:modelValue":s[1]||(s[1]=d=>r(e).phones=d)},null,8,["modelValue"]),o(b,{label:"Город",type:"text",disabled:!1,placeholder:"Санкт-Петербург",modelValue:r(e).city,"onUpdate:modelValue":s[2]||(s[2]=d=>r(e).city=d)},null,8,["modelValue"]),o(b,{label:"Адрес",type:"text",disabled:!1,placeholder:"ул. Новорощинская д.4",modelValue:r(e).address,"onUpdate:modelValue":s[3]||(s[3]=d=>r(e).address=d)},null,8,["modelValue"]),q,o(T,{options:p.value,label:"Разрешенные категории",modelValue:r(e).allowedCategories,"onUpdate:modelValue":s[4]||(s[4]=d=>r(e).allowedCategories=d),enableSearch:!0,enableMultiple:!0},null,8,["options","modelValue"])])])]),footer:a(()=>[o(_,{type:"submit",form:"form",disabled:m.value,onClick:c},{default:a(()=>[f("Добавить")]),_:1},8,["disabled"])]),_:1},512)]),_:1}))}},O=B(G,[["__scopeId","data-v-c7e84e27"]]),Z={class:"g-card"},z={class:"g-card-header"},ne={__name:"Index",props:["serviceCenters","categories"],setup(l){function u(){confirm("Удалить все СЦ?")&&g({}).delete(route("admin.service_center.deleteAll"),{onSuccess:t=>{console.log("success",t)},onError:t=>{console.log("error",t)},onFinish:()=>{window.scrollTo({top:0,behavior:"smooth"})}})}return(t,m)=>(y(),S(I,null,[o(r($),{title:"Сервисные центры"}),o(A,null,{title:a(()=>[f("Сервисные центры")]),actions:a(()=>[n("div",null,[o(L,{class:"btn-outline-secondary me-2"}),o(O,{class:"btn-outline-secondary me-2",categories:l.categories},null,8,["categories"]),o(_,{onClick:u,class:"btn-outline-secondary me-2"},{default:a(()=>[f(" Удалить все СЦ")]),_:1})])]),body:a(()=>[n("div",Z,[n("div",z,[o(E,{count:l.serviceCenters.meta.total},null,8,["count"])]),o(U,{items:l.serviceCenters.data.map(function(e){return{ID:e.id,ГОРОД:e.address.region_name,НАИМЕНОВАНИЕ:e.name,АДРЕС:e.address.address,url:e.url}})},null,8,["items"]),o(F,{links:l.serviceCenters.links,meta:l.serviceCenters.meta},null,8,["links","meta"])])]),_:1})],64))}};export{ne 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.