diff --git a/src/components/common/NavBar.tsx b/src/components/common/NavBar.tsx index ac3b1df..0f9783e 100644 --- a/src/components/common/NavBar.tsx +++ b/src/components/common/NavBar.tsx @@ -19,7 +19,7 @@ import { DropdownMenuTrigger, } from '../ui/DropdownMenu'; import { Avatar, AvatarFallback, AvatarImage } from '../ui/Avatar.tsx'; -import RoleBadge from '../ui/RoleBadge.tsx'; +import RoleBadge from '../ui/RoleBadge/RoleBadge.tsx'; import { useAuth } from '../../hooks/useAuth'; import Button from '../ui/Button/Button'; import { AdminControls } from './navBar/AdminControls.tsx'; diff --git a/src/components/landing/TrendingCourses.tsx b/src/components/landing/TrendingCourses.tsx index c722112..af7d977 100644 --- a/src/components/landing/TrendingCourses.tsx +++ b/src/components/landing/TrendingCourses.tsx @@ -1,5 +1,5 @@ import { useTrendingCourses } from '../../hooks/useCourses.ts'; -import CoursePreviewCard from '../ui/CoursePreviewCard.tsx'; +import CoursePreviewCard from '../ui/CoursePreviewCard/CoursePreviewCard.tsx'; import { useState, useEffect, useMemo } from 'react'; export function TrendingCourses() { diff --git a/src/components/professor/courseEditor/CourseHeader.tsx b/src/components/professor/courseEditor/CourseHeader.tsx index d45d97d..4895841 100644 --- a/src/components/professor/courseEditor/CourseHeader.tsx +++ b/src/components/professor/courseEditor/CourseHeader.tsx @@ -1,7 +1,7 @@ import { Link, useNavigate } from 'react-router-dom'; import Button from '../../ui/Button/Button'; import SaveStatus from './SaveStatus'; -import Switch from '../../ui/Switch'; +import Switch from '../../ui/Swtich/Switch'; import { ArrowLeft, Edit, Eye, FileText, HelpCircle } from 'lucide-react'; interface CourseHeaderProps { diff --git a/src/components/professor/courseEditor/UnitContent.tsx b/src/components/professor/courseEditor/UnitContent.tsx index 8b666d1..ad6b01a 100644 --- a/src/components/professor/courseEditor/UnitContent.tsx +++ b/src/components/professor/courseEditor/UnitContent.tsx @@ -16,7 +16,7 @@ import { Eye, Edit2, } from 'lucide-react'; -import DocumentViewer from '../../ui/DocumentViewer'; +import DocumentViewer from '../../ui/DocumentViewer/DocumentViewer'; import UnitEditor from '../../landing/UnitEditor'; // import ActivityCard from '../../landing/professorCourseEdition/ActivityCard'; // Obsoleto, ahora usamos questions import type { Block } from '@blocknote/core'; diff --git a/src/components/professor/courseEditor/modals/CourseConfigModal.tsx b/src/components/professor/courseEditor/modals/CourseConfigModal.tsx index 6cf2f1c..96af8fc 100644 --- a/src/components/professor/courseEditor/modals/CourseConfigModal.tsx +++ b/src/components/professor/courseEditor/modals/CourseConfigModal.tsx @@ -1,9 +1,9 @@ import { Dialog, DialogHeader, DialogTitle } from '../../../ui/Dialog'; import Input from '../../../ui/Input/Input'; -import Label from '../../../ui/Label'; +import Label from '../../../ui/Label/Label'; import Textarea from '../../../ui/TextArea/TextArea'; -import Select from '../../../ui/Select'; -import Switch from '../../../ui/Switch'; +import Select from '../../../ui/Select/Select'; +import Switch from '../../../ui/Swtich/Switch'; import Button from '../../../ui/Button/Button'; interface CourseConfig { diff --git a/src/components/professor/institutionManagement/modals/CreateInstitutionModal.tsx b/src/components/professor/institutionManagement/modals/CreateInstitutionModal.tsx index e63c484..52517d4 100644 --- a/src/components/professor/institutionManagement/modals/CreateInstitutionModal.tsx +++ b/src/components/professor/institutionManagement/modals/CreateInstitutionModal.tsx @@ -2,7 +2,7 @@ import { useState, useMemo } from 'react'; import { useForm } from 'react-hook-form'; import { valibotResolver } from '@hookform/resolvers/valibot'; import * as v from 'valibot'; -import Modal from '../../../ui/Modal'; +import Modal from '../../../ui/Modal/Modal'; import Button from '../../../ui/Button/Button'; import Input from '../../../ui/Input/Input'; import Textarea from '../../../ui/TextArea/TextArea'; diff --git a/src/components/professor/institutionManagement/modals/EditInstitutionModal.tsx b/src/components/professor/institutionManagement/modals/EditInstitutionModal.tsx index cfd98eb..99ef0f6 100644 --- a/src/components/professor/institutionManagement/modals/EditInstitutionModal.tsx +++ b/src/components/professor/institutionManagement/modals/EditInstitutionModal.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { useForm } from 'react-hook-form'; import { valibotResolver } from '@hookform/resolvers/valibot'; import * as v from 'valibot'; -import Modal from '../../../ui/Modal'; +import Modal from '../../../ui/Modal/Modal'; import Button from '../../../ui/Button/Button'; import Input from '../../../ui/Input/Input'; import Textarea from '../../../ui/TextArea/TextArea'; diff --git a/src/components/professor/institutionManagement/modals/JoinInstitutionModal.tsx b/src/components/professor/institutionManagement/modals/JoinInstitutionModal.tsx index 6a04fa3..483a40c 100644 --- a/src/components/professor/institutionManagement/modals/JoinInstitutionModal.tsx +++ b/src/components/professor/institutionManagement/modals/JoinInstitutionModal.tsx @@ -1,5 +1,5 @@ import { useState, useMemo } from 'react'; -import Modal from '../../../ui/Modal'; +import Modal from '../../../ui/Modal/Modal'; import Button from '../../../ui/Button/Button'; import Input from '../../../ui/Input/Input'; import { Building2, Search, Users, AlertCircle, Send } from 'lucide-react'; diff --git a/src/components/student/MaterialsList.tsx b/src/components/student/MaterialsList.tsx index 354527b..aaa82ea 100644 --- a/src/components/student/MaterialsList.tsx +++ b/src/components/student/MaterialsList.tsx @@ -3,7 +3,7 @@ import type { Material } from '../../types/entities'; import Button from '../ui/Button/Button'; import { Card, CardContent, CardHeader, CardTitle } from '../ui/Card'; import { useState } from 'react'; -import DocumentViewer from '../ui/DocumentViewer'; +import DocumentViewer from '../ui/DocumentViewer/DocumentViewer'; interface MaterialsListProps { materials: Material[]; diff --git a/src/components/student/StudentAppealsHistory.tsx b/src/components/student/StudentAppealsHistory.tsx index 6a43af9..c903ee8 100644 --- a/src/components/student/StudentAppealsHistory.tsx +++ b/src/components/student/StudentAppealsHistory.tsx @@ -6,7 +6,7 @@ import { Dialog, DialogHeader, DialogTitle } from '../ui/Dialog'; import { FileText, Calendar, Eye, GraduationCap, ExternalLink } from 'lucide-react'; import { useMyAppeals } from '../../hooks/useAppeals'; import type { Appeal } from '../../types/entities'; -import DocumentViewer from '../ui/DocumentViewer'; +import DocumentViewer from '../ui/DocumentViewer/DocumentViewer'; export default function StudentAppealsHistory() { const { data: appeals, isLoading, isError } = useMyAppeals(); diff --git a/src/components/ui/Button/Button.stories.tsx b/src/components/ui/Button/Button.stories.tsx index 892d7d2..5e1b96b 100644 --- a/src/components/ui/Button/Button.stories.tsx +++ b/src/components/ui/Button/Button.stories.tsx @@ -1,4 +1,3 @@ -// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, nextjs-vite, etc. import type { Meta, StoryObj } from '@storybook/react-vite'; import Button from './Button'; diff --git a/src/components/ui/CoursePreviewCard/CoursePreviewCard.stories.tsx b/src/components/ui/CoursePreviewCard/CoursePreviewCard.stories.tsx new file mode 100644 index 0000000..b497b48 --- /dev/null +++ b/src/components/ui/CoursePreviewCard/CoursePreviewCard.stories.tsx @@ -0,0 +1,117 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; +import CoursePreviewCard from './CoursePreviewCard'; +import { BrowserRouter } from 'react-router-dom'; +import type { Course } from '../../../types/entities'; + +/** + * Mock data representing a Course. + * We use 'as unknown as Course' to satisfy strict TypeScript checks + * regarding deep nested interfaces (like Student[], Unit[], etc.) + * without having to mock every single property of the database schema. + */ +const mockCourse = { + id: 'course_123', + name: 'Introduction to React & Modern UI', + description: 'Learn how to build modern interfaces, reusable components, and manage global state with 2024 best practices.', + imageUrl: 'https://images.unsplash.com/photo-1633356122544-f134324a6cee?q=80&w=1000&auto=format&fit=crop', + isFree: false, + priceInCents: 2999, // $29.99 + status: 'published', // Mandatory field based on your interface + + // Nested Objects Mocking + courseType: { id: 'type_1', name: 'Frontend Development' }, + + // Assuming Professor interface structure based on usage + professor: { + id: 'prof_1', + user: { name: 'Elena', surname: 'Torres' }, + institution: { id: 'inst_1', name: 'Tech University' } + }, + + // Optional root institution + institution: { id: 'inst_1', name: 'Tech University' }, + + // Arrays + studentsCount: 342, + students: [], + units: [{}, {}, {}, {}, {}], // Dummy units for length count + + createdAt: new Date(), + updatedAt: new Date(), +} as unknown as Course; + +const meta = { + title: 'Components/ui/CoursePreviewCard', + component: CoursePreviewCard, + parameters: { + layout: 'centered', + }, + decorators: [ + (Story) => ( + +
+ +
+
+ ), + ], + tags: ['autodocs'], + argTypes: { + hideButton: { control: 'boolean', description: 'Hides the call-to-action button' }, + hideInstructor: { control: 'boolean', description: 'Hides the instructor information' }, + course: { control: 'object', description: 'Full course object' }, + }, +} satisfies Meta; + +export default meta; +type Story = StoryObj + +// --- Stories --- + +export const Default: Story = { + args: { + course: mockCourse, + }, +}; + +export const FreeCourse: Story = { + args: { + // We spread the mock and cast again to ensure it fits the Course type + course: { + ...mockCourse, + name: 'Programming Fundamentals', + isFree: true, + priceInCents: 0, + } as unknown as Course, + }, +}; + +export const CreationPreview: Story = { + args: { + // Individual props mode (No course object passed) + name: 'Draft Course Title', + description: 'This is a description being typed by the professor in real-time to preview the card appearance...', + imageUrl: 'https://images.unsplash.com/photo-1516321318423-f06f85e504b3?q=80&w=1000&auto=format&fit=crop', + isFree: false, + price: 45.50, + courseType: { id: '2', name: 'UX/UI Design' }, + }, +}; + +export const NoImage: Story = { + args: { + course: { + ...mockCourse, + imageUrl: null as unknown as string, // Force null for visual test + name: 'Course without cover image', + } as unknown as Course, + }, +}; + +export const Minimal: Story = { + args: { + course: mockCourse, + hideButton: true, + hideInstructor: true, + }, +}; \ No newline at end of file diff --git a/src/components/ui/CoursePreviewCard.tsx b/src/components/ui/CoursePreviewCard/CoursePreviewCard.tsx similarity index 93% rename from src/components/ui/CoursePreviewCard.tsx rename to src/components/ui/CoursePreviewCard/CoursePreviewCard.tsx index 86a5205..0fbd661 100644 --- a/src/components/ui/CoursePreviewCard.tsx +++ b/src/components/ui/CoursePreviewCard/CoursePreviewCard.tsx @@ -6,13 +6,13 @@ import { CardHeader, CardTitle, CardDescription, -} from './Card'; -import Badge from './Badge/Badge'; -import Button from './Button/Button'; -import type { Course, CourseType } from '../../types/entities'; -import { cn } from '../../lib/utils'; +} from '../Card'; +import Badge from '../Badge/Badge'; +import Button from '../Button/Button'; +import type { Course, CourseType } from '../../../types/entities'; +import { cn } from '../../../lib/utils'; import { Link } from 'react-router-dom'; -import { formatCurrency } from '../../lib/currency'; +import { formatCurrency } from '../../../lib/currency'; interface BasePreviewCardProps extends React.HTMLAttributes { hideButton?: boolean; @@ -42,6 +42,9 @@ interface IndividualPropsPreview extends BasePreviewCardProps { type CoursePreviewCardProps = CourseObjectProps | IndividualPropsPreview; +/** + *This component displays a preview card for a course. It can accept either a full + */ const CoursePreviewCard = React.forwardRef( ({ course, name, description, imageUrl, isFree, price, courseType, hideButton = false, hideInstructor = false, className, ...props }, ref) => { diff --git a/src/components/ui/DocumentViewer/DocumentViewer.stories.tsx b/src/components/ui/DocumentViewer/DocumentViewer.stories.tsx index 0a9ac42..01aeb57 100644 --- a/src/components/ui/DocumentViewer/DocumentViewer.stories.tsx +++ b/src/components/ui/DocumentViewer/DocumentViewer.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from '@storybook/react-vite'; -import DocumentViewer from '../DocumentViewer'; +import DocumentViewer from './DocumentViewer'; const meta = { title: 'Components/ui/DocumentViewer', diff --git a/src/components/ui/DocumentViewer.tsx b/src/components/ui/DocumentViewer/DocumentViewer.tsx similarity index 96% rename from src/components/ui/DocumentViewer.tsx rename to src/components/ui/DocumentViewer/DocumentViewer.tsx index ad36c9f..e304982 100644 --- a/src/components/ui/DocumentViewer.tsx +++ b/src/components/ui/DocumentViewer/DocumentViewer.tsx @@ -1,6 +1,6 @@ import ReactDOM from 'react-dom'; import { X } from 'lucide-react'; -import Button from './Button/Button.tsx'; +import Button from '../Button/Button.tsx'; interface DocumentViewerProps { url: string; diff --git a/src/components/ui/Label/Label.stories.tsx b/src/components/ui/Label/Label.stories.tsx new file mode 100644 index 0000000..9029734 --- /dev/null +++ b/src/components/ui/Label/Label.stories.tsx @@ -0,0 +1,18 @@ +// Replace your-framework with the framework you are using, e.g. react-vite, nextjs, nextjs-vite, etc. +import type { Meta, StoryObj } from '@storybook/react-vite'; + +import Label from './Label'; + +const meta = { + component: Label, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + children:"Label Component", + id: "label-story" + }, +}; \ No newline at end of file diff --git a/src/components/ui/Label.tsx b/src/components/ui/Label/Label.tsx similarity index 96% rename from src/components/ui/Label.tsx rename to src/components/ui/Label/Label.tsx index 32b8605..a22fea3 100644 --- a/src/components/ui/Label.tsx +++ b/src/components/ui/Label/Label.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { cn } from '../../lib/utils'; +import { cn } from '../../../lib/utils'; /** * @typedef {object} LabelProps diff --git a/src/components/ui/Modal/Modal.stories.tsx b/src/components/ui/Modal/Modal.stories.tsx new file mode 100644 index 0000000..bb3b248 --- /dev/null +++ b/src/components/ui/Modal/Modal.stories.tsx @@ -0,0 +1,21 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; + +import Modal from './Modal'; + +const meta = { + component: Modal, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + isOpen: true, + onClose: () => {}, + title: "Modal Title", + children:
This is the modal content.
, + size: 'lg', + + }, +}; \ No newline at end of file diff --git a/src/components/ui/Modal.tsx b/src/components/ui/Modal/Modal.tsx similarity index 96% rename from src/components/ui/Modal.tsx rename to src/components/ui/Modal/Modal.tsx index f29df68..5e9952b 100644 --- a/src/components/ui/Modal.tsx +++ b/src/components/ui/Modal/Modal.tsx @@ -9,6 +9,9 @@ interface ModalProps { size?: 'sm' | 'md' | 'lg' | 'xl'; } +/** + * A reusable modal component with customizable size and close functionality. + */ export default function Modal({ isOpen, onClose, title, children, size = 'lg' }: ModalProps) { const modalRef = useRef(null); diff --git a/src/components/ui/ProfileField/ProfileField.stories.tsx b/src/components/ui/ProfileField/ProfileField.stories.tsx new file mode 100644 index 0000000..f4b4f39 --- /dev/null +++ b/src/components/ui/ProfileField/ProfileField.stories.tsx @@ -0,0 +1,20 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; + +import ProfileField from './ProfileField'; + +const meta = { + component: ProfileField, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + isEditing: false, + label: "User Name", + value: "", + icon: 👤, + + }, +}; \ No newline at end of file diff --git a/src/components/ui/ProfileField.tsx b/src/components/ui/ProfileField/ProfileField.tsx similarity index 76% rename from src/components/ui/ProfileField.tsx rename to src/components/ui/ProfileField/ProfileField.tsx index eee0454..f32eb43 100644 --- a/src/components/ui/ProfileField.tsx +++ b/src/components/ui/ProfileField/ProfileField.tsx @@ -1,11 +1,16 @@ import React from 'react'; -import Input, { type InputProps } from './Input/Input'; +import Input, { type InputProps } from '../Input/Input'; interface ProfileFieldProps extends InputProps { isEditing: boolean; icon: React.ReactNode; } +/** + * A component that displays a profile field which can be either in view mode or edit mode. + * + * @param {ProfileFieldProps} props - The properties to configure the ProfileField component. + */ const ProfileField = React.forwardRef( ({ isEditing, icon, label, value, ...props }, ref) => { if (isEditing) { diff --git a/src/components/ui/RoleBadge/RoleBadge.stories.tsx b/src/components/ui/RoleBadge/RoleBadge.stories.tsx new file mode 100644 index 0000000..fc10f10 --- /dev/null +++ b/src/components/ui/RoleBadge/RoleBadge.stories.tsx @@ -0,0 +1,28 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; +import RoleBadge from './RoleBadge'; + +const meta = { + component: RoleBadge, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Professor: Story = { + args: { + role: 'professor', + }, +}; + +export const Student: Story = { + args: { + role: 'student', + }, +}; + +export const Admin: Story = { + args: { + role: 'admin', + }, +}; + diff --git a/src/components/ui/RoleBadge.tsx b/src/components/ui/RoleBadge/RoleBadge.tsx similarity index 83% rename from src/components/ui/RoleBadge.tsx rename to src/components/ui/RoleBadge/RoleBadge.tsx index 08d9d0d..9466296 100644 --- a/src/components/ui/RoleBadge.tsx +++ b/src/components/ui/RoleBadge/RoleBadge.tsx @@ -1,11 +1,14 @@ -import Badge from './Badge/Badge'; +import Badge from '../Badge/Badge'; import { Shield, GraduationCap } from 'lucide-react'; -import type { UserRole } from '../../types/entities'; +import type { UserRole } from '../../../types/entities'; interface RoleBadgeProps { role: UserRole; } +/** + * RoleBadge component to display user roles with specific styles and icons. + */ const RoleBadge = ({ role }: RoleBadgeProps) => { switch (role) { case 'admin': diff --git a/src/components/ui/Select/Select.stories.tsx b/src/components/ui/Select/Select.stories.tsx new file mode 100644 index 0000000..d2407d4 --- /dev/null +++ b/src/components/ui/Select/Select.stories.tsx @@ -0,0 +1,22 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; + +import Select from './Select'; + +const meta = { + component: Select, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + id: 'example-select', + label: 'Example Select', + children: (<> + + + + ), + }, +}; \ No newline at end of file diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select/Select.tsx similarity index 97% rename from src/components/ui/Select.tsx rename to src/components/ui/Select/Select.tsx index 523c77d..fbbd7a6 100644 --- a/src/components/ui/Select.tsx +++ b/src/components/ui/Select/Select.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { cn } from '../../lib/utils'; +import { cn } from '../../../lib/utils'; /** * Props for the Select component. diff --git a/src/components/ui/Switch.tsx b/src/components/ui/Swtich/Switch.tsx similarity index 95% rename from src/components/ui/Switch.tsx rename to src/components/ui/Swtich/Switch.tsx index 2c36d05..f7c1a1e 100644 --- a/src/components/ui/Switch.tsx +++ b/src/components/ui/Swtich/Switch.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { cn } from '../../lib/utils'; +import { cn } from '../../../lib/utils'; type SwitchProps = React.InputHTMLAttributes; diff --git a/src/components/ui/Swtich/Swtich.stories.tsx b/src/components/ui/Swtich/Swtich.stories.tsx new file mode 100644 index 0000000..ef4b2b5 --- /dev/null +++ b/src/components/ui/Swtich/Swtich.stories.tsx @@ -0,0 +1,17 @@ +import type { Meta, StoryObj } from '@storybook/react-vite'; + +import Switch from './Switch'; + +const meta = { + component: Switch, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Primary: Story = { + args: { + id: 'example-switch', + checked: false + }, +}; \ No newline at end of file diff --git a/src/pages/Admin/ProfessorAppealsPage.tsx b/src/pages/Admin/ProfessorAppealsPage.tsx index ba80cee..3d25841 100644 --- a/src/pages/Admin/ProfessorAppealsPage.tsx +++ b/src/pages/Admin/ProfessorAppealsPage.tsx @@ -9,7 +9,7 @@ import { } from '../../components/ui/Card'; import { Dialog, DialogHeader, DialogTitle } from '../../components/ui/Dialog'; import StatusBadge from '../../components/ui/StatusBadge/StatusBadge'; -import DocumentViewer from '../../components/ui/DocumentViewer'; +import DocumentViewer from '../../components/ui/DocumentViewer/DocumentViewer.tsx'; import { Check, X, diff --git a/src/pages/Course/CourseListPage.tsx b/src/pages/Course/CourseListPage.tsx index b9d7b34..9474b3b 100644 --- a/src/pages/Course/CourseListPage.tsx +++ b/src/pages/Course/CourseListPage.tsx @@ -1,15 +1,15 @@ import { useState } from 'react'; import { useNavigate, useSearchParams } from 'react-router-dom'; import CardList from '../../components/ui/CardList/CardList.tsx'; -import CoursePreviewCard from '../../components/ui/CoursePreviewCard.tsx'; +import CoursePreviewCard from '../../components/ui/CoursePreviewCard/CoursePreviewCard.tsx'; import type { SearchCoursesParams } from '../../types/shared.ts'; import { useSearchCourses } from '../../hooks/useCourses.ts'; import { useCourseTypes } from '../../hooks/useCourseTypes.ts'; import { useInstitutions } from '../../hooks/useInstitutionMutations.ts'; import Input from '../../components/ui/Input/Input.tsx'; -import Select from '../../components/ui/Select.tsx'; -import Switch from '../../components/ui/Switch.tsx'; -import Label from '../../components/ui/Label.tsx'; +import Select from '../../components/ui/Select/Select.tsx'; +import Switch from '../../components/ui/Swtich/Switch.tsx'; +import Label from '../../components/ui/Label/Label.tsx'; import Button from '../../components/ui/Button/Button.tsx'; import { Search, LayoutGrid, List } from 'lucide-react'; import { useDebounce } from '../../hooks/useDebounce.ts'; diff --git a/src/pages/Professor/ProfessorAppeal.tsx b/src/pages/Professor/ProfessorAppeal.tsx index 2bb353b..b32a0a0 100644 --- a/src/pages/Professor/ProfessorAppeal.tsx +++ b/src/pages/Professor/ProfessorAppeal.tsx @@ -7,7 +7,7 @@ import Button from "../../components/ui/Button/Button" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../components/ui/Card" import Input from "../../components/ui/Input/Input" import Textarea from "../../components/ui/TextArea/TextArea" -import Label from "../../components/ui/Label" +import Label from "../../components/ui/Label/Label" import { BookOpen, ArrowLeft, GraduationCap, Upload } from "lucide-react" import { useCreateAppeal } from '../../hooks/useCreateAppeal' import { useMyAppeals } from "../../hooks/useAppeals" diff --git a/src/pages/Professor/ProfessorAppealStatusPage.tsx b/src/pages/Professor/ProfessorAppealStatusPage.tsx index b1c388c..b1ea43b 100644 --- a/src/pages/Professor/ProfessorAppealStatusPage.tsx +++ b/src/pages/Professor/ProfessorAppealStatusPage.tsx @@ -5,7 +5,7 @@ import { Card } from '../../components/ui/Card'; import StatusBadge from '../../components/ui/StatusBadge/StatusBadge'; import Button from '../../components/ui/Button/Button'; import { Dialog, DialogHeader, DialogTitle } from '../../components/ui/Dialog'; -import DocumentViewer from '../../components/ui/DocumentViewer'; +import DocumentViewer from '../../components/ui/DocumentViewer/DocumentViewer'; import { ArrowLeft, Calendar, Eye, GraduationCap, ExternalLink, Info } from 'lucide-react'; import type { Appeal } from '../../types/entities'; diff --git a/src/pages/Professor/ProfessorAssessmentEditor.tsx b/src/pages/Professor/ProfessorAssessmentEditor.tsx index 1f3dca9..6aa8efa 100644 --- a/src/pages/Professor/ProfessorAssessmentEditor.tsx +++ b/src/pages/Professor/ProfessorAssessmentEditor.tsx @@ -10,9 +10,9 @@ import Button from '../../components/ui/Button/Button'; import { Card } from '../../components/ui/Card'; import Input from '../../components/ui/Input/Input'; import TextArea from '../../components/ui/TextArea/TextArea'; -import Select from '../../components/ui/Select'; -import Switch from '../../components/ui/Switch'; -import Label from '../../components/ui/Label'; +import Select from '../../components/ui/Select/Select'; +import Switch from '../../components/ui/Swtich/Switch'; +import Label from '../../components/ui/Label/Label'; import QuestionSelector from '../../components/professor/assessments/QuestionSelector'; import { ArrowLeft, Save, Plus, Trash2 } from 'lucide-react'; import type { diff --git a/src/pages/Professor/ProfessorAssessmentsPage.tsx b/src/pages/Professor/ProfessorAssessmentsPage.tsx index 45992d4..458cda8 100644 --- a/src/pages/Professor/ProfessorAssessmentsPage.tsx +++ b/src/pages/Professor/ProfessorAssessmentsPage.tsx @@ -7,7 +7,7 @@ import { } from '../../hooks/useAssessments'; import Button from '../../components/ui/Button/Button'; import { Card } from '../../components/ui/Card'; -import Select from '../../components/ui/Select'; +import Select from '../../components/ui/Select/Select'; import { Clock, FileText, diff --git a/src/pages/Professor/ProfessorCourseCreation.tsx b/src/pages/Professor/ProfessorCourseCreation.tsx index eb18c27..eb2d219 100644 --- a/src/pages/Professor/ProfessorCourseCreation.tsx +++ b/src/pages/Professor/ProfessorCourseCreation.tsx @@ -6,10 +6,10 @@ import Button from "../../components/ui/Button/Button.tsx"; import { Card, CardContent, CardHeader, CardTitle } from "../../components/ui/Card.tsx"; import Input from "../../components/ui/Input/Input.tsx"; import Textarea from "../../components/ui/TextArea/TextArea.tsx"; -import CoursePreviewCard from "../../components/ui/CoursePreviewCard.tsx"; -import Switch from "../../components/ui/Switch.tsx"; -import Label from "../../components/ui/Label.tsx"; -import Select from "../../components/ui/Select.tsx"; +import CoursePreviewCard from "../../components/ui/CoursePreviewCard/CoursePreviewCard.tsx"; +import Switch from "../../components/ui/Swtich/Switch.tsx"; +import Label from "../../components/ui/Label/Label.tsx"; +import Select from "../../components/ui/Select/Select.tsx"; import { useCourseTypes } from "../../hooks/useCourseTypes.ts"; import { useCreateCourse } from "../../hooks/useCourses.ts"; import * as v from 'valibot'; diff --git a/src/pages/Professor/ProfessorCoursesPage.tsx b/src/pages/Professor/ProfessorCoursesPage.tsx index a7af910..65e2fba 100644 --- a/src/pages/Professor/ProfessorCoursesPage.tsx +++ b/src/pages/Professor/ProfessorCoursesPage.tsx @@ -3,7 +3,7 @@ import Button from '../../components/ui/Button/Button'; import Badge from '../../components/ui/Badge/Badge.tsx'; import { Edit, Plus, Star } from 'lucide-react'; import { useProfessorCourses } from '../../hooks/useCourses.ts'; -import CoursePreviewCard from '../../components/ui/CoursePreviewCard'; +import CoursePreviewCard from '../../components/ui/CoursePreviewCard/CoursePreviewCard.tsx'; const ProfessorCoursesPage = () => { const { data: courses, isLoading, error } = useProfessorCourses(); diff --git a/src/pages/User/ProfilePage.tsx b/src/pages/User/ProfilePage.tsx index fe76f36..0b7c065 100644 --- a/src/pages/User/ProfilePage.tsx +++ b/src/pages/User/ProfilePage.tsx @@ -11,7 +11,7 @@ import { CardTitle, } from "../../components/ui/Card"; import Button from "../../components/ui/Button/Button"; -import ProfileField from "../../components/ui/ProfileField"; +import ProfileField from "../../components/ui/ProfileField/ProfileField"; import { Tabs, TabsContent, @@ -40,7 +40,7 @@ import { import { useAuth } from "../../hooks/useAuth"; import { useUpdateProfile } from "../../hooks/useUserMutations"; import { isAxiosError } from "axios"; -import RoleBadge from "../../components/ui/RoleBadge"; +import RoleBadge from "../../components/ui/RoleBadge/RoleBadge"; import ProfessorProfileTab from "./ProfessorProfileTab"; import StudentAppealsHistory from "../../components/student/StudentAppealsHistory";