Files
ntspi-app/public/build/assets/Index-BSr3Ofja.js
T
2024-09-19 16:06:49 +05:00

2 lines
16 KiB
JavaScript

import{M as A}from"./MainNavbar-CBx37KIe.js";import{i as b,k as w,v as O,o as n,c as l,b as e,j as y,F as f,d as p,t as v,r as u,a as h,p as S,q as I,h as k,Z as M,w as $,e as T,g as z}from"./app-DmJ8GS-7.js";import{F as D}from"./v3-rkPj73qv.js";import{C as N}from"./ClientScrollTimeline-zadrTdrA.js";import{B as x,C as R}from"./ClientFooterDown-D8UuGhzW.js";import{A as V,a as H,b as q}from"./AdminIndexHeaderTitle-D8ksOx2b.js";import{A as Y}from"./AdminIndexHeader-CAfP1jQ8.js";import{S as F,b as E,c as Z,T as G,d as J,C as K,a as Q}from"./ClientPostSearch-D0YX2x3W.js";import{C as W}from"./ClientPost-BP_ZUrbH.js";import{_ as C}from"./SearchModal.vue_vue_type_style_index_0_scoped_a4fc4416_lang-CbsljUTZ.js";import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";/* empty css */const X={name:"LevelEduFilter",components:{BaseIcon:x,Link:b,SearchBadge:F,CategoryBadge:E},data(){return{levelEdu:this.level_filter.value||""}},methods:{filter:C.debounce(function(){let i=new URL(window.location.href);i.searchParams.delete("page"),i.searchParams.delete("level");let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0,data:{level:this.levelEdu}})},500),clearFilter(){let i=new URL(window.location.href);i.searchParams.delete("level");let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0})}},props:{levels:{type:Object},level_filter:{type:Object}}},ee=["value"];function te(i,t,r,g,d,o){return w((n(),l("select",{onChange:t[1]||(t[1]=(...a)=>o.filter&&o.filter(...a)),"onUpdate:modelValue":t[2]||(t[2]=a=>d.levelEdu=a),class:"py-3 px-4 pe-9 block w-full md:w-1/2 border-gray-200 rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none"},[e("option",{onClick:t[0]||(t[0]=y((...a)=>o.clearFilter&&o.clearFilter(...a),["prevent"])),selected:"",value:""},"Все"),(n(!0),l(f,null,p(r.levels,(a,s)=>(n(),l("option",{value:s},v(a),9,ee))),256))],544)),[[O,d.levelEdu]])}const ie=_(X,[["render",te]]),re={name:"FormEducationalFilter",components:{BaseIcon:x,Link:b,SearchBadge:F,CategoryBadge:E},data(){return{formEdu:this.formEdu_filter.value||[]}},methods:{filter:C.debounce(function(){let i=new URL(window.location.href);i.searchParams.delete("page"),i.searchParams.delete("form");let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0,data:{form:this.formEdu}})},500),clearFilter(){let i=new URL(window.location.href);i.searchParams.delete("form"),this.formEdu=[],this.searchTerm="";let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0})}},computed:{},props:{forms:{type:Object},formEdu_filter:{type:Object}}},oe={class:"min-w-[12rem] py-1 space-y-3"},se=e("span",null,"Очистить",-1),ne={class:"divide-y divide-gray-200 dark:divide-gray-700 max-h-[30vh] overflow-y-auto"},le={class:"flex flex-col ml-3"},ae=["value","id"],de=["for"];function ce(i,t,r,g,d,o){const a=u("BaseIcon");return n(),l("div",oe,[e("button",{onClick:t[0]||(t[0]=y((...s)=>o.clearFilter&&o.clearFilter(...s),["prevent"])),class:"text-gray-500 text-sm flex gap-x-1 items-center hover:text-gray-700"},[h(a,{class:"w-4 h-4",name:"delete"}),se]),e("div",ne,[e("div",null,[e("div",le,[(n(!0),l(f,null,p(r.forms,(s,c)=>(n(),l("div",null,[w(e("input",{"onUpdate:modelValue":t[1]||(t[1]=m=>d.formEdu=m),value:c,onChange:t[2]||(t[2]=(...m)=>o.filter&&o.filter(...m)),type:"radio",class:"shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none",id:"inp-tag"+c},null,40,ae),[[S,d.formEdu]]),e("label",{for:"inp-tag"+c,class:"text-sm text-gray-500 ms-3 dark:text-neutral-400"},v(s),9,de)]))),256))])])])])}const ue=_(re,[["render",ce]]),he={name:"BudgetFilter",components:{BaseIcon:x,Link:b,SearchBadge:F,CategoryBadge:E},data(){return{budgetEdu:this.budget_filter.value||[]}},methods:{filter:C.debounce(function(){let i=new URL(window.location.href);i.searchParams.delete("page"),i.searchParams.delete("budget");let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0,data:{budget:this.budgetEdu}})},500),clearFilter(){let i=new URL(window.location.href);i.searchParams.delete("budget"),this.budgetEdu=[],this.searchTerm="";let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0})}},computed:{},props:{budgets:{type:Object},budget_filter:{type:Object}}},me={class:"min-w-[12rem] py-1 space-y-3"},fe=e("span",null,"Очистить",-1),ge={class:"divide-y divide-gray-200 dark:divide-gray-700 max-h-[30vh] overflow-y-auto"},pe={class:"flex flex-col ml-3"},ve=["value","id"],_e=["for"];function be(i,t,r,g,d,o){const a=u("BaseIcon");return n(),l("div",me,[e("button",{onClick:t[0]||(t[0]=y((...s)=>o.clearFilter&&o.clearFilter(...s),["prevent"])),class:"text-gray-500 text-sm flex gap-x-1 items-center hover:text-gray-700"},[h(a,{class:"w-4 h-4",name:"delete"}),fe]),e("div",ge,[e("div",null,[e("div",pe,[(n(!0),l(f,null,p(r.budgets,(s,c)=>(n(),l("div",null,[w(e("input",{"onUpdate:modelValue":t[1]||(t[1]=m=>d.budgetEdu=m),value:c,onChange:t[2]||(t[2]=(...m)=>o.filter&&o.filter(...m)),type:"radio",class:"shrink-0 mt-0.5 border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none",id:"inp-tag"+c},null,40,ve),[[S,d.budgetEdu]]),e("label",{for:"inp-tag"+c,class:"text-sm text-gray-500 ms-3 dark:text-neutral-400"},v(s),9,_e)]))),256))])])])])}const xe=_(he,[["render",be]]),we={name:"DirectionFilter",components:{BaseIcon:x,Link:b,SearchBadge:F,CategoryBadge:E},data(){return{direction:this.direction_filter.value||[],tag_slug:[],searchTerm:""}},methods:{filter:C.debounce(function(){let i=new URL(window.location.href);i.searchParams.delete("page"),i.searchParams.delete("direction[]");let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0,data:{direction:this.direction}})},500),clearFilter(){let i=new URL(window.location.href);i.searchParams.delete("direction[]"),this.direction=[],this.searchTerm="";let t=i.toString();this.$inertia.visit(t,{method:"get",preserveState:!0})}},computed:{},props:{direction_studies:{type:Object},direction_filter:{type:Object}}},ye={class:"min-w-[12rem] py-1 space-y-3"},ke=e("span",null,"Очистить",-1),Fe={class:"divide-y divide-gray-200 dark:divide-gray-700 max-h-[30vh] overflow-y-auto"},Ee={class:"flex flex-col ml-3"},Ce=["value","id"],je=["for"];function Be(i,t,r,g,d,o){const a=u("BaseIcon");return n(),l("div",ye,[e("button",{onClick:t[0]||(t[0]=y((...s)=>o.clearFilter&&o.clearFilter(...s),["prevent"])),class:"text-gray-500 text-sm flex gap-x-1 items-center hover:text-gray-700"},[h(a,{class:"w-4 h-4",name:"delete"}),ke]),e("div",Fe,[e("div",null,[e("div",Ee,[(n(!0),l(f,null,p(r.direction_studies,s=>(n(),l("div",{key:s.id},[w(e("input",{"onUpdate:modelValue":t[1]||(t[1]=c=>d.direction=c),value:s.slug,onChange:t[2]||(t[2]=(...c)=>o.filter&&o.filter(...c)),type:"checkbox",class:"shrink-0 mt-0.5 border-gray-200 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none",id:"inp"+s.id},null,40,Ce),[[I,d.direction]]),e("label",{for:"inp"+s.id,class:"text-sm text-gray-500 ms-3 dark:text-neutral-400"},v(s.name),9,je)]))),128))])])])])}const $e=_(we,[["render",Be]]),Se={name:"ClientProgramFilter",components:{DirectionFilter:$e,FormEducationalFilter:ue,BudgetFilter:xe,SortingByFilter:Z,TagFilter:G,CategoryFilter:J,BaseIcon:x},data(){return{}},props:{forms_educational:{type:Object},budget_filter:{type:Object},direction_filter:{type:Object},formEdu_filter:{type:Object},types_budget:{type:Object},direction_studies:{type:Object}}},Le=e("div",{class:""},[e("button",{type:"button",class:"py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none","aria-haspopup":"dialog","aria-expanded":"false","aria-controls":"hs-offcanvas-example","data-hs-overlay":"#hs-offcanvas-example"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})])])],-1),Ue={id:"hs-offcanvas-example",class:"hs-overlay hs-overlay-open:translate-x-0 hidden -translate-x-full fixed top-0 start-0 transition-all duration-300 transform h-full max-w-xs w-full z-[80] bg-white border-e overflow-auto",role:"dialog",tabindex:"-1","aria-labelledby":"hs-offcanvas-example-label"},Pe=k('<div class="flex justify-between items-center py-3 px-4 border-b"><h3 id="hs-offcanvas-example-label" class="font-bold text-gray-800"> Фильтры </h3><button type="button" class="size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none" aria-label="Close" data-hs-overlay="#hs-offcanvas-example"><span class="sr-only">Close</span><svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg></button></div>',1),Ae={class:"p-4"},Oe={class:"hs-accordion-group"},Ie=["id"],Me=k('<button class="hs-accordion-toggle hs-accordion-active:text-blue-600 py-3 inline-flex items-center gap-x-3 w-full font-semibold text-start text-gray-800 hover:text-gray-500 focus:outline-none focus:text-gray-500 rounded-lg disabled:opacity-50 disabled:pointer-events-none" aria-expanded="false" aria-controls="hs-basic-with-arrow-collapse-two"><svg class="hs-accordion-active:hidden block size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg><svg class="hs-accordion-active:block hidden size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"></path></svg> Формат обучения </button>',1),Te=["aria-labelledby"],ze=["id"],De=k('<button class="hs-accordion-toggle hs-accordion-active:text-blue-600 py-3 inline-flex items-center gap-x-3 w-full font-semibold text-start text-gray-800 hover:text-gray-500 focus:outline-none focus:text-gray-500 rounded-lg disabled:opacity-50 disabled:pointer-events-none" aria-expanded="false" aria-controls="hs-basic-with-arrow-collapse-two"><svg class="hs-accordion-active:hidden block size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg><svg class="hs-accordion-active:block hidden size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"></path></svg> Места </button>',1),Ne=["aria-labelledby"],Re=["id"],Ve=k('<button class="hs-accordion-toggle hs-accordion-active:text-blue-600 py-3 inline-flex items-center gap-x-3 w-full font-semibold text-start text-gray-800 hover:text-gray-500 focus:outline-none focus:text-gray-500 rounded-lg disabled:opacity-50 disabled:pointer-events-none" aria-expanded="false" aria-controls="hs-basic-with-arrow-collapse-two"><svg class="hs-accordion-active:hidden block size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg><svg class="hs-accordion-active:block hidden size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m18 15-6-6-6 6"></path></svg> Направление подготовки </button>',1),He=["aria-labelledby"];function qe(i,t,r,g,d,o){const a=u("FormEducationalFilter"),s=u("BudgetFilter"),c=u("DirectionFilter");return n(),l(f,null,[Le,e("div",Ue,[Pe,e("div",Ae,[e("div",Oe,[e("div",{class:"hs-accordion",id:"id"+r.formEdu_filter.type},[Me,e("div",{id:"hs-basic-with-arrow-collapse-two",class:"hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300",role:"region","aria-labelledby":"id"+r.formEdu_filter.type},[h(a,{forms:r.forms_educational,formEdu_filter:r.formEdu_filter},null,8,["forms","formEdu_filter"])],8,Te)],8,Ie),e("div",{class:"hs-accordion",id:"id"+r.budget_filter.type},[De,e("div",{id:"hs-basic-with-arrow-collapse-two",class:"hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300",role:"region","aria-labelledby":"id"+r.formEdu_filter.type},[h(s,{budgets:r.types_budget,budget_filter:r.budget_filter},null,8,["budgets","budget_filter"])],8,Ne)],8,ze),e("div",{class:"hs-accordion",id:"id"+r.direction_filter.type},[Ve,e("div",{id:"hs-basic-with-arrow-collapse-two",class:"hs-accordion-content hidden w-full overflow-hidden transition-[height] duration-300",role:"region","aria-labelledby":"id"+r.direction_filter.type},[h(c,{direction_filter:r.direction_filter,direction_studies:r.direction_studies},null,8,["direction_filter","direction_studies"])],8,He)],8,Re)])])])],64)}const Ye=_(Se,[["render",qe]]),Ze={name:"Index",components:{ClientProgramFilter:Ye,LevelEduFilter:ie,AdminIndexHeaderTitle:V,AdminIndexHeader:Y,AdminIndexFilter:H,AdminIndexSearch:q,ClientFooterDown:R,ClientScrollTimeline:N,ClientPostFilter:K,Link:b,MainNavbar:A,FsLightbox:D,Head:M,ClientPost:W,ClientPostSearch:Q},data(){return{}},props:{campaignName:{type:String},levelsEducational:{type:Array},naprs:{type:Array},filters:{type:Array},formsEdu:{type:Array},budgetEdu:{type:Array},direction_studies:{type:Array}},methods:{transformToColumns(i){return((g,d)=>g.reduce((o,a,s)=>s%d?o:[...o,g.slice(s,s+d)],[]))(i,Math.ceil(i.length/2)).reverse()},textLimit(i,t){if(i.length>t){let r;return r=i.substring(0,t),r+"..."}return i}},mounted(){}},Ge=e("title",null,"Приемная компания",-1),Je=e("meta",{name:"description",content:"Your page description"},null,-1),Ke={class:"flex flex-col h-screen justify-between"},Qe={class:"mb-auto"},We={class:"relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:py-10"},Xe={class:"w-100"},et={class:"space-y-5 md:space-y-4"},tt={class:"text-brand-primary text-center mb-3 mt-2 text-3xl font-semibold tracking-tight dark:text-white lg:text-[40px] lg:leading-tight"},it={class:"space-y-5 md:space-y-10"},rt={class:"my-10 flex items-center justify-center gap-x-2"},ot={class:"container mx-auto xl:px-5 py-5 lg:py-4"},st={class:"w-full mx-auto gap-x3 flex flex-wrap lg:justify-center"},nt={class:"flex flex-col"},lt={style:{height:"max-content"},class:"px-4"},at={class:"text-brand-primary mb-2 mt-2 text-lg font-semibold upper tracking-tight dark:text-white lg:text-md lg:leading-tight"};function dt(i,t,r,g,d,o){const a=u("Head"),s=u("MainNavbar"),c=u("LevelEduFilter"),m=u("ClientProgramFilter"),L=u("Link"),U=u("ClientFooterDown");return n(),l(f,null,[h(a,null,{default:$(()=>[Ge,Je]),_:1}),e("div",Ke,[h(s,{class:"border-b",sections:i.$page.props.navigation},null,8,["sections"]),e("main",Qe,[e("div",We,[e("div",Xe,[e("div",null,[e("div",et,[e("h1",tt,v(this.campaignName),1),e("div",it,[e("div",null,[e("div",rt,[h(c,{levels:r.levelsEducational,level_filter:r.filters.level_filter},null,8,["levels","level_filter"]),h(m,{budget_filter:r.filters.budget_filter,direction_filter:r.filters.direction_filter,formEdu_filter:r.filters.formEdu_filter,types_budget:r.budgetEdu,direction_studies:r.direction_studies,forms_educational:r.formsEdu},null,8,["budget_filter","direction_filter","formEdu_filter","types_budget","direction_studies","forms_educational"])]),e("div",ot,[e("div",st,[(n(!0),l(f,null,p(o.transformToColumns(this.naprs.data),P=>(n(),l("div",nt,[(n(!0),l(f,null,p(P,B=>(n(),l("div",lt,[e("h1",at,v(B.name),1),(n(!0),l(f,null,p(B.programs,j=>(n(),T(L,{key:j.id,class:"block text-[#1E57A3] hover:text-blue-600 duration-200 text-sm underline underline-offset-2 py-1",href:i.route("client.program.show",j)},{default:$(()=>[z(v(j.name),1)]),_:2},1032,["href"]))),128))]))),256))]))),256))])])])])])])])])]),h(U)])],64)}const yt=_(Ze,[["render",dt]]);export{yt as default};