PageSourceSearch

https://primariavad.ro/_nuxt/BS__gFAX.js

js primariavad.ro collected 2026-09-25 11:51:39 UTC 6,957 bytes, 1 lines download raw bytes

1import{a as I,e as x,m as E,f as u}from"./CqawAVUb.js";import{bf as o,b2 as $,O as C,$ as t,bW as n,Y as d,br as m,by as M,x as S,bZ as U,G as i,aK as V}from"./yzds40HC.js";import B from"./D2A-cuOJ.js";import F from"./Cq6d0fYR.js";import{d as P}from"./DdMfNbGx.js";import"./BgqE2USM.js";import"./C8Dppsyt.js";import"./CbO2Rjsj.js";import"./DhlRdtTC.js";import"./Dz0mkqCC.js";import"./DkpuU7u1.js";import"./DtS_aP2E.js";const N={name:"ManageDepartment",props:{isEdit:{type:Boolean,default:!1},editedDepartment:{type:Object,default:()=>({})}},data(){return{department:{}}},computed:{...u("errors",["errors"]),...u("loader",["loading"]),manageDepartmentModal:{get(){return this.$store.state.departments.manageDepartmentModal},set(e){this.toggleDepartmentModal(e)}}},watch:{editedDepartment:{handler(e){this.department=e&&e.id?{...e}:{}},immediate:!0,deep:!0}},methods:{...E("resources",["updateResource","storeResource"]),...x("errors",["clearError"]),...x("departments",["toggleDepartmentModal"]),async saveOrUpdate(){this.isEdit?await this.updateResource({scope:"departments",data:this.department,navigate:!1,refreshData:!0}):await this.storeResource({scope:"departments",data:this.department,navigate:!1,refreshData:!0}),await this.toggleDepartmentModal(!1)}}},T={class:"text-center"};function j(e,a,f,R,l,r){const y=o("v-card-title"),_=o("v-text-field"),D=o("v-card-text"),c=o("v-divider"),g=o("v-btn"),v=o("v-spacer"),w=o("v-card-actions"),h=o("v-card"),b=o("v-dialog");return $(),C("div",T,[t(b,{modelValue:r.manageDepartmentModal,"onUpdate:modelValue":a[6]||(a[6]=s=>r.manageDepartmentModal=s),persistent:"",width:"400"},{default:n(()=>[t(h,null,{default:n(()=>[t(y,{class:"dialog-title headline bg-primary text-white"},{default:n(()=>[d(m(f.isEdit?e.$t("departments.edit"):e.$t("departments.create")),1)]),_:1}),t(D,{class:"mt-5"},{default:n(()=>[t(_,{modelValue:l.department.name,"onUpdate:modelValue":a[0]||(a[0]=s=>l.department.name=s),"error-messages":e.errors.name,variant:"outlined","prepend-inner-icon":"mdi-account-group",label:e.$t("fields.name"),onInput:a[1]||(a[1]=s=>("clearError"in e?e.clearError:M(S))("name"))},null,8,["modelValue","error-messages","label"]),t(_,{modelValue:l.department.petition_email,"onUpdate:modelValue":a[2]||(a[2]=s=>l.department.petition_email=s),"error-messages":e.errors.petition_email,variant:"outlined","prepend-inner-icon":"mdi-email",label:e.$t("fields.email"),onInput:a[3]||(a[3]=s=>("clearError"in e?e.clearError:M(S))("email"))},null,8,["modelValue","error-messages","label"])]),_:1}),t(c),t(w,null,{default:n(()=>[t(g,{variant:"text",color:"error","max-width":"200px","min-width":"100px",onClick:a[4]||(a[4]=U(s=>e.toggleDepartmentModal(!1),["stop"]))},{default:n(()=>[d(m(e.$t("buttons.back")),1)]),_:1}),t(v),t(g,{variant:"text",color:"success","max-width":"200px","min-width":"100px",loading:e.loading,onClick:a[5]||(a[5]=s=>r.saveOrUpdate())},{default:n(()=>[d(m(e.$t("buttons.save")),1)]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}const A=I(N,[["render",j],["__scopeId","data-v-4daf8b60"]]),G={name:"Index",components:{ResetFiltersButton:F,TextFieldFilter:B,ManageDepartment:A},mixins:[P],beforeRouteLeave(e,a,f){this.resetScopeFilters({scope:this.currentScope}),f()},data(){return{isEdit:!1,editItem:{},headers:[{title:this.$t("fields.name"),align:"start",key:"name"},{title:this.$t("fields.petition_email"),align:"start",key:"petition_email"},{title:"",sortable:!1,align:"end",key:"action"}]}},async mounted(){await this.fetchInitialData()},head(){return{title:"Departamente"}},computed:{...u("departments",["departments"]),...u("loader",["loading"]),...u("query",["queryParams"]),currentScope(){return"departments"}},methods:{...E("resources",["deleteResource","getData"]),...E("query",["resetScopeFilters","setVuetifyPagination"]),...x("departments",["toggleDepartmentModal"]),async fetchInitialData(){await this.getData(this.currentScope)},handleOptionsUpdate(e){this.setVuetifyPagination({scope:this.currentScope,pagination:e}),this.getData(this.currentScope)},newItem(){this.editItem={}
1,this.isEdit=!1,this.toggleDepartmentModal(!0)},edit(e){this.editItem={...e},this.isEdit=!0,this.toggleDepartmentModal(!0)}}},H={class:"d-flex flex-column flex-grow-1"},K={class:"text-h5 text-md-h4"},L={class:"filter-row"},W={class:"text-end"},Y={class:"d-flex no-wrap justify-end"},Z={class:"font-weight-bold"},J={class:"font-weight-bold"};function Q(e,a,f,R,l,r){const y=o("manage-department"),_=o("v-divider"),D=o("v-spacer"),c=o("v-btn"),g=o("v-card-title"),v=o("text-field-filter"),w=o("reset-filters-button"),h=o("v-icon"),b=o("v-tooltip"),s=o("v-data-table"),z=o("v-card-text"),O=o("v-card");return $(),C("div",H,[t(y,{"edited-department":l.editItem,"is-edit":l.isEdit},null,8,["edited-department","is-edit"]),t(O,{elevation:"5"},{default:n(()=>[t(g,{class:"d-flex align-center"},{default:n(()=>[i("div",K,m(e.$t("menu.departments")),1),t(_,{vertical:"",class:"mx-2 d-none d-md-inline-block"}),t(D),t(c,{size:"large",class:"mt-2 mt-md-0 create-button",color:"primary",onClick:U(r.newItem,["stop"])},{default:n(()=>[d(m(e.$t("buttons.create_department")),1)]),_:1},8,["onClick"])]),_:1}),t(z,null,{default:n(()=>[t(s,{headers:l.headers,"items-per-page-options":[10,15,30,60],loading:e.loading,"items-length":e.queryParams[r.currentScope]?.pagination?.total||0,items:e.departments,class:"flex-grow-1 v2-style-table",options:e.pagination,"onUpdate:options":[a[0]||(a[0]=p=>e.pagination=p),r.handleOptionsUpdate]},{"body.prepend":n(()=>[i("tr",L,[i("td",null,[t(v,{scope:r.currentScope,"scope-key":"name",label:e.$t("fields.name"),class:"filter-field","hide-details":""},null,8,["scope","label"])]),i("td",null,[t(v,{scope:r.currentScope,"scope-key":"petition_email",label:e.$t("fields.petition_email"),class:"filter-field","hide-details":""},null,8,["scope","label"])]),i("td",W,[t(w,{scope:r.currentScope,class:"filter-reset-button"},null,8,["scope"])])])]),"item.action":n(({item:p})=>[i("div",Y,[t(b,{location:"bottom"},{activator:n(({props:k})=>[t(c,V({icon:"",size:"medium",variant:"text",density:"compact",onClick:q=>r.edit(p)},k),{default:n(()=>[t(h,{size:"large"},{default:n(()=>[...a[1]||(a[1]=[d("mdi-square-edit-outline",-1)])]),_:1})]),_:1},16,["onClick"])]),default:n(()=>[i("span",null,[a[2]||(a[2]=d(" Editează departamentul ",-1)),i("i",Z,m(p.name),1)])]),_:2},1024),t(b,{location:"bottom"},{activator:n(({props:k})=>[t(c,V({icon:"",size:"medium",variant:"text",density:"compact",onClick:q=>e.deleteResource({scope:r.currentScope,data:p})},k),{default:n(()=>[t(h,{size:"large"},{default:n(()=>[...a[3]||(a[3]=[d("mdi-delete",-1)])]),_:1})]),_:1},16,["onClick"])]),default:n(()=>[i("span",null,[a[4]||(a[4]=d(" Șterge departamentul ",-1)),i("i",J,m(p.name),1)])]),_:2},1024)])]),_:1},8,["headers","loading","items-length","items","options","onUpdate:options"])]),_:1})]),_:1})])}const pe=I(G,[["render",Q],["__scopeId","data-v-1fdce080"]]);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.