PageSourceSearch

https://primaria-cehusilvaniei.ro/_nuxt/PripfoXb.js

js primaria-cehusilvaniei.ro collected 2026-10-02 23:37:38 UTC 5,517 bytes, 1 lines download raw bytes

1import{a as q,m as b,j as _}from"./-W1VOijv.js";import B from"./B8Ry3j3y.js";import F from"./Dc6hFrXi.js";import P from"./Cb9MYrcP.js";import{d as R}from"./BmaaQ1Wp.js";import{bg as l,b3 as p,Q as N,a0 as a,b_ as t,I as s,bs as r,Z as d,aL as f,J as v,aO as I}from"./PW_UF68a.js";import"./Bz2dEcw7.js";import"./CIhhRri8.js";import"./Bs5_TFWz.js";import"./B_aewNsK.js";import"./fgnZjpTr.js";import"./CH7vd0UB.js";import"./206wqFYJ.js";const O={name:"CategoriesIndex",components:{ResetFiltersButton:F,TextFieldFilter:B,SelectFilter:P},mixins:[R],data(){return{headers:[{title:this.$t("fields.name"),align:"start",key:"name"},{title:this.$t("fields.url"),key:"url"},{title:this.$t("fields.show_on_home"),key:"show_on_home"},{title:this.$t("fields.layout"),key:"layout"},{title:"",sortable:!1,align:"end",key:"action"}]}},async mounted(){await this.fetchData()},head(){return{title:"Categorii"}},computed:{..._("categories",["categories"]),..._("loader",["loading"]),..._("query",["queryParams"]),currentScope(){return"categories"}},methods:{...b("resources",["updateResource","getData"]),...b("query",["resetScopeFilters","setVuetifyPagination"]),async fetchData(){await this.getData(this.currentScope)},handleOptionsUpdate(o){this.setVuetifyPagination({scope:this.currentScope,pagination:o}),this.getData(this.currentScope)}}},T={class:"d-flex flex-column flex-grow-1"},j={class:"text-h5 text-md-h4"},E={class:"filter-row"},H={class:"text-end"},J=["href"],L={class:"cell-indent-2p"},Q={class:"cell-indent-2p"},Z={class:"d-flex no-wrap justify-end"},G={class:"font-weight-bold"},K={class:"font-weight-bold"};function M(o,n,W,X,k,i){const w=l("v-divider"),x=l("v-spacer"),u=l("v-btn"),S=l("v-card-title"),h=l("text-field-filter"),g=l("select-filter"),z=l("reset-filters-button"),D=l("v-switch"),m=l("v-icon"),C=l("router-link"),y=l("v-tooltip"),$=l("v-data-table-server"),V=l("v-card-text"),A=l("v-card");return p(),N("div",T,[a(A,{elevation:"5"},{default:t(()=>[a(S,{class:"d-flex align-center"},{default:t(()=>[s("div",j,r(o.$t("menu.categories")),1),a(w,{vertical:"",class:"mx-2 d-none d-md-inline"}),a(x),a(u,{size:"large",to:"/categories/create",color:"primary",class:"mt-2 mt-md-0 create-button"},{default:t(()=>[d(r(o.$t("buttons.create_category")),1)]),_:1})]),_:1}),a(V,null,{default:t(()=>[a($,{headers:k.headers,"items-per-page-options":[10,15,30,60],loading:o.loading,"items-length":o.queryParams[i.currentScope]?.pagination?.total||0,items:o.categories,class:"flex-grow-1 v2-style-table",options:o.pagination,"onUpdate:options":[n[0]||(n[0]=e=>o.pagination=e),i.handleOptionsUpdate]},{"body.prepend":t(()=>[s("tr",E,[s("td",null,[a(h,{label:o.$t("fields.name"),scope:i.currentScope,"scope-key":"name",class:"filter-field","hide-details":""},null,8,["label","scope"])]),s("td",null,[a(h,{label:o.$t("fields.url"),scope:i.currentScope,"scope-key":"url",class:"filter-field","hide-details":""},null,8,["label","scope"])]),s("td",null,[a(g,{label:o.$t("fields.show_on_home"),scope:i.currentScope,"scope-key":"show_on_home",items:[{text:"Da",value:1},{text:"Nu",value:0}],class:"filter-field","hide-details":""},null,8,["label","scope"])]),s("td",null,[a(g,{label:o.$t("fields.layout"),scope:i.currentScope,"scope-key":"layout",items:[{text:"Aspect 1",value:1},{text:"Aspect 2",value:2},{text:"Aspect 3",value:3}],class:"filter-field","hide-details":""},null,8,["label","scope"])]),s("td",H,[a(z,{scope:"categories"})])])]),"item.url":t(({item:e})=>[s("a",{class:"category-url",href:e.url,target:"_blank"},r(e.url),9,J)]),"item.show_on_home":t(({item:e})=>[s("div",L,[(p(),v(D,{density:"compact","hide-details":"","true-value":1,"false-value":0,class:I({"v-input--model-value-1":e.show_on_home===1}),"model-value":e.show_on_home,key:`${e.slug}-${e.show_on_home}`,"onUpdate:modelValue":c=>o.updateResource({scope:i.currentScope,data:{...e,show_on_home:c},navigate:!1,key:"slug",refreshData:!0})},null,8,["class","model-value","onUpdate:modelValue"]))])]),"item.layout":t(({item:e})=>[s("div",Q,"Aspect "+r(e.layout),1)]),"item.action":t(({item:e})=>[s("div",Z,[a(y,{location:"bottom"},{activator:t(({props:c})=>[a(C,{to:`/categories/edit/${e.slug}`},{default:t(()=>[a(u,f({icon:"",size:"medium",variant:"text",density:"compact",style:{color:"rgba(0, 0, 0, 0.7) !important"}},c),{default:t(()=>[a(m,{size:"large"},{default:t(()=>[...n[1]||(n[1]=[d("mdi-square-edit-outline",-1)])]),_:1})]),_:1},16)]),_:2},1032,["to"])]),default:t(()=>[s("span",null,[n[2]||(n[2]=d("Editează ",-1)),s("i",G,r(e.name),1)])]),_:2},1024),a(y,{location:"bottom"},{activator:t(({props:c})=>[e.active?(p(),v(u,f({key:0,icon:"",size:"medium",variant:"text",density:"compact",onClick:U=>o.updateResource({data:{...e,active:0},scope:i.currentScope,key:"slug",refreshData:!0,navigate:!1})},c),{default:t(()=>[a(m,{size:"large"},{default:t(()=>[...n[3]||(n[3]=[d("mdi-delete",-1)])]),_:1})]),_:1},16,["onClick"])):(p(),v(u,f({key:1,icon:"",size:"medium",variant:"text",density:"compact",onClick:U=>o.updateResource({data:{...e,active:1},key:"slug",refreshData:!0,scope:i.currentScope,navigate:!1})},c),{default:t(()=>[a(m,{size:"large"},{default:t(()=>[...n[4]||(n[4]=[d("mdi-delete-off",-1)])]),_:1})]),_:1},16,["onClick"]))]),default:t(()=>[s("span",null,[d(r(e.active?"Dezactivează":"Activează")+" categoria ",1),s("i",K,r(e.name),1)])]),_:2},1024)])]),_:1},8,["headers","loading","items-length","items","options","onUpdate:options"])]),_:1})]),_:1})])}const pe=q(O,[["render",M],["__scopeId","data-v-a0ed6f83"]]);export{pe 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.