PageSourceSearch

https://www.getgekko.com/static/public/bundles_vue/assets/CarFilter-DL6aX2uN.js

js getgekko.com collected 2026-09-24 09:20:43 UTC 2,975 bytes, 1 lines download raw bytes

1import{r,o as l,e as d,g as f,i as c,x as y,y as b,c as m,f as g,n as p,t as x,h as w,m as C}from"./chunk-vendors-CgL1FIjI.js";import{L as O}from"./sentryApiRejections-B0BgSXf9.js";import{_ as S}from"./i18n-DDYE_4TA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"03badf17e0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c64acd5c-6d64-4b07-b89a-1ad0c34c0a8c",e._sentryDebugIdIdentifier="sentry-dbid-c64acd5c-6d64-4b07-b89a-1ad0c34c0a8c")}catch{}})();const D={inject:{getFilterMutationName:{default:()=>()=>""}},name:"CarFilter",emits:["filter-updated"],props:{modelValue:{default:null}},data(){return{carOptions:[],defaultValue:null,selectedOption:{key:null},text:"",carsLoaded:!1}},computed:{...C({getCompanyId:"main/getCompanyId"}),isSelected(){return this.selectedOption.key!=this.defaultValue}},watch:{modelValue:function(e){const t=this.carOptions.find(o=>o.key===e);t&&(this.selectedOption=t,this.text=t.text)},isSelected(e){this.$emit("filter-updated",{name:this.$options.name,value:e})}},created(){this.getCars()},methods:{selectOption(e){this.selectedOption=e,this.text=e.text,this.$store.commit("filterStore/SET_CAR",this.selectedOption.key),this.$store.commit("filterStore/"+this.getFilterMutationName())},optionClass(e){var t;return e.key===((t=this.selectedOption)==null?void 0:t.key)?"text-primary":null},onDropdownShow(){this.carsLoaded||this.getCars()},getCars(){let e=this;this.carOptions=[],O.list({},this.getCompanyId).then(function(t){let o=0;if(t.forEach(s=>{let i={id:o,text:s.plate_number,key:s.id};o++,e.carOptions.push(i)}),e.modelValue){const s=e.carOptions.find(i=>i.key===e.modelValue);s&&(e.selectedOption=s,e.text=s.text)}else e.carOptions.length>0&&(e.selectedOption=e.carOptions[0],e.text=e.carOptions[0].text,e.$store.commit("filterStore/SET_CAR",e.carOptions[0].key),e.$store.commit("filterStore/"+e.getFilterMutationName()));e.carsLoaded=!0})},resetFilter(){this.carOptions.length>0&&this.selectOption(this.carOptions[0])}}};function v(e,t,o,s,i,a){const u=r("GkDropdownItem"),h=r("GkScrollbars"),_=r("GkDropdown"),k=r("font-awesome-icon");return l(),d("div",{class:p(["filterbar-item",{selected:a.isSelected}])},[f(_,{id:"car_filter",text:i.text,block:"",variant:"link",class:"filterbar-item-button","toggle-class":"text-decoration-none button-no-shadows",onShow:a.onDropdownShow,"no-flip":""},{default:c(()=>[f(h,{class:"filterbar-scrollbar"},{default:c(()=>[(l(!0),d(y,null,b(i.carOptions,n=>(l(),m(u,{key:n.id,onClick:I=>a.selectOption(n),class:"list-item"},{default:c(()=>[g("span",{class:p(a.optionClass(n))},x(n.text),3)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1},8,["text","onShow"]),a.isSelected?(l(),m(k,{key:0,onClick:t[0]||(t[0]=n=>a.resetFilter()),icon:"fa-solid fa-circle-xmark",class:"reset-filter"})):w("",!0)],2)}const G=S(D,[["render",v]]);export{G 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.