2 lines
5.4 KiB
JavaScript
2 lines
5.4 KiB
JavaScript
import{_ as u}from"./SearchModal.vue_vue_type_style_index_0_scoped_a4fc4416_lang-CbsljUTZ.js";import{o as i,c as l,b as a,k as p,s as g,h,t as b}from"./app-DmJ8GS-7.js";import{_ as n}from"./_plugin-vue_export-helper-DlAUqK2U.js";const f={name:"AdminIndexSearch",data(){return{searchInput:this.$page.props.filters.search}},methods:{search:u.debounce(function(){if(this.searchInput==""){let r=new URL(window.location.href);r.searchParams.delete("search");let e=r.toString();this.$inertia.visit(e,{method:"get",preserveState:!0,replace:!0})}else{let r=new URL(window.location.href);r.searchParams.delete("page");let e=r.toString();this.$inertia.visit(e,{method:"get",data:{search:this.searchInput},preserveState:!0,replace:!0})}},500)},props:["filters"]},m={class:"sm:col-span-1 w-full"},y=a("label",{for:"hs-as-table-product-review-search",class:"sr-only"},"Поиск",-1),x={class:"relative"},k=a("div",{class:"absolute inset-y-0 left-0 flex items-center pointer-events-none pl-4"},[a("svg",{class:"h-4 w-4 text-gray-400",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[a("path",{d:"M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"})])],-1);function w(r,e,d,c,t,s){return i(),l("div",m,[y,a("div",x,[p(a("input",{autocomplete:"off",onInput:e[0]||(e[0]=(...o)=>s.search&&s.search(...o)),"onUpdate:modelValue":e[1]||(e[1]=o=>t.searchInput=o),type:"text",id:"hs-as-table-product-review-search",name:"hs-as-table-product-review-search",class:"py-2 px-3 pl-11 block flex-1 w-full border-gray-200 shadow-sm rounded-md text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400",placeholder:"Поиск"},null,544),[[g,t.searchInput]]),k])])}const V=n(f,[["render",w]]),v={name:"AdminIndexFilter",data(){return{}},methods:{},props:[]},_={class:"sm:col-span-2 md:grow"},$=h('<div class="flex justify-end gap-x-2"><div class="hs-dropdown relative inline-block [--placement:bottom-right]" data-hs-dropdown-auto-close="inside"><button id="hs-as-table-table-filter-dropdown" type="button" class="py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"><svg class="w-3 h-3" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"><path d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"></path></svg> Фильтр <span class="pl-2 text-xs font-semibold text-blue-600 border-l border-gray-200 dark:border-gray-700 dark:text-blue-500"> 1 </span></button><div class="hs-dropdown-menu transition-[opacity,margin] duration hs-dropdown-open:opacity-100 opacity-0 hidden mt-2 divide-y divide-gray-200 min-w-[12rem] z-10 bg-white shadow-md rounded-lg mt-2 dark:divide-gray-700 dark:bg-gray-800 dark:border dark:border-gray-700" aria-labelledby="hs-as-table-table-filter-dropdown"><div class="divide-y divide-gray-200 dark:divide-gray-700"><label for="hs-radio-group-1" class="flex py-2.5 px-3"><input type="radio" name="hs-radio-group" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" id="hs-radio-group-1" checked><span class="ml-3 text-sm text-gray-800 dark:text-gray-200">Все</span></label><label for="hs-radio-group-2" class="flex py-2.5 px-3"><input type="radio" name="hs-radio-group" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" id="hs-radio-group-2"><span class="ml-3 text-sm text-gray-800 dark:text-gray-200">Опубликованы</span></label><label for="hs-radio-group-3" class="flex py-2.5 px-3"><input disabled type="radio" name="hs-radio-group" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" id="hs-radio-group-3"><span class="ml-3 text-sm text-gray-800 dark:text-gray-200">На рассмотрении</span></label><label for="hs-radio-group-4" class="flex py-2.5 px-3"><input type="radio" name="hs-radio-group" class="shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800" id="hs-radio-group-4"><span class="ml-3 text-sm text-gray-800 dark:text-gray-200">Не активны</span></label></div></div></div></div>',1),I=[$];function S(r,e,d,c,t,s){return i(),l("div",_,I)}const j=n(v,[["render",S]]),z={name:"AdminIndexHeaderTitle",props:["title"]},A={class:"text-lg font-semibold text-gray-800 dark:text-gray-200"};function B(r,e,d,c,t,s){return i(),l("div",null,[a("h2",A,b(d.title),1)])}const C=n(z,[["render",B]]);export{C as A,j as a,V as b};
|