feat: reorganize imports and enhance schedule index layout with additional instructions
This commit is contained in:
parent
a702b506fd
commit
ef3988f734
@ -1,6 +1,3 @@
|
|||||||
import { Head, router } from '@inertiajs/react';
|
|
||||||
import { Clock, MapPin, Pencil, Plus, Trash2, Video } from 'lucide-react';
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
||||||
import { FormDialog } from '@/components/form-dialog';
|
import { FormDialog } from '@/components/form-dialog';
|
||||||
import InputError from '@/components/input-error';
|
import InputError from '@/components/input-error';
|
||||||
@ -27,6 +24,9 @@ import {
|
|||||||
} from '@/routes/admin/academic-classes/schedules';
|
} from '@/routes/admin/academic-classes/schedules';
|
||||||
import type { Schedule } from '@/types/schedule';
|
import type { Schedule } from '@/types/schedule';
|
||||||
import { DayOfWeekLabels, DaysOfWeek } from '@/types/schedule';
|
import { DayOfWeekLabels, DaysOfWeek } from '@/types/schedule';
|
||||||
|
import { Head, router } from '@inertiajs/react';
|
||||||
|
import { Clock, MapPin, Pencil, Plus, Trash2, Video } from 'lucide-react';
|
||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
type CourseClassOption = {
|
type CourseClassOption = {
|
||||||
id: number;
|
id: number;
|
||||||
@ -108,6 +108,10 @@ export default function ScheduleIndex({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<p className="hidden text-xs text-muted-foreground md:block">
|
||||||
|
Geser ke samping untuk melihat hari lainnya.
|
||||||
|
</p>
|
||||||
|
|
||||||
<CreateForm
|
<CreateForm
|
||||||
open={createOpen}
|
open={createOpen}
|
||||||
onOpenChange={setCreateOpen}
|
onOpenChange={setCreateOpen}
|
||||||
@ -163,8 +167,8 @@ export default function ScheduleIndex({
|
|||||||
className={cn(
|
className={cn(
|
||||||
'gap-3 py-4',
|
'gap-3 py-4',
|
||||||
highlight ===
|
highlight ===
|
||||||
schedule.id &&
|
schedule.id &&
|
||||||
'ring-2 ring-primary',
|
'ring-2 ring-primary',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<CardHeader className="flex flex-row items-start justify-between gap-2 px-4">
|
<CardHeader className="flex flex-row items-start justify-between gap-2 px-4">
|
||||||
@ -209,17 +213,17 @@ export default function ScheduleIndex({
|
|||||||
<CardContent className="flex flex-col gap-1.5 px-4 text-xs text-muted-foreground">
|
<CardContent className="flex flex-col gap-1.5 px-4 text-xs text-muted-foreground">
|
||||||
{(schedule.start_time ||
|
{(schedule.start_time ||
|
||||||
schedule.end_time) && (
|
schedule.end_time) && (
|
||||||
<span className="inline-flex items-center gap-1.5">
|
<span className="inline-flex items-center gap-1.5">
|
||||||
<Clock className="h-3.5 w-3.5 shrink-0" />
|
<Clock className="h-3.5 w-3.5 shrink-0" />
|
||||||
{toTimeInput(
|
{toTimeInput(
|
||||||
schedule.start_time,
|
schedule.start_time,
|
||||||
) || '-'}{' '}
|
) || '-'}{' '}
|
||||||
-{' '}
|
-{' '}
|
||||||
{toTimeInput(
|
{toTimeInput(
|
||||||
schedule.end_time,
|
schedule.end_time,
|
||||||
) || '-'}
|
) || '-'}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{schedule.room && (
|
{schedule.room && (
|
||||||
<span className="inline-flex items-center gap-1.5">
|
<span className="inline-flex items-center gap-1.5">
|
||||||
<MapPin className="h-3.5 w-3.5 shrink-0" />
|
<MapPin className="h-3.5 w-3.5 shrink-0" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user