PageSourceSearch

https://zpcg.me/_nuxt/Table.DE2WIdCu.js

js zpcg.me collected 2026-10-02 06:10:02 UTC 6,481 bytes, 1 lines download raw bytes

1import{_ as k}from"./Input.C9v9QPxr.js";import I from"./Table.DU7L6d5z.js";import{c as D,b as L,a as z}from"./alert.Bv-uX6fS.js";import{a as u}from"./api.BES4dapa.js";import{c as N}from"./utils.DptB6v0e.js";import{_ as T,e as C,o,c as a,b as e,a as _,F as x,r as S,n as g,t as n,u as $,p as f,d as p,g as y,w as b}from"./entry.B9qXNiQA.js";import"./Item.pxTTAAFn.js";import"./Spinner.msUQ_QRO.js";import"./errors.DNRLLADL.js";const q={watch:{page:{immediate:!0,handler:function(t){this.fetch()}}},props:{page:{type:Number,default:0},totalPages:{type:Number,default:0}},data(){return{items:[],limit:15,loading:!1,expandedInd:null,query:"",queryTimer:null}},methods:{label(t){return t.local&&t.international?"Lokalna, Međunarodna":t.local?"Lokalna":t.international?"Međunarodna":""},resetEditing(t){},onInput(){clearTimeout(this.queryTimer),this.queryTimer=setTimeout(()=>{this.fetch()},500)},toggle(t){if(this.resetEditing(t),this.expandedInd==t){this.expandedInd=null;return}this.expandedInd=t},promptDelete(t){D("Da li ste sigurni da želite da obrišete ovu stanicu ?","Da, obriši!","Ne").then(i=>{this.delete(t)})},delete(t){const i=`/stop/${t.StopID}`;this.items.length===1&&this.$emit("prevPage"),setTimeout(()=>{u("delete",i).then(r=>{this.onSuccess("delete",r.message)},r=>{this.onFail(r)})},200)},fetch(){this.loading=!0,setTimeout(()=>{this.$event("admin:loading"),this.$emit("setLoader",!0);const t=`/stops?paginate=true&page=${this.page}&limit=${this.limit}&sort_by=1`+(this.query?`&search=${this.query}`:"");u("get",t).then(i=>{this.onSuccess("fetch",i)},i=>{this.onFail(i)})},200)},onSuccess(t,i){switch(t){case"fetch":this.items=i.data;const r=Math.ceil(i.total/this.limit);this.$emit("setTotalPages",r),this.$emit("setLoader",!1),this.$event("admin:loaded"),this.loading=!1;break;case"delete":this.fetch(),L("Stanica uspješno obrisana");break}},onFail(t=""){z(t),this.$emit("setLoader",!1),this.$event("admin:loaded"),this.loading=!1}}},F={key:0,class:"flex flex-col px-4 sm:px-6 lg:px-8"},V={class:"flex items-center space-x-1"},j=e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"w-5 h-5"},[e("path",{"fill-rule":"evenodd",d:"M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z","clip-rule":"evenodd"})],-1),E={class:"flow-root mt-4"},M={class:"-mx-4 sm:-mx-6 lg:-mx-8 overflow-x-auto overflow-y-hidden"},P={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},B={class:"min-w-full divide-y divide-gray-300"},A=e("thead",{class:"bg-gray-50"},[e("tr",null,[e("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-base font-semibold text-gray-900 sm:pl-6"}),e("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-base font-semibold text-gray-900 sm:pl-6"}," Naziv "),e("th",{scope:"col",class:"px-3 py-3.5 text-left text-base font-semibold text-gray-900"}," Tip stanice "),e("th",{scope:"col",class:"px-3 py-3.5 text-left text-base font-semibold text-gray-900"}," Koordinate "),e("th",{scope:"col",class:"px-3 py-3.5 text-left text-base font-semibold text-gray-900"},[e("span",{class:"sr-only"},"Is Local & Is International ?")]),e("th",{scope:"col",class:"px-3 py-3.5 text-left text-base font-semibold text-gray-900"}," Eksterni ID Države "),e("th",{scope:"col",class:"px-3 py-3.5 text-left text-base font-semibold text-gray-900"}," Eksterni ID Stanice "),e("th",{scope:"col",class:"relative py-3.5 pl-3 pr-4 sm:pr-6"},[e("span",{class:"sr-only"},"Edit and Delete")])])],-1),U={class:"divide-y divide-gray-200 bg-white font-medium"},Z=["onClick"],K={class:"whitespace-nowrap px-3 py-4 text-base text-gray-500 w-5"},O=e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1),G=[O],H={class:"whitespace-nowrap py-4 pl-4 pr-3 text-base sm:pl-6"},J={class:"whitespace-nowrap px-3 py-4 text-base text-gray-500"},Q={class:"whitespace-nowrap px-3 py-4 text-base text-gray-500 h-[73px]"},R=["href"],W=e("br",null,null,-1),X={class:"whitespace-nowrap px-3 py-4 text-base text-gray-500"},Y={class:"whitespace-nowrap px-3 py-4 text-base text-gray-500"},ee={class:"whitespace-nowrap px-3 py-4 text-base text-gray-500"},te={class:"py-4 pl-3 pr-4 text-base font-semibold sm:pr-6"},se={class:"flex justify-end items-center space-x-4"},ie=["onClick"],oe=["onClick"],ae={colspan:"6"},le={class:"w-full"},ne={key:0,class:"bg-gray-100 my-4 min-h-12"},re={key:1,class:"flex justify-center items-center w-full h-[594px]"},ce={key:0,class:"flex items-center justify-center border w-full h-full mt-6 bg-zpcg-light rounded-md shadow"},de=e("h3",{class:"text-zpcg-gray tracking-[0.3px] font-semibold"},"Nema stanica",-1),pe=[de];function he(t,i,r,me,l,c){const w=k,v=I,h=C("auto-animate");return l.items.length>0?(o(),a("div",F,[e("div",V,[j,_(w,{class:"mr-auto",placeholder:"Pretraga po nazivu",modelValue:l.query,"onUpdate:modelValue":[i[0]||(i[0]=s=>l.query=s),i[1]||(i[1]=s=>c.onInput())]}
1,null,8,["modelValue"])]),e("div",E,[e("div",M,[e("div",P,[e("table",B,[A,e("tbody",U,[(o(!0),a(x,null,S(l.items,(s,d)=>(o(),a(x,{key:s.StopID},[e("tr",{class:"cursor-pointer",onClick:m=>c.toggle(d)},[e("td",K,[(o(),a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:g(["w-4 h-4 transition-all duration-200 transform",{"rotate-180":l.expandedInd==d}])},G,2))]),e("td",H,n(s.Name_me),1),e("td",J,n(("capitalize"in t?t.capitalize:$(N))(s.stop_type.Name_me)),1),e("td",Q,[s.Latitude&&s.Longitude?(o(),a("a",{key:0,class:"underline text-blue-600 hover:text-zpcg-red transition-all font-medium",href:"https://www.google.com/maps?q="+s.Latitude+","+s.Longitude,target:"_blank"},[f(n(s.Latitude.toFixed(6)),1),W,f(" "+n(s.Longitude.toFixed(6)),1)],8,R)):p("",!0)]),e("td",X,n(c.label(s)),1),e("td",Y,n(s.external_country_id),1),e("td",ee,n(s.external_stop_id),1),e("td",te,[e("div",se,[e("div",{onClick:y(m=>this.$emit("edit",s),["stop"]),class:"text-blue-600 cursor-pointer"}," Izmijeni ",8,ie),e("div",{class:"text-zpcg-red cursor-pointer",onClick:y(m=>c.promptDelete(s),["stop"])}," Obriši ",8,oe)])])],8,Z),e("tr",{class:g({"border-none":l.expandedInd!=d})},[e("td",ae,[b((o(),a("div",le,[l.expandedInd==d?b((o(),a("div",ne,[_(v,{stop:s},null,8,["stop"])])),[[h]]):p("",!0)])),[[h]])])],2)],64))),128))])])])])])])):(o(),a("div",re,[l.loading?p("",!0):(o(),a("div",ce,pe))]))}const ke=T(q,[["render",he]]);export{ke 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.