PageSourceSearch

https://zpcg.me/_nuxt/TypesTable.ChU2MpSe.js

js zpcg.me collected 2026-10-02 06:09:58 UTC 3,241 bytes, 1 lines download raw bytes

1import{_ as m}from"./Button.d-927L_w.js";import{c as h,b as _,a as u}from"./alert.Bv-uX6fS.js";import{a as r}from"./api.BES4dapa.js";import{_ as f,o,c as a,b as e,a as g,F as x,r as v,t as y,d as b}from"./entry.B9qXNiQA.js";import"./Spinner.msUQ_QRO.js";import"./nuxt-link.C34G_Ocz.js";const w={watch:{page:{immediate:!0,handler:function(t){this.fetch()}}},props:{page:{type:Number,default:0},totalPages:{type:Number,default:0}},data(){return{sections:[],limit:10,loading:!1}},methods:{promptDelete(t){h("Da li ste sigurni da želite da obrišete ovu sekciju?","Da, obriši!","Ne").then(s=>{this.delete(t)})},delete(t){const s=`/procurement-type/${t.id}`;this.sections.length===1&&this.$emit("prevPage"),setTimeout(()=>{r("delete",s).then(l=>{this.onSuccess("delete",l.message)},l=>{this.onFail(l)})},200)},fetch(){this.loading=!0,this.$event("admin:loading"),this.$emit("setLoader",!0);const t="/procurement-types";setTimeout(()=>{r("get",t).then(s=>{this.onSuccess("fetch",s)},s=>{this.onFail(s)})},200)},onSuccess(t,s){switch(t){case"fetch":this.sections=s,this.$event("admin:loaded"),this.$emit("setLoader",!1),this.loading=!1;break;case"delete":this.fetch(),_("sekcija uspješno obrisana");break}},onFail(t=""){u(t),this.$emit("setLoader",!1),this.$event("admin:loaded"),this.loading=!1}}},k={class:"w-full px-4 sm:px-6"},$={class:"flex flex-wrap gap-4 items-center sm:px-6 py-4"},j=e("h2",{class:"font-semibold"},"Tipovi",-1),N={key:0,class:"flow-root"},D={class:"-mx-4 sm:-mx-6 lg:-mx-8 overflow-x-auto"},F={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},z={class:"overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg"},C={class:"min-w-full divide-y divide-gray-300"},S=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"}," Naziv "),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),B={class:"divide-y divide-gray-200 bg-white font-medium"},L={class:"whitespace-wrap py-4 pl-4 pr-3 text-base sm:pl-6 max-w-lg"},V={class:"py-4 pl-3 pr-4 font-semibold sm:pr-6"},T={class:"flex justify-end items-center space-x-4"},E=["onClick"],I=["onClick"],P={key:1,class:"flex justify-center items-center w-full h-[594px]"},K={key:0,class:"flex items-center justify-center border w-full h-full mt-6 bg-zpcg-light shadow rounded-md"},O=e("h3",{class:"text-zpcg-gray tracking-[0.3px] font-semibold"},"Nema tipova",-1),U=[O];function q(t,s,l,A,n,c){const d=m;return o(),a("div",k,[e("div",$,[j,g(d,{class:"ml-auto","color-style":"zpcg_red/white",text:"Kreiraj tip",onClick:s[0]||(s[0]=i=>t.$emit("create"))})]),n.sections.length>0?(o(),a("div",N,[e("div",D,[e("div",F,[e("div",z,[e("table",C,[S,e("tbody",B,[(o(!0),a(x,null,v(n.sections,i=>(o(),a("tr",{key:i.id},[e("td",L,y(i==null?void 0:i.label_me),1),e("td",V,[e("div",T,[e("div",{onClick:p=>this.$emit("edit",i),class:"text-blue-600 cursor-pointer"}," Izmijeni ",8,E),e("div",{class:"text-zpcg-red cursor-pointer",onClick:p=>c.promptDelete(i)}," Obriši ",8,I)])])]))),128))])])])])])])):(o(),a("div",P,[n.loading?b("",!0):(o(),a("div",K,U))]))])}const W=f(w,[["render",q]]);export{W 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.