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 { FormDialog } from '@/components/form-dialog';
|
||||
import InputError from '@/components/input-error';
|
||||
@ -27,6 +24,9 @@ import {
|
||||
} from '@/routes/admin/academic-classes/schedules';
|
||||
import type { Schedule } 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 = {
|
||||
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
|
||||
open={createOpen}
|
||||
onOpenChange={setCreateOpen}
|
||||
@ -163,8 +167,8 @@ export default function ScheduleIndex({
|
||||
className={cn(
|
||||
'gap-3 py-4',
|
||||
highlight ===
|
||||
schedule.id &&
|
||||
'ring-2 ring-primary',
|
||||
schedule.id &&
|
||||
'ring-2 ring-primary',
|
||||
)}
|
||||
>
|
||||
<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">
|
||||
{(schedule.start_time ||
|
||||
schedule.end_time) && (
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<Clock className="h-3.5 w-3.5 shrink-0" />
|
||||
{toTimeInput(
|
||||
schedule.start_time,
|
||||
) || '-'}{' '}
|
||||
-{' '}
|
||||
{toTimeInput(
|
||||
schedule.end_time,
|
||||
) || '-'}
|
||||
</span>
|
||||
)}
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<Clock className="h-3.5 w-3.5 shrink-0" />
|
||||
{toTimeInput(
|
||||
schedule.start_time,
|
||||
) || '-'}{' '}
|
||||
-{' '}
|
||||
{toTimeInput(
|
||||
schedule.end_time,
|
||||
) || '-'}
|
||||
</span>
|
||||
)}
|
||||
{schedule.room && (
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<MapPin className="h-3.5 w-3.5 shrink-0" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user