PageSourceSearch

https://1rnb.ru/assets/Price.7b87d6fe.js

js 1rnb.ru collected 2026-10-07 02:59:01 UTC 4,916 bytes, 1 lines download raw bytes

1import{D as h,r as x,q as y,a as i,b as t,f as A,g as P,u as $,p as n,A as u,B as p,F as k,k as S,h as w,o as c,R as z,t as d}from"./index.2bc0a61b.js";const D={class:"container mx-auto"},V={key:0,class:""},N={class:"text-3xl"},j={class:"grid md:grid-cols-2 lg:grid-cols-4 gap-[20px] mt-[40px]"},q={class:"flex flex-col",for:""},C={class:"flex flex-col",for:""},T={class:"flex flex-col",for:""},B={class:"flex flex-col",for:""},I={class:"flex mt-[20px]"},U={class:"flex flex-col gap-[10px]"},Z=["for"],E={class:"flex gap-[20px]"},G=["id","data-id","name"],M={class:"flex items-center gap-[20px]"},R={class:"text-$a-95"},F={class:"text-$a-92"},L={class:"text-$dt"},J={class:"text-$gas"},K={__name:"Price",setup(O){const m=h(),l=x([]),b=x(!1),a=x({a95:0,a92:0,dt:0,gas:0});y(()=>{window.sessionStorage.jwt?b.value=!0:m.push({path:"/admin"}),fetch("https://admin.1rnb.ru/api/azses?sort[0]=Position:asc&pagination[pageSize]=50").then(o=>o.json()).then(({data:o})=>{l.value=o,a.value.a95=l.value[0].attributes.Price_A95,a.value.a92=l.value[0].attributes.Price_A92,a.value.dt=l.value[0].attributes.Price_DT,a.value.gas=l.value[0].attributes.Price_Gas})});const f=o=>{console.log(o);const e=`https://admin.1rnb.ru/api/azses/${o}`,s={method:"PUT",headers:{"Content-type":"application/json",Authorization:`Bearer ${window.sessionStorage.jwt}`},body:JSON.stringify({data:{Price_A95:a.value.a95,Price_A92:a.value.a92,Price_DT:a.value.dt,Price_Gas:a.value.gas}})};fetch(e,s).then(r=>r.json()).then(()=>{fetch("https://admin.1rnb.ru/api/azses?sort[0]=Position:asc").then(r=>r.json()).then(({data:r})=>{l.value=r})}).catch(r=>console.log(r))},_=()=>{confirm("\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435 \u043F\u043E\u043C\u0435\u043D\u044F\u0442\u044C \u0446\u0435\u043D\u044B?")&&document.querySelectorAll(".azs:checked").forEach(e=>{let s=e.dataset.id;f(s)})},v=()=>{l.value.forEach(o=>{document.querySelector(`#azs${o.attributes.AZS_ID}`).checked=!0})},g=()=>{l.value.forEach(o=>{document.querySelector(`#azs${o.attributes.AZS_ID}`).checked=!1})};return(o,e)=>(c(),i("div",D,[b.value?(c(),i("div",V,[t("h1",N,[A($(z),{class:"underline-current underline",to:"/admin"},{default:P(()=>[...e[4]||(e[4]=[n(" \u041F\u0430\u043D\u0435\u043B\u044C \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0430\u0439\u0442\u043E\u043C 1rnb.ru ",-1)])]),_:1}),e[5]||(e[5]=n(" - \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0446\u0435\u043D\u044B \u043D\u0430 \u0410\u0417\u0421 ",-1))]),t("div",j,[t("label",q,[e[6]||(e[6]=n(" A-95: ",-1)),u(t("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>a.value.a95=s),class:"border-[1px] py-[5px] px-[10px] border-$red rounded-md",type:"number"},null,512),[[p,a.value.a95]])]),t("label",C,[e[7]||(e[7]=n(" A-92: ",-1)),u(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>a.value.a92=s),class:"border-[1px] py-[5px] px-[10px] border-$red rounded-md",type:"number"},null,512),[[p,a.value.a92]])]),t("label",T,[e[8]||(e[8]=n(" \u0414\u0422: ",-1)),u(t("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>a.value.dt=s),class:"border-[1px] py-[5px] px-[10px] border-$red rounded-md",type:"number"},null,512),[[p,a.value.dt]])]),t("label",B,[e[9]||(e[9]=n(" \u0413\u0430\u0437: ",-1)),u(t("input",{"onUpdate:modelValue":e[3]||(e[3]=s=>a.value.gas=s),class:"border-[1px] py-[5px] px-[10px] border-$red rounded-md",type:"number"},null,512),[[p,a.value.gas]])])]),e[10]||(e[10]=t("h2",{class:"mt-[40px] text-lg"}," \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0410\u0417\u0421, \u0433\u0434\u0435 \u043D\u0443\u0436\u043D\u043E \u043F\u043E\u043C\u0435\u043D\u044F\u0442\u044C \u0446\u0435\u043D\u044B: ",-1)),t("div",{class:"flex gap-[20px]"},[t("button",{class:"bg-$red text-white rounded-md py-[5px] px-[10px]",onClick:v}," \u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 "),t("button",{class:"bg-$red text-white rounded-md py-[5px] px-[10px]",onClick:g}," \u0423\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 ")]),t("div",I,[t("div",U,[(c(!0),i(k,null,S(l.value,s=>(c(),i("label",{key:s.attributes.AZS_ID,class:"grid grid-cols-2 gap-[20px]",for:"azs"+s.attributes.AZS_ID},[t("div",E,[t("input",{id:"azs"+s.attributes.AZS_ID,"data-id":s.id,class:"azs",type:"checkbox",name:s.attributes.Name},null,8,G),t("span",null,d(s.attributes.Name),1),t("span",null,"("+d(s.attributes.Address)+")",1)]),t("div",M,[t("span",R,"\u0410-95: "+d(s.attributes.Price_A95)+" \u20BD",1),t("span",F,"\u0410-92: "+d(s.attributes.Price_A92)+" \u20BD",1),t("span",L,"\u0414\u0422
1: "+d(s.attributes.Price_DT)+" \u20BD",1),t("span",J,"\u0413\u0430\u0437: "+d(s.attributes.Price_Gas)+" \u20BD",1)])],8,Z))),128))])]),t("button",{class:"bg-$red text-white rounded-md py-[5px] px-[10px] w-full mt-[50px]",onClick:_}," \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0446\u0435\u043D\u044B ")])):w("",!0)]))}};export{K 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.