1import{a as e}from"./addVenue-7KV-NmDK.js";import{_ as t,a9 as l,aa as a,e as s,f as i,v as o,n,t as u,r,F as c,q as d,y as p,x as m,H as v,V as f,ar as h,G as g,u as y,k as w,g as b,B as C,a0 as S,ab as A}from"./index-M5qy_4Wm.js";import{H as k}from"./hostAppBar-Nsn6mbm2.js";import{C as L}from"./customSwitcher-csKReEKa.js";import"./imageURLreturn-BI9YqGmO.js";import"./croppie-COvZV25I.js";import"./playerCode-DfpfWfTs.js";import"./customInput-CRuVXa_j.js";import"./setCustomClaims-DxqBngw-.js";import"./createPlayer-DRfAS1VB.js";import"./tz-J99ISGfe.js";import"./customSearch-sElyVGsZ.js";import"./drawerIcon-D6p8KgWU.js";const _={class:"actions"},V={class:"filters"},D={class:"filter"},j={class:"filter"},I={class:"filter"},T=["onClick"],U={class:"d-flex align-center"},B=["src"],W={key:0},x={key:1};const F=t({components:{HostAppBar:k,addVenue:e,CustomSelect:a,CustomButton:l,CustomSwitcher:L},data:()=>({activeTab:0,search:"",imgDialog:{show:!1},venue:{content:{status:"Active",rules:"watl",logo:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/global%2Fvenue-logos%2F1569244739239_venue-logosWATL-logo.png?alt=media&token=0f58cbea-6ef3-418f-9962-1221b5014a17",country:"USA",type:"watl-affiliated",paymentMethod:"invoicing"},show:!1,type:"new"},filters:{status:"Active",type:"all",stripe:"All"},status:"Active",venues:[]}),setup:()=>({venueStore:y(),userStore:w()}),computed:{venueTypes(){return[{title:"All",value:"all"},{title:"WATL Invoicing",value:"watlInvoicing"},{title:"WATL Subscription",value:"watlSubscription"},..."master"===this.userStore.siteAccess?[{title:"Unaffiliated Subscription ",value:"custom"}]:[]]},filteredList(){return this.venues.filter(e=>{var t,l,a,s,i,o;return this.search.length?(null==(t=e.status)?void 0:t.toLowerCase().includes(this.search.toLowerCase()))||(null==(l=e.rules)?void 0:l.toLowerCase().includes(this.search.toLowerCase()))||(null==(a=e.city)?void 0:a.toLowerCase().includes(this.search.toLowerCase()))||(null==(s=e.company)?void 0:s.toLowerCase().includes(this.search.toLowerCase()))||(null==(i=e.email)?void 0:i.toLowerCase().includes(this.search.toLowerCase()))||(null==(o=e.phone)?void 0:o.toLowerCase().includes(this.search.toLowerCase())):e}).filter(e=>e.status===this.filters.status).filter(e=>"custom"===this.filters.type?"custom"===e.type:"watlInvoicing"===this.filters.type?"custom"!==e.type&&"subscription"!==e.paymentMethod:"watlSubscription"===this.filters.type?"custom"!==e.type&&"subscription"===e.paymentMethod:e).filter(e=>"withStripe"===this.filters.stripe?e.customer:"withoutStripe"===this.filters.stripe?!e.customer:e).sort(function(e,t){return e.date<t.date?1:e.date>t.date?-1:void 0})}},methods:{venueAffiliationHandler(e,t){g(v("/venues/".concat(t.id)),{type:e?"watl-affiliated":"custom",rules:e?"watl":"axeThrowing",...!e&&{paymentMethod:"subscription"}})},slug:e=>e.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),exportVenues(){const e=[["venue slug","slug"],["status","status"],["admin","admin"],["admin email","adminemail"],["address","address"],["city","city"],["country","country"],["company","company"],["customer","customer"],["phone","phone"],["email","email"]].filter(Boolean);let t="";for(let l in e)t+=e[l][0]+",";t+="\n",this.filteredList.forEach(l=>{for(const a of e){let e="";e="slug"===a[1]?this.slug(l.company+"-"+l.city):"admin"===a[1]?"".concat(l.adminfirst||"-"," ").concat(l.adminlast||"-"):l[a[1]]||"-",t+="".concat((""+e).replaceAll(",","").replaceAll('"',"").replaceAll("â",""),",")}t+="\n"}),h(t,"venues")},confirmDelete:()=>confirm("Are you sure you want to delete?"),deletevenue(e){this.confirmDelete()&&f(v("/venues/".concat(e.id)))},edit(e){this.venue.content={type:"watl-affiliated",paymentMethod:"invoicing",...e,".key":e.id},this.venue.type="edit",this.venue.show=!0},closeDialog(e){this.venue.content={status:"Active",rules:"watl",logo:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/global%2Fvenue-logos%2F1569244739239_venue-logosWATL-logo.png?alt=media&token=0f58cbea-6ef3-418f-9962-1221b5014a17",country:"USA",type:"watl-affiliated",paymentMethod:"invoicing"},this.venue.type="new",this.venue.show=!1},getVenues(){this.$databaseBind("venues",v("/venues"))},updateImage(e){this.imgDialog={show:!0,windowWidth:350,currentImage:e.img,updateDBlocation:this.venueStore.venue.locationSlug+"/venues/"+e.id,updateDBitem:"img",updateStorageLocation:this.venueStore.venue.locationSlug+"/venues/"+e.id+"/",ratioWidth:"1",ratioHeight:"1",saveWidth:"800",saveFormat:"jpeg"}}},mounted(){this.getVenues()}},[["render",function(e,t,l,a,v,f){const h=r("host-app-bar"),g=r("custom-select"),y=r("customButton"),w=r("custom-button"),k=r("custom-switcher"),L=r("v-icon"),F=r("v-btn"),H=r("v-list-item"),M=r("v-list"),N=r("v-menu"),z=r("v-table"),E=r("v-toolbar-title"),R=r("v-spacer"),$=r("v-toolbar"),q=r("addVenue"),G=r("v-card"),O=r("v-dialog");return b(),s("div",null,[i(h,{title:"Venue",modelValue:v.search,"onUpdate:modelValue":t[0]||(t[0]=e=>v.search=e)},null,8,["modelValue"]),o("div",_,[o("div",V,[o("div",D,[i(g,{label:"Status",items:[{title:"Active",value:"Active"},{title:"New",value:"New"},{title:"Disabled",value:"Disabled"}],value:v.filters.status,onUpdatedSelectValue:t[1]||(t[1]=e=>v.filters.status=e)},null,8,["value"])]),"master"===a.userStore.siteAccess?(b(),s(c,{key:0},[o("div",j,[i(g,{label:"Type",items:f.venueTypes,value:v.filters.type,onUpdatedSelectValue:t[2]||(t[2]=e=>v.filters.type=e)}
1,null,8,["items","value"])]),o("div",I,[i(g,{label:"Stripe ID",items:[{title:"All",value:"all"},{title:"With Stripe ID",value:"withStripe"},{title:"Without Stripe ID",value:"withoutStripe"}],value:v.filters.stripe,onUpdatedSelectValue:t[3]||(t[3]=e=>v.filters.stripe=e)},null,8,["value"])]),i(y,{variant:"outlined",onClick:f.exportVenues},{default:d(()=>[...t[8]||(t[8]=[p("export",-1)])]),_:1},8,["onClick"])],64)):u("",!0)]),i(w,{variant:"flat",width:"120",onClick:t[4]||(t[4]=e=>v.venue.show=!0)},{default:d(()=>[...t[9]||(t[9]=[p("Add Venue",-1)])]),_:1})]),0===v.activeTab?(b(),n(z,{key:0,class:"venueList"},{default:d(()=>[t[13]||(t[13]=o("thead",null,[o("tr",null,[o("th",null,"Name"),o("th",null,"City"),o("th",null,"Owner"),o("th",null,"Affiliation"),o("th")])],-1)),o("tbody",null,[(b(!0),s(c,null,m(f.filteredList,e=>(b(),s("tr",{key:e.id,class:"tableRow",onClick:t=>f.edit(e)},[o("td",U,[e.logo?(b(),s("img",{key:0,src:e.logo,alt:"",class:"logo mr-2"},null,8,B)):u("",!0),p(" "+C(e.company),1)]),o("td",null,C(e.country)+", "+C(e.city),1),o("td",null,C(e.adminfirst)+" "+C(e.adminlast),1),o("td",null,[i(k,{"label-after":"WATL",checked:"watl-affiliated"===e.type,"onUpdate:checked":(t,l)=>f.venueAffiliationHandler(t,e),onClick:t[5]||(t[5]=S(()=>{},["stop"]))},null,8,["checked","onUpdate:checked"])]),o("td",null,[i(N,{location:"center"},{activator:d(({props:e})=>[o("button",A({ref_for:!0},e),[i(L,null,{default:d(()=>[...t[10]||(t[10]=[p("mdi-dots-vertical",-1)])]),_:1})],16)]),default:d(()=>[i(M,null,{default:d(()=>[i(H,null,{default:d(()=>[i(F,{icon:"",onClick:t=>f.edit(e)},{default:d(()=>[i(L,{color:"#2F27D4"},{default:d(()=>[...t[11]||(t[11]=[p("mdi-pencil",-1)])]),_:1})]),_:1},8,["onClick"]),i(F,{icon:"",onClick:S(t=>f.deletevenue(e),["stop"])},{default:d(()=>[i(L,{color:"#2F27D4"},{default:d(()=>[...t[12]||(t[12]=[p("mdi-delete",-1)])]),_:1})]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)])],8,T))),128))])]),_:1})):u("",!0),i(O,{fullscreen:"",transition:"dialog-bottom-transition",scrollable:"",modelValue:v.venue.show,"onUpdate:modelValue":t[7]||(t[7]=e=>v.venue.show=e)},{default:d(()=>[i(G,{tile:"",style:{"background-color":"var(--theme-dialog)"}},{default:d(()=>[i($,{style:{"background-color":"var(--theme-primary)"}},{default:d(()=>[i(F,{class:"closeAbsolute",icon:"",onClick:t[6]||(t[6]=e=>f.closeDialog())},{default:d(()=>[i(L,null,{default:d(()=>[...t[14]||(t[14]=[p("mdi-close",-1)])]),_:1})]),_:1}),i(E,null,{default:d(()=>["new"===v.venue.type?(b(),s("span",W,"Add Venue")):(b(),s("span",x,"Edit Venue"))]),_:1}),i(R)]),_:1}),i(q,{venue:v.venue,view:"master",onCloseDialog:f.closeDialog},null,8,["venue","onCloseDialog"])]),_:1})]),_:1},8,["modelValue"])])}],["__scopeId","data-v-bedbeddd"]]);export{F 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.