2 lines
2.1 KiB
JavaScript
2 lines
2.1 KiB
JavaScript
import{u as h,j as s,e as a,aE as g,aF as b}from"./vendor-BKmmeuxg.js";import{B as r}from"./button-BpNwv2aE.js";import{T as f,a as j}from"./tabs-Ifouhv9A.js";import"./index-WW_1X1qx.js";import"./utils-DxSsnXxD.js";const T=({tabs:c})=>{const{props:d}=h(),{auth:t,system:l,instructor:e,translate:i}=d,{button:o,common:u}=i;return s.jsxs("div",{className:"w-[230px]",children:[s.jsxs("div",{className:"mb-6 flex flex-col items-center",children:[s.jsx("div",{className:"h-[120px] w-[120px] overflow-hidden rounded-full",children:s.jsx("img",{alt:`${t.user.name}'s profile`,src:t.user.photo||"/assets/icons/avatar.png",className:"h-full w-full content-center object-cover"})}),s.jsx("h6",{className:"mt-8 mb-1 font-bold",children:t.user.name}),s.jsx("p",{className:"text-muted-foreground text-sm",children:t.user.email})]}),e&&e.status==="approved"&&s.jsxs(r,{variant:"ghost",className:"text-muted-foreground h-11 w-full justify-start gap-3 rounded-none px-5 py-3 text-start",onClick:()=>a.get(route("dashboard")),children:[s.jsx(g,{className:"h-4 w-4"}),s.jsx("span",{children:u.dashboard})]}),s.jsxs(f,{className:"grid h-auto grid-cols-1 gap-2 bg-transparent p-0",children:[c.map(({id:m,name:x,slug:n,Icon:p})=>s.jsxs(j,{value:n,className:"hover:bg-secondary hover:text-secondary-foreground data-[state=active]:!bg-muted data-[state=active]:!text-secondary-foreground relative flex h-10 cursor-pointer items-center justify-start gap-3 rounded-md px-4 text-start",onClick:()=>a.get(route("student.index",{tab:n})),children:[s.jsx(p,{className:"h-4 w-4"}),s.jsx("span",{children:x})]},m)),s.jsxs(r,{variant:"secondary",className:"bg-background text-primary hover:text-secondary-foreground h-10 w-full justify-start gap-3 rounded-md px-4",onClick:()=>a.post(route("logout")),children:[s.jsx(b,{className:"h-4 w-4"}),s.jsx("span",{children:o.logout})]})]}),(l.sub_type==="collaborative"&&!e||e&&e.status!=="approved")&&s.jsx(r,{variant:"outline",className:"hover:bg-background border-secondary-light mt-7 w-full",onClick:()=>a.get(route("student.index",{tab:"instructor"})),children:o.become_instructor})]})};export{T as default};
|