Files
ntspi-app/public/build/assets/Show-CAxnfql9.js
T
2024-10-04 16:05:23 +05:00

2 lines
7.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{i as T,Z as C,r as u,c as l,a as c,w as h,b as t,F as g,d as v,f as x,n as w,T as L,g as f,l as y,t as a,o as n}from"./app-CBssobj-.js";import{F as B}from"./v3-DnjJww8i.js";import{s as N}from"./SearchModal-BTKERLZv.js";import{_ as F}from"./_plugin-vue_export-helper-DlAUqK2U.js";/* empty css */import{C as M}from"./ClientFooterDown-B1P9jP1W.js";import{M as E}from"./MainPageNavbar-Cmz730h9.js";const j={name:"Show",data(){return{scrollTop:!1,currentNavSection:null}},props:{division:{type:Object},divisions:{type:Object}},components:{MainPageNavBar:E,ClientFooterDown:M,Link:T,FsLightbox:B,Head:C},methods:{textLimit(s,e){if(s.length>e){let i;return i=s.substring(0,e),i+"..."}return s},openEditorImagesOnSlide:function(s){this.slide=s,this.toggler=!this.toggler},isSameRoute(s){if(this.$page.props.ziggy.location===s)return!0},generateSlug:function(s){return N(s,{lower:!0,strict:!0,locale:"ru"})},onScroll(s){window.top.scrollY>100?this.scrollTop=!0:this.scrollTop=!1},scrollToTop(){window.scrollTo(0,0)}},mounted(){window.addEventListener("scroll",this.onScroll),window.addEventListener("scroll",()=>{const s=document.querySelectorAll("h2"),e=document.querySelector("#visor");let i=null;const p=e.getBoundingClientRect();if(p.top>window.scrollY){this.currentNavSection=null,i=null;return}for(let m=0;m<s.length;m++){const r=s[m],d=r.getBoundingClientRect();if(d.top>=0&&d.bottom<=window.innerHeight&&d.bottom>=p.top&&d.top<=p.bottom){r!==i&&(this.currentNavSection=r.id,i=r);break}}})},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("scroll",this.onScroll)},computed:{}},D={class:"flex flex-col h-screen"},R={class:"flex-grow"},z={class:"relative mb-auto mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},H={class:"sticky top-[110px] hidden h-[calc(100vh-110px)] max-w-[20%] md:flex md:shrink-0 md:flex-col md:justify-between"},P={key:0,class:"styled-scrollbar flex h-[calc(100vh-200px)] flex-col overflow-y-scroll pr-2 pb-4"},V={class:"flex gap-x-1"},I={class:"px-0.5 last-of-type:mb-0 mb-8"},O=["href"],Y={class:"order-last hidden w-56 shrink-0 lg:block"},q={class:"sticky top-[110px] h-[calc(100vh-110px)]"},A={class:"styled-scrollbar max-h-[70vh] space-y-1.5 overflow-y-auto py-2 text-sm"},Z={key:0,class:"anchor-li"},G={class:"w-full min-w-0 mt-1 max-w-6xl px-1 md:px-6",style:{}},J={class:"space-y-5 md:space-y-5"},K={class:"flex justify-between items-center mb-6"},Q={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},U={class:"grow"},W={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},X={class:"flex items-center whitespace-normal min-w-0","aria-label":"Breadcrumb"},$={class:"text-sm"},tt={class:"space-y-3"},et={class:"text-2xl mb-10 font-bold md:text-3xl"},st={id:"page-area",class:"space-y-5 md:space-y-5"},ot={key:0,id:"persons",class:"font-bold text-xl"},it={class:"flex flex-col rounded-xl p-4 md:p-6 bg-white border border-gray-200 dark:bg-slate-900 dark:border-gray-700"},lt={class:"flex items-center gap-x-4"},nt=["src"],rt={class:"grow"},at={key:0,class:"text-xs text-gray-500 mt-2"},dt={class:"text-xs text-gray-500 mt-2"},ct={class:"text-xs text-gray-500 mt-2"};function mt(s,e,i,p,m,r){const d=u("Head"),_=u("MainPageNavBar"),b=u("Link"),k=u("ClientFooterDown"),S=u("FsLightbox");return n(),l(g,null,[c(d,null,{default:h(()=>[t("title",null,a(i.division.data.title),1),e[2]||(e[2]=t("meta",{name:"description",content:"Your page description"},null,-1))]),_:1}),t("div",D,[c(_,{class:"border-b",sections:s.$page.props.navigation},null,8,["sections"]),t("main",R,[t("div",z,[e[9]||(e[9]=t("div",{class:"w-full h-[67px] fixed",id:"visor"},null,-1)),t("div",H,[this.divisions?(n(),l("nav",P,[e[3]||(e[3]=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"Подразделения",-1)),t("div",V,[t("ul",I,[(n(!0),l(g,null,v(this.divisions.data,o=>(n(),l("li",{key:o.id,class:"my-1.5 flex"},[t("a",{class:w([{"text-white hover:text-gray-200 font-semibold bg-[#135aae]":r.isSameRoute(s.route("client.division.show",o.slug)),"text-gray-600 hover:text-[#2C6288]":!r.isSameRoute(s.route("client.division.show",o.id))},"relative duration-300 flex w-full rounded-md cursor-pointer items-center px-2 py-1 text-left text-sm"]),href:s.route("client.division.show",o.slug)+"/"},a(o.title),11,O)]))),128))])])])):x("",!0)]),t("nav",Y,[t("div",q,[e[5]||(e[5]=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1)),t("ul",A,[i.division.data.workers.length>0?(n(),l("li",Z,[t("a",{class:w([{"translate-x-2 text-[#135aae]":this.currentNavSection==="persons","bg-transperant text-gray-600 hover:text-gray-900":this.currentNavSection!=="persons"},"duration-150 block py-1 px-2 leading-[1.6] rounded-md"]),href:"#persons"},"Состав",2)])):x("",!0),c(L,{name:"fade"},{default:h(()=>[m.scrollTop?(n(),l("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:e[0]||(e[0]=y((...o)=>r.scrollToTop&&r.scrollToTop(...o),["prevent"]))},e[4]||(e[4]=[t("button",{class:"bg-transperant text-gray-600 cursor-pointer hover:text-gray-900 duration-300 block px-2 leading-[1.6] rounded-md"},"К началу",-1),t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-[17px] text-gray-600"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 11.25l-3-3m0 0l-3 3m3-3v7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)]))):x("",!0)]),_:1})])])]),t("article",G,[t("div",J,[t("div",K,[t("div",Q,[t("div",U,[t("div",W,[t("ol",X,[e[7]||(e[7]=t("li",{class:"text-sm"},[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600"},[f(" Главная "),t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])])],-1)),t("li",$,[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600",onClick:e[1]||(e[1]=y(()=>{},["prevent"]))},e[6]||(e[6]=[f(" Факультеты "),t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)]))])])])])])]),t("div",tt,[t("h1",et,a(i.division.data.title),1)]),t("div",st,[i.division.data.workers.length>0?(n(),l("h2",ot,"Состав")):x("",!0),(n(!0),l(g,null,v(i.division.data.workers,o=>(n(),l("div",it,[t("div",lt,[t("img",{loading:"lazy",class:"rounded-xl w-[150px]",src:"/storage/"+o.details.photo,alt:"Image Description"},null,8,nt),t("div",rt,[c(b,{href:s.route("client.person.show",o.id),class:"font-medium text-gray-800 hover:text-gray-500 underline"},{default:h(()=>[f(a(o.administrativePosition)+": "+a(o.name),1)]),_:2},1032,["href"]),o.details.academicTitle?(n(),l("p",at," Ученая степень: "+a(o.details.academicTitle),1)):x("",!0),t("p",dt," Контактный телефон: "+a(o.details.contactPhone),1),t("p",ct," Электронная почта: "+a(o.details.contactEmail),1),e[8]||(e[8]=t("p",{class:"text-xs text-gray-500 mt-2"}," Кабинет: 207В ",-1))])])]))),256))])])])])]),c(k)]),c(S,{class:"z-1000",slide:s.slide,toggler:s.toggler,sources:s.editorImages},null,8,["slide","toggler","sources"])],64)}const wt=F(j,[["render",mt]]);export{wt as default};