PageSourceSearch

https://naog.gov.mn/assets/StructurePage-BkcydId7.js

js naog.gov.mn collected 2026-10-02 21:44:43 UTC 11,223 bytes, 1 lines download raw bytes

1import{d as te,i as se,j as u,c as p,k as ae,a as c,b as s,t as n,u as o,F as f,r as _,x as oe,y as le,f as w,m as O,p as L,w as P,n as H,q as ne,g as re,e as ie,o as r,_ as ce}from"./index-DuLOQInC.js";import{s as A}from"./index-BbwIdnyJ.js";import"./index-qprUcmW8.js";const de={class:"container mx-auto py-16"},ue={class:"mb-8 mt-12"},pe={class:"text-4xl font-semibold text-slate-900"},me={class:"bg-white border border-slate-200 p-4"},ge=["src","alt"],he={class:"mt-24"},ve={class:"text-3xl font-semibold text-slate-900"},fe={class:"mt-4 grid grid-cols-1 md:grid-cols-2 gap-4"},_e={class:"relative z-10 h-full w-full p-4 flex flex-col justify-end"},be={class:"text-white text-lg font-semibold drop-shadow"},ye={class:"mt-2 text-white/0 max-h-0 overflow-hidden transition-all duration-500 ease-out group-hover:text-white group-hover:max-h-40"},xe={class:"text-sm leading-snug"},we={class:"mt-24"},Pe={class:"text-2xl font-semibold text-slate-900"},ke={class:"mt-4 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"},Fe={class:"relative z-10 h-full w-full p-4 flex items-end"},Ce={class:"text-white text-base font-medium drop-shadow"},Se={class:"mt-24"},Ne={class:"text-2xl font-semibold text-slate-900"},Ve={class:"mt-4 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"},Le={class:"text-base font-medium text-slate-900 group-hover:text-primary transition-colors"},Ae=["innerHTML"],Te={key:0,class:"mt-2 text-xs text-slate-500"},De={class:"sticky mt-24 top-[64px] z-10 bg-[#F8F9FA]/95 backdrop-blur supports-[backdrop-filter]:bg-[#F8F9FA]/80 border-b border-slate-200"},je={class:"container mx-auto px-4"},ze={class:"py-4 md:py-5 grid grid-cols-1 md:grid-cols-12 gap-3 md:gap-4 items-center"},Ie={class:"md:col-span-3"},Ue={for:"search",class:"sr-only"},Oe={class:"relative"},He=["placeholder"],Me={class:"md:col-span-3"},$e={for:"dept",class:"sr-only"},Be={class:"md:col-span-3"},Ee={for:"area",class:"sr-only"},qe={class:"md:col-span-2"},Ge={for:"area",class:"sr-only"},Re={class:"md:col-span-1 flex md:justify-end"},Je={id:"faculty-grid",class:"container mx-auto px-4 py-8 md:py-12"},Ke={key:0,class:"border border-slate-200 bg-white p-6 text-center text-slate-600"},Qe={key:1,class:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3"},We={class:"aspect-square w-full overflow-hidden bg-slate-100"},Xe=["src","alt"],Ye={class:"p-5"},Ze={class:"text-lg font-bold text-slate-900"},et={class:"mt-0.5 text-sm text-slate-600"},tt={class:"mt-2 text-sm text-slate-700"},st={class:"mt-3 flex flex-wrap gap-2"},at={class:"mt-5"},ot="/banner-images/naog-roadside.webp",lt=te({__name:"StructurePage",setup(nt){const{t:l,tm:k,locale:g}=se();u([{name:"pages.structurePage.schools.civilService.name",image:"/structure-departments/naog-turiin-albanii-school.jpg",description:"pages.structurePage.schools.civilService.description",to:{name:"CivilServiceSchool"}},{name:"pages.structurePage.schools.governance.name",image:"/banner-images/naog-roadside-alt.webp",description:"pages.structurePage.schools.governance.description",to:{name:"GovernanceSchool"}}]);const M=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},$=e=>e.replace(/<[^>]*>?/gm,"").trim(),B=p(()=>h.value.filter(e=>(e==null?void 0:e.type)==="school").map(e=>{const t=m(e.name,e.name_en),i=m(e.description,e.description_en)||"",a=$(M(i));let d="";return t.includes("Төрийн албаны сургууль")||t.toLowerCase().includes("civil")?d="CivilServiceSchool":(t.includes("Удирдахуйн")||t.toLowerCase().includes("governance"))&&(d="GovernanceSchool"),{id:e.id,name:t,description:a,image:e.image||null,to:{name:d}}})),h=u([]),m=(e,t)=>g.value==="mn"?e||t||"":t||e||"",E=p(()=>h.value.filter(e=>(e==null?void 0:e.type)==="department").map(e=>({id:e.id,name:m(e.name,e.name_en),image:e.image||null}))),q=p(()=>h.value.filter(e=>(e==null?void 0:e.type)==="faculty").map(e=>({id:e.id,name:m(e.name,e.name_en),description:m(e.description,e.description_en),head:m(e.director,e.director_en)}))),G=async()=>{try{const{data:e}=await O.get("/api/structure/units/");h.value=Array.isArray(e)?e:[]}catch(e){console.error("Failed to fetch structure units",e),h.value=[]}},v=u(""),b=u([]),y=u([]),F=u([]),T=u([]),D=p(()=>k("pages.facultyPage.departments")),j=p(()=>k("pages.facultyPage.researchAreas")),R=p(()=>{const e=k("pages.facultyPage.types");return Object.entries(e).map(([t,i])=>({value:t,label:i}))});function z(e){return e.toLowerCase().trim()}function C(e){const t=e;
1return g.value==="en"?t.name_en||t.name:t.name||t.name_en||""}function J(e){const t=e;return g.value==="en"?t.title_en||t.title:t.title||t.title_en||""}function I(e){const t=e;return g.value==="en"?t.departmentUnitNameEn||t.departmentUnitName||t.department||"":t.departmentUnitName||t.department||t.departmentUnitNameEn||""}function K(e){const t=!v.value||z(C(e)).includes(z(v.value)),i=b.value,d=i.length===0||i.includes(D.value[0])||i.includes(I(e)||""),N=y.value,Y=N.length===0||N.includes(j.value[0])||e.researchAreas.some(ee=>N.includes(ee)),V=F.value,Z=V.length===0||V.includes("teacher")&&e.is_teacher||V.includes("administration")&&e.is_administration;return t&&d&&Y&&Z}const U=p(()=>T.value.filter(K));let S;function Q(){S&&window.clearTimeout(S),S=window.setTimeout(x,150)}function x(){}function W(){v.value="",b.value=[],y.value=[]}const X=()=>{O.get("/api/faculty/profiles").then(e=>{T.value=e.data.filter(t=>t.is_teacher||t.is_administration)})};return ae(()=>{G(),X()}),(e,t)=>{const i=ne("RouterLink");return r(),c("section",de,[s("div",ue,[s("h1",pe,n(o(l)("pages.structurePage.title")),1)]),s("div",me,[s("img",{src:o(g)==="mn"?"/naog-org-chart-mn.png":"/naog-org-chart-en.png",alt:o(l)("pages.structurePage.orgChartAlt"),class:"w-full h-auto object-contain"},null,8,ge)]),s("div",he,[s("h2",ve,n(o(l)("pages.structurePage.schoolsTitle")),1),t[6]||(t[6]=s("div",{class:"h-1 bg-yellow-600 w-1/12 mt-3"},null,-1)),s("div",fe,[(r(!0),c(f,null,_(B.value,(a,d)=>(r(),L(i,{key:d,to:`/schools/${a.id}`,class:"group relative h-56 overflow-hidden border border-slate-200 shadow-sm"},{default:P(()=>[s("div",{class:"absolute inset-0 bg-center bg-cover transition-transform duration-500 ease-out group-hover:scale-105",style:H({backgroundImage:`url(${a.image})`})},null,4),t[5]||(t[5]=s("div",{class:"absolute inset-0 bg-black/20 transition-colors duration-300 group-hover:bg-black/50"},null,-1)),s("div",_e,[s("div",be,n(o(l)(a.name)),1),s("div",ye,[s("p",xe,n(o(l)(a.description)),1)])])]),_:2,__:[5]},1032,["to"]))),128))])]),s("div",we,[s("h2",Pe,n(o(l)("pages.structurePage.unitsTitle")),1),t[8]||(t[8]=s("div",{class:"h-1 bg-yellow-600 w-1/12 mt-3"},null,-1)),s("div",ke,[(r(!0),c(f,null,_(E.value,a=>(r(),L(i,{key:a.id,to:`/units/${a.id}/`,class:"group relative h-40 overflow-hidden border border-slate-200 shadow-sm hover:shadow-lg transition-all duration-200"},{default:P(()=>[s("div",{class:"absolute inset-0 bg-center bg-cover transition-transform duration-500 ease-out group-hover:scale-105",style:H({backgroundImage:`url(${a.image||ot})`})},null,4),t[7]||(t[7]=s("div",{class:"absolute inset-0 bg-black/20 transition-colors duration-300 group-hover:bg-black/40"},null,-1)),s("div",Fe,[s("div",Ce,n(a.name),1)])]),_:2,__:[7]},1032,["to"]))),128))])]),s("div",Se,[s("h2",Ne,n(o(l)("pages.structurePage.departmentsTitle")),1),t[9]||(t[9]=s("div",{class:"h-1 bg-yellow-600 w-1/12 mt-3"},null,-1)),s("div",Ve,[(r(!0),c(f,null,_(q.value,a=>(r(),L(i,{key:a.id,to:`/departments/${a.id}`,class:"group border border-slate-200 bg-white p-4 shadow-sm hover:shadow-lg transition-all duration-200 hover:border-primary-200"},{default:P(()=>[s("div",Le,n(a.name),1),s("div",{class:"mt-2 text-sm text-slate-600 group-hover:text-slate-700 transition-colors line-clamp-2",innerHTML:a.description},null,8,Ae),a.head?(r(),c("div",Te,n(o(l)("pages.structurePage.departmentHead"))+": "+n(a.head),1)):re("",!0)]),_:2},1032,["to"]))),128))])]),s("div",De,[s("div",je,[s("div",ze,[s("div",Ie,[s("label",Ue,n(o(l)("pages.facultyPage.toolbar.searchLabel")),1),s("div",Oe,[t[10]||(t[10]=s("i",{class:"pi pi-search absolute left-3 top-1/2 -translate-y-1/2 text-slate-400"},null,-1)),oe(s("input",{id:"search","onUpdate:modelValue":t[0]||(t[0]=a=>v.value=a),type:"text",placeholder:o(l)("pages.facultyPage.toolbar.searchPlaceholder"),class:"w-full pl-10 pr-3 py-2.5 rounded-md border border-slate-300 bg-white text-[#212529] placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-[#0D47A1]/30 focus:border-[#0D47A1]",onInput:t[1]||(t[1]=a=>Q())},null,40,He),[[le,v.value,void 0,{trim:!0}]])])]),s("div",Me,[s("label",$e,n(o(l)("pages.facultyPage.toolbar.deptPlaceholder")),1),w(o(A),{inputId:"dept",modelValue:b.value,"onUpdate:modelValue":t[2]||(t[2]=a=>b.value=a),options:D.value,filter:"",placeholder:o(l)("pages.facultyPage.toolbar.deptPlaceholder"),display:"chip",class:"w-full",showClear:"",onChange:x},null,8,["modelValue","options","placeholder"])]),s("div",Be,[s("label",Ee,n(o(l)("pages.facultyPage.toolbar.areaPlaceholder")),1),w(o(A),{inputId:"area",modelValue:y.value,"onUpdate:modelValue":t[3]||(t[3]=a=>y.value=a),options:j.value,filter:"",placeholder:o(l)("pages.facultyPage.toolbar.areaPlaceholder"),display:"chip",class:"w-full",showClear:"",onChange:x},null,8,["modelValue","options","placeholder"])]),s("div",qe,[s("label",Ge,n(o(l)("pages.facultyPage.toolbar.typePlaceholder")),1),w(o(A),{inputId:"area",modelValue:F.value,"onUpdate:modelValue":t[4]||(t[4]=a=>F.value=a),options:R.value,optionLabel:"label",optionValue:"value",filter:"",placeholder:o(l)("pages.facultyPage.toolbar.typePlaceholder"),display:"chip",class:"w-full",showClear:"",onChange:x},null,8,["modelValue","options","placeholder"])]),s("div",Re,[s("button",{type:"button",class:"inline-flex items-center justify-center w-full md:w-auto px-4 py-2.5 bg-[#0D47A1] text-white font-medium hover:bg-[#0b3f90] focus:outline-none focus:ring-2 focus:ring-[#0D47A1]/40",onClick:W}
1,n(o(l)("pages.facultyPage.toolbar.resetButton")),1)])])])]),s("div",Je,[U.value.length===0?(r(),c("div",Ke,n(o(l)("pages.facultyPage.grid.emptyState")),1)):(r(),c("div",Qe,[(r(!0),c(f,null,_(U.value,a=>(r(),c("article",{key:a.id,class:"group relative border border-slate-200 bg-white shadow-sm hover:shadow-md transition-shadow"},[s("div",We,[s("img",{src:a.thumbnail_image||"/faculty-members/placeholder.jpg",alt:C(a),class:"h-full w-full object-cover object-[center_10%]"},null,8,Xe)]),s("div",Ye,[s("h3",Ze,n(C(a)),1),s("p",et,n(J(a)),1),s("p",tt,"🏢 "+n(I(a)),1),s("div",st,[(r(!0),c(f,null,_([...a.is_teacher?[o(l)("pages.facultyPage.types.teacher")]:[],...a.is_administration?[o(l)("pages.facultyPage.types.administration")]:[]],d=>(r(),c("span",{key:a.id+"-"+d,class:"inline-flex items-center border border-blue-200 bg-blue-50 px-2.5 py-1 text-xs font-medium text-blue-800"},n(d),1))),128))]),s("div",at,[w(i,{to:{name:"FacultyDetail",params:{id:a.id}},class:"inline-flex items-center bg-primary px-3 py-2 text-sm font-semibold !text-white hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary/30"},{default:P(()=>[ie(n(o(l)("pages.facultyPage.grid.learnMore")),1)]),_:2},1032,["to"])])])]))),128))]))])])}}}),pt=ce(lt,[["__scopeId","data-v-3a8027ef"]]);export{pt 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.