1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[2293],{42663:function(e,n,t){t.d(n,{A:function(){return I}});var i=t(20641),a=t(90033),s=t(53751);const o={class:"columns"},d={class:"column is-narrow"},l={class:"badgeTypeLogo"},m={class:"icon is-small"},r={key:2,class:"new-badge-type-image"},g={class:"column"};function u(e,n,t,u,c,p){const v=(0,i.g2)("LogoUpload"),h=(0,i.g2)("font-awesome-icon"),b=(0,i.g2)("ImageUploadCropper"),I=(0,i.g2)("b-input"),k=(0,i.g2)("b-field");return(0,i.uX)(),(0,i.CE)("section",null,[(0,i.Lk)("div",o,[(0,i.Lk)("div",d,[(0,i.Lk)("div",l,[t.item.id?((0,i.uX)(),(0,i.Wv)(v,{key:0,item:t.item,"onUpdate:modelValue":p.onImageUpdated},null,8,["item","onUpdate:modelValue"])):c.pendingImagePreview?((0,i.uX)(),(0,i.CE)("div",{key:1,class:"pending-image-preview",style:(0,a.Tr)({backgroundImage:`url(${c.pendingImagePreview})`})},[(0,i.Lk)("button",{class:"button is-small is-rounded is-danger remove-btn",onClick:n[0]||(n[0]=(...e)=>p.removePendingImage&&p.removePendingImage(...e))},[(0,i.Lk)("span",m,[(0,i.bF)(h,{icon:"fa-light fa-times"})])])],4)):((0,i.uX)(),(0,i.CE)("div",r,[(0,i.bF)(b,{"border-radius":9999,"show-button":!0,onUpload:p.onPendingImageSelected},null,8,["onUpload"])]))])]),(0,i.Lk)("div",g,[(0,i.Lk)("form",{onSubmit:n[2]||(n[2]=(0,s.D$)((...e)=>t.save&&t.save(...e),["prevent"]))},[(0,i.bF)(k,{label:e.$t("title")},{default:(0,i.k6)(()=>[(0,i.bF)(I,{modelValue:t.item.name,"onUpdate:modelValue":n[1]||(n[1]=e=>t.item.name=e),required:""},null,8,["modelValue"])]),_:1},8,["label"])],32)])])])}t(14603),t(47566),t(98721);var c=t(2594),p=t(10630),v={components:{LogoUpload:c.A,ImageUploadCropper:p.A},props:["item","save"],emits:["image-updated","pending-image"],data(){return{pendingImageFile:null,pendingImagePreview:null}},computed:{},created(){this.item&&!this.item["@type"]&&(this.item["@type"]="BadgeType")},methods:{onImageUpdated(e){this.item.logo=e,this.$emit("image-updated",{...this.item,logo:e})},onPendingImageSelected(e){this.pendingImageFile=e,this.pendingImagePreview=URL.createObjectURL(e),this.$emit("pending-image",e)},removePendingImage(){this.pendingImagePreview&&URL.revokeObjectURL(this.pendingImagePreview),this.pendingImageFile=null,this.pendingImagePreview=null,this.$emit("pending-image",null)}}},h=t(66262);const b=(0,h.A)(v,[["render",u],["__scopeId","data-v-157d02fc"]]);var I=b},82293:function(e,n,t){t.r(n),t.d(n,{default:function(){return r}});var i=t(20641);const a={class:"o-minwidth"};function s(e,n,t,s,o,d){const l=(0,i.g2)("Form");return(0,i.uX)(),(0,i.CE)("section",a,[n[0]||(n[0]=(0,i.Lk)("h2",{class:"title"},"Create Badge Type",-1)),(0,i.bF)(l,{save:d.save,item:o.item},null,8,["save","item"])])}t(44114);var o=t(42663),d={components:{Form:o.A},data(){return{item:{}}},computed:{},methods:{save(){this.$http.plain.post("/badge_types",this.item).then(e=>this.saveSuccess(e)).catch(e=>console.error(e))},saveSuccess(e){this.$buefy.snackbar.open({message:this.$t("createdSuccessfully")}),this.$router.push({name:"BadgeTypeList"})}}},l=t(66262);const m=(0,l.A)(d,[["render",s]]);var r=m}}]);
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.