Anons79 Mini Shell

Directory : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/
Upload File :
Current File : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/Index-Dj-YYWJg.js

import{X as v,r as d,j as t,S as w}from"./app-CxHOVtVX.js";import{A as M}from"./AuthenticatedLayout--cmUB6oo.js";import{B as m}from"./button-Bk7o5w0i.js";import{C as b,a as S,b as k,c as B}from"./card-LSMiAnQe.js";import{B as F}from"./badge-DgYuvipX.js";import{D as z,a as H,b as I,c as L,d as T}from"./dialog-BLlwSjJY.js";import{C as _}from"./chevron-left-BKibdH7U.js";import{C as $}from"./chevron-right-Caoj2go0.js";import{C as A}from"./calendar-ClP93Df9.js";import{c as O}from"./createLucideIcon-C5q1cU9E.js";import"./utils-CytzSlOG.js";import"./dropdown-menu-DMajtl6E.js";import"./index-DHPjb6t2.js";import"./toaster-DVflDQ0a.js";import"./index-D5p3_XeN.js";import"./x-DSQmn6v7.js";import"./Combination-CdjBXhkv.js";import"./index-CoxD3u_C.js";import"./graduation-cap-Dxo2La1U.js";import"./book-open-BwBSHTmx.js";import"./award-BsWRyoup.js";/**
 * @license lucide-react v0.474.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],Y=O("Book",P);function ct({jadwals:h}){const p=v().props.auth.user,[r,l]=d.useState(new Date),[a,c]=d.useState(null),x=e=>{const o=e.getFullYear(),s=e.getMonth();return new Date(o,s+1,0).getDate()},u=e=>{const o=e.getFullYear(),s=e.getMonth();return new Date(o,s,1).getDay()},g=e=>e.toLocaleDateString("default",{month:"long",year:"numeric"}),f=()=>{const e=new Date(r);e.setMonth(e.getMonth()-1),l(e)},j=()=>{const e=new Date(r);e.setMonth(e.getMonth()+1),l(e)},y=e=>{const o=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(e).padStart(2,"0")}`;return h.filter(s=>s.course_date===o)},N=e=>{c(e)},D=()=>{const e=x(r),o=u(r),s=[];for(let n=0;n<o;n++)s.push(t.jsx("div",{className:"h-24 border border-gray-200 p-2"},`empty-${n}`));for(let n=1;n<=e;n++){const C=y(n);s.push(t.jsxs("div",{className:"h-24 border border-gray-200 p-2 hover:bg-gray-50",children:[t.jsx("div",{className:"font-medium text-sm",children:n}),t.jsx("div",{className:"mt-1 space-y-1",children:C.map(i=>t.jsx(F,{className:"w-full text-xs truncate cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>N(i),children:i.pelatihan.title},i.id))})]},n))}return s};return t.jsxs(M,{user:p,children:[t.jsx(w,{title:"Pelatihan"}),t.jsx("div",{className:"flex items-center justify-between mb-2",children:t.jsx("h1",{className:"text-lg font-bold md:text-2xl",children:"Jadwal Pelatihan"})}),t.jsxs(b,{className:"w-full ",children:[t.jsx(S,{className:"space-y-1.5",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(k,{children:g(r)}),t.jsxs("div",{className:"flex space-x-2",children:[t.jsx(m,{variant:"outline",size:"icon",onClick:f,children:t.jsx(_,{className:"h-4 w-4"})}),t.jsx(m,{variant:"outline",size:"icon",onClick:j,children:t.jsx($,{className:"h-4 w-4"})})]})]})}),t.jsxs(B,{children:[t.jsx("div",{className:"grid grid-cols-7 gap-px mb-2",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(e=>t.jsx("div",{className:"text-center font-medium py-2",children:e},e))}),t.jsx("div",{className:"grid grid-cols-7 gap-px bg-white",children:D()})]})]}),t.jsx(z,{open:!!a,onOpenChange:()=>c(null),children:t.jsx(H,{className:"sm:max-w-[425px] transition-all duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",children:t.jsxs(I,{children:[t.jsx(L,{className:"text-xl font-semibold",children:a==null?void 0:a.pelatihan.title}),t.jsx(T,{children:t.jsxs("div",{className:"mt-4 space-y-3",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(A,{className:"h-4 w-4 text-gray-500"}),t.jsx("span",{children:a==null?void 0:a.course_date})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Y,{className:"h-4 w-4 text-gray-500"}),t.jsx("span",{children:a==null?void 0:a.name})]}),t.jsx("div",{className:"pt-2 text-sm text-gray-600",children:a==null?void 0:a.description})]})})]})})})]})}export{ct as default};

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]