Compare commits
No commits in common. "a8f864aa28fbe218734379de29e752ac5d5429ce" and "02745ba207530f06654f979a6fa9561e88cc4a1e" have entirely different histories.
a8f864aa28
...
02745ba207
@ -40,20 +40,20 @@ import {
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
} from '@/components/ui/sidebar';
|
||||
import { index as feedbackRoute } from '@/routes/admin/feedback';
|
||||
import { index as academicAdvisingLogsRoute } from '@/routes/admin/services/academic-advising-logs';
|
||||
import { index as announcementsRoute } from '@/routes/admin/announcements';
|
||||
import { index as assignmentsRoute } from '@/routes/admin/academic-classes/assignments';
|
||||
import { index as attendancesRoute } from '@/routes/admin/academic-classes/attendances';
|
||||
import { index as courseClassesRoute } from '@/routes/admin/manage/course-classes';
|
||||
import { index as courseRegistrationsRoute } from '@/routes/admin/academic-classes/course-registrations';
|
||||
import { index as coursesRoute } from '@/routes/admin/manage/courses';
|
||||
import { index as letterRequestsRoute } from '@/routes/admin/services/letter-requests';
|
||||
import { index as materialsRoute } from '@/routes/admin/academic-classes/materials';
|
||||
import { index as schedulesRoute } from '@/routes/admin/academic-classes/schedules';
|
||||
import { index as announcementsRoute } from '@/routes/admin/announcements';
|
||||
import { index as feedbackRoute } from '@/routes/admin/feedback';
|
||||
import { index as tuitionInvoicesRoute } from '@/routes/admin/finances/tuition-invoices';
|
||||
import { index as courseClassesRoute } from '@/routes/admin/manage/course-classes';
|
||||
import { index as coursesRoute } from '@/routes/admin/manage/courses';
|
||||
import { index as academicTerm } from '@/routes/admin/master/academic-terms';
|
||||
import { index as departmentsRoute } from '@/routes/admin/master/departments';
|
||||
import { index as academicAdvisingLogsRoute } from '@/routes/admin/services/academic-advising-logs';
|
||||
import { index as letterRequestsRoute } from '@/routes/admin/services/letter-requests';
|
||||
import { edit as appearanceRoute } from '@/routes/admin/settings/appearance';
|
||||
import { edit as profileRoute } from '@/routes/admin/settings/profile';
|
||||
import { edit as securityRoute } from '@/routes/admin/settings/security';
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import { Check, Trash2, X } from 'lucide-react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Dialog,
|
||||
@ -16,7 +14,6 @@ type ConfirmDialogProps = {
|
||||
title: string;
|
||||
description: string;
|
||||
confirmLabel?: string;
|
||||
confirmIcon?: ReactNode;
|
||||
cancelLabel?: string;
|
||||
variant?: 'default' | 'destructive';
|
||||
onConfirm: () => void;
|
||||
@ -29,20 +26,11 @@ export function ConfirmDialog({
|
||||
title,
|
||||
description,
|
||||
confirmLabel = 'Konfirmasi',
|
||||
confirmIcon,
|
||||
cancelLabel = 'Batal',
|
||||
variant = 'destructive',
|
||||
onConfirm,
|
||||
loading = false,
|
||||
}: ConfirmDialogProps) {
|
||||
const icon =
|
||||
confirmIcon ??
|
||||
(variant === 'destructive' ? (
|
||||
<Trash2 className="h-4 w-4" />
|
||||
) : (
|
||||
<Check className="h-4 w-4" />
|
||||
));
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent>
|
||||
@ -55,7 +43,6 @@ export function ConfirmDialog({
|
||||
variant="outline"
|
||||
onClick={() => onOpenChange(false)}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
{cancelLabel}
|
||||
</Button>
|
||||
<Button
|
||||
@ -63,7 +50,6 @@ export function ConfirmDialog({
|
||||
onClick={onConfirm}
|
||||
disabled={loading}
|
||||
>
|
||||
{icon}
|
||||
{confirmLabel}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
import { Form } from '@inertiajs/react';
|
||||
import { Save, X } from 'lucide-react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import {
|
||||
Dialog,
|
||||
@ -9,6 +6,8 @@ import {
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
import { Form } from '@inertiajs/react';
|
||||
import type { ReactNode } from 'react';
|
||||
|
||||
type FormDialogProps = {
|
||||
open: boolean;
|
||||
@ -64,14 +63,12 @@ export function FormDialog({
|
||||
variant="outline"
|
||||
onClick={() => onOpenChange(false)}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
Batal
|
||||
</Button>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={processing || submitDisabled}
|
||||
>
|
||||
<Save className="h-4 w-4" />
|
||||
{processing ? submittingLabel : submitLabel}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
"use client"
|
||||
|
||||
import { Link, usePage } from "@inertiajs/react";
|
||||
import {
|
||||
SidebarGroup,
|
||||
SidebarGroupLabel,
|
||||
@ -8,6 +7,7 @@ import {
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem
|
||||
} from "@/components/ui/sidebar";
|
||||
import { Link, usePage } from "@inertiajs/react";
|
||||
|
||||
export type NavItem = {
|
||||
name: string
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import type {Icon} from "@tabler/icons-react";
|
||||
import * as React from "react"
|
||||
import { type Icon } from "@tabler/icons-react"
|
||||
|
||||
import {
|
||||
SidebarGroup,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import type { ColumnDef } from '@tanstack/react-table';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Pencil, Plus, Trash2 } from 'lucide-react';
|
||||
import { Pencil, Plus, Trash2 } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
import { DateTimeField } from '@/components/datetime-field';
|
||||
@ -161,10 +161,7 @@ export default function SubmissionIndex({
|
||||
title="Pengumpulan Tugas"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={assignmentIndex.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={assignmentIndex.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Head, Link, router } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ClipboardCheck, Pencil, Plus, Trash2, X } from 'lucide-react';
|
||||
import { ClipboardCheck, Plus, Trash2 } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -123,14 +123,10 @@ export default function AttendanceIndex({ sessions, courseClasses }: Props) {
|
||||
]).url
|
||||
}
|
||||
>
|
||||
<Pencil className="h-4 w-4" />
|
||||
Lihat / Edit
|
||||
</Link>
|
||||
) : (
|
||||
<span>
|
||||
<Pencil className="h-4 w-4" />
|
||||
Lihat / Edit
|
||||
</span>
|
||||
<span>Lihat / Edit</span>
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
@ -260,7 +256,6 @@ function NewSessionDialog({
|
||||
variant="outline"
|
||||
onClick={() => onOpenChange(false)}
|
||||
>
|
||||
<X className="h-4 w-4" />
|
||||
Batal
|
||||
</Button>
|
||||
<Button
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, CheckCircle2, Save, XCircle } from 'lucide-react';
|
||||
import { CheckCircle2, Save, XCircle } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -90,10 +90,7 @@ export default function AttendanceSession({
|
||||
title="Kehadiran"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={attendanceIndex.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={attendanceIndex.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import type { ColumnDef } from '@tanstack/react-table';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Paperclip, Pencil, Plus, Trash2 } from 'lucide-react';
|
||||
import { Paperclip, Pencil, Plus, Trash2 } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
import { DateTimeField } from '@/components/datetime-field';
|
||||
@ -176,10 +176,7 @@ export default function TuitionPaymentIndex({ invoice, payments }: Props) {
|
||||
title="Pembayaran"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={tuitionInvoiceIndex.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={tuitionInvoiceIndex.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import type { ColumnDef } from '@tanstack/react-table';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Trash2, UserPlus } from 'lucide-react';
|
||||
import { Trash2, UserPlus } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
||||
@ -109,10 +109,7 @@ export default function ClassEnrollmentIndex({
|
||||
title="Peserta Kelas"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={courseClassIndex.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={courseClassIndex.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { Form, Head, Link, usePage } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { Save } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import ProfileController from '@/actions/App/Http/Controllers/Admin/Settings/ProfileController';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
@ -369,7 +368,6 @@ export default function Profile({
|
||||
disabled={processing}
|
||||
data-test="update-profile-button"
|
||||
>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { Save } from 'lucide-react';
|
||||
import { useRef } from 'react';
|
||||
import SecurityController from '@/actions/App/Http/Controllers/Admin/Settings/SecurityController';
|
||||
import Heading from '@/components/heading';
|
||||
@ -114,7 +113,6 @@ export default function Security({ passwordRules }: Props) {
|
||||
disabled={processing}
|
||||
data-test="update-password-button"
|
||||
>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Save } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
import InputError from '@/components/input-error';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -14,6 +10,9 @@ import { PhoneInput } from '@/components/ui/phone-input';
|
||||
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { index, store } from '@/routes/admin/users/administrators';
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { useState } from 'react';
|
||||
|
||||
type Role = { id: number; name: string };
|
||||
|
||||
@ -35,10 +34,7 @@ export default function AdministratorCreate({ roles }: Props) {
|
||||
title="Tambah Administrator"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={index.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={index.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
@ -152,7 +148,6 @@ export default function AdministratorCreate({ roles }: Props) {
|
||||
|
||||
<div className="flex justify-end">
|
||||
<Button type="submit" disabled={processing}>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Save } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
import InputError from '@/components/input-error';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -14,6 +10,9 @@ import { PhoneInput } from '@/components/ui/phone-input';
|
||||
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { index, update } from '@/routes/admin/users/administrators';
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { useState } from 'react';
|
||||
|
||||
type Role = { id: number; name: string };
|
||||
|
||||
@ -46,10 +45,7 @@ export default function AdministratorEdit({ user, roles }: Props) {
|
||||
title="Edit Administrator"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={index.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={index.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
@ -163,7 +159,6 @@ export default function AdministratorEdit({ user, roles }: Props) {
|
||||
|
||||
<div className="flex justify-end">
|
||||
<Button type="submit" disabled={processing}>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import { Plus, RotateCcw } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { ConfirmDialog } from '@/components/confirm-dialog';
|
||||
import type { PaginationState } from '@/components/data-table';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
@ -15,6 +12,9 @@ import {
|
||||
edit,
|
||||
reset_password
|
||||
} from '@/routes/admin/users/administrators';
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import type { Administrator } from './columns';
|
||||
import { createAdministratorColumns } from './columns';
|
||||
|
||||
@ -135,7 +135,6 @@ export default function AdministratorIndex({ administrators }: Props) {
|
||||
: ''
|
||||
}
|
||||
confirmLabel="Reset"
|
||||
confirmIcon={<RotateCcw className="h-4 w-4" />}
|
||||
variant="default"
|
||||
onConfirm={handleResetPassword}
|
||||
/>
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Save } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
import InputError from '@/components/input-error';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -14,6 +10,9 @@ import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { index, store } from '@/routes/admin/users/lecturers';
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { useState } from 'react';
|
||||
|
||||
type Department = { id: number; name: string };
|
||||
|
||||
@ -34,10 +33,7 @@ export default function LecturerCreate({ departments }: Props) {
|
||||
title="Tambah Dosen"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={index.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={index.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
@ -166,7 +162,6 @@ export default function LecturerCreate({ departments }: Props) {
|
||||
|
||||
<div className="flex justify-end">
|
||||
<Button type="submit" disabled={processing}>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Save } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
import InputError from '@/components/input-error';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -14,6 +10,9 @@ import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { index, update } from '@/routes/admin/users/lecturers';
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { useState } from 'react';
|
||||
|
||||
type Department = { id: number; name: string };
|
||||
|
||||
@ -45,10 +44,7 @@ export default function LecturerEdit({ user, departments }: Props) {
|
||||
title="Edit Dosen"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={index.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={index.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
@ -176,7 +172,6 @@ export default function LecturerEdit({ user, departments }: Props) {
|
||||
|
||||
<div className="flex justify-end">
|
||||
<Button type="submit" disabled={processing}>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import { Plus, RotateCcw } from 'lucide-react';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { ConfirmDialog } from '@/components/confirm-dialog';
|
||||
import type { PaginationState } from '@/components/data-table';
|
||||
import { ConfirmDialog } from '@/components/confirm-dialog';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -135,7 +135,6 @@ export default function LecturerIndex({ lecturers }: Props) {
|
||||
: ''
|
||||
}
|
||||
confirmLabel="Reset"
|
||||
confirmIcon={<RotateCcw className="h-4 w-4" />}
|
||||
variant="default"
|
||||
onConfirm={handleResetPassword}
|
||||
/>
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Save } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
import InputError from '@/components/input-error';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -14,6 +10,9 @@ import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { index, store } from '@/routes/admin/users/students';
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { useState } from 'react';
|
||||
|
||||
type Department = { id: number; name: string };
|
||||
type Lecturer = { id: number; lecturer_number: string; user: { profile: { full_name: string } | null } | null };
|
||||
@ -36,10 +35,7 @@ export default function StudentCreate({ departments, lecturers }: Props) {
|
||||
title="Tambah Mahasiswa"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={index.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={index.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
@ -194,7 +190,6 @@ export default function StudentCreate({ departments, lecturers }: Props) {
|
||||
|
||||
<div className="flex justify-end">
|
||||
<Button type="submit" disabled={processing}>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { ArrowLeft, Save } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { DatePicker } from '@/components/date-picker';
|
||||
import InputError from '@/components/input-error';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -14,6 +10,9 @@ import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { index, update } from '@/routes/admin/users/students';
|
||||
import { Form, Head } from '@inertiajs/react';
|
||||
import { format } from 'date-fns';
|
||||
import { useState } from 'react';
|
||||
|
||||
type Department = { id: number; name: string };
|
||||
type Lecturer = { id: number; lecturer_number: string; user: { profile: { full_name: string } | null } | null };
|
||||
@ -47,10 +46,7 @@ export default function StudentEdit({ user, departments, lecturers }: Props) {
|
||||
title="Edit Mahasiswa"
|
||||
actions={
|
||||
<Button variant="outline" asChild>
|
||||
<a href={index.url()}>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
Kembali
|
||||
</a>
|
||||
<a href={index.url()}>Kembali</a>
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
@ -220,7 +216,6 @@ export default function StudentEdit({ user, departments, lecturers }: Props) {
|
||||
|
||||
<div className="flex justify-end">
|
||||
<Button type="submit" disabled={processing}>
|
||||
<Save className="h-4 w-4" />
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Head, router } from '@inertiajs/react';
|
||||
import { Plus, RotateCcw } from 'lucide-react';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import { ConfirmDialog } from '@/components/confirm-dialog';
|
||||
import type { PaginationState } from '@/components/data-table';
|
||||
import { ConfirmDialog } from '@/components/confirm-dialog';
|
||||
import { DataTable } from '@/components/data-table';
|
||||
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
||||
import { PageHeader } from '@/components/page-header';
|
||||
@ -15,8 +15,7 @@ import {
|
||||
reset_password,
|
||||
index as studentsIndex,
|
||||
} from '@/routes/admin/users/students';
|
||||
import { createStudentColumns } from './columns';
|
||||
import type {Student} from './columns';
|
||||
import { createStudentColumns, type Student } from './columns';
|
||||
|
||||
type Props = {
|
||||
students: {
|
||||
@ -135,7 +134,6 @@ export default function StudentIndex({ students }: Props) {
|
||||
: ''
|
||||
}
|
||||
confirmLabel="Reset"
|
||||
confirmIcon={<RotateCcw className="h-4 w-4" />}
|
||||
variant="default"
|
||||
onConfirm={handleResetPassword}
|
||||
/>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user