Pull Request branch dev-clone to main #1

Merged
gitea merged 429 commits from dev-clone into main 2024-12-23 09:31:34 +00:00
3 changed files with 76 additions and 64 deletions
Showing only changes of commit 65198c0ece - Show all commits

View File

@ -1,12 +1,14 @@
import { Button } from "@/shadcn/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from "@/shadcn/components/ui/dialog";
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/shadcn/components/ui/alert-dialog";
interface FinishAssessmentModalProps {
assessmentId: string;
@ -22,21 +24,25 @@ export default function FinishAssessmentModal({
onConfirm,
}: FinishAssessmentModalProps) {
return (
<Dialog open={opened} onOpenChange={onClose}>
<DialogContent className="max-w-md">
<DialogHeader>
<DialogTitle>Konfirmasi Selesai Asesmen</DialogTitle>
<DialogDescription>
<AlertDialog open={opened} onOpenChange={onClose}>
<AlertDialogContent className="max-w-md">
<AlertDialogHeader>
<AlertDialogTitle>Konfirmasi Selesai Asesmen</AlertDialogTitle>
<AlertDialogDescription>
Apakah Anda yakin ingin mengakhiri assessment ini? Pastikan semua jawaban sudah lengkap sebelum melanjutkan. Jika Anda sudah siap, klik 'Ya' untuk menyelesaikan.
</DialogDescription>
</DialogHeader>
<DialogFooter className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose}>
Tidak
</Button>
<Button onClick={() => onConfirm(assessmentId)}>Ya</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className="flex justify-end gap-2">
<AlertDialogCancel asChild>
<Button variant="outline" onClick={onClose}>
Tidak
</Button>
</AlertDialogCancel>
<AlertDialogAction asChild>
<Button onClick={() => onConfirm(assessmentId)}>Ya</Button>
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}

View File

@ -1,12 +1,13 @@
import { Button } from "@/shadcn/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from "@/shadcn/components/ui/dialog";
AlertDialog,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/shadcn/components/ui/alert-dialog";
interface FileSizeValidationModalProps {
opened: boolean;
@ -20,20 +21,22 @@ export default function FileSizeValidationModal({
fileName,
}: FileSizeValidationModalProps) {
return (
<Dialog open={opened} onOpenChange={onClose}>
<DialogContent className="max-w-md">
<DialogHeader>
<DialogTitle>Peringatan Ukuran File</DialogTitle>
<DialogDescription>
<AlertDialog open={opened} onOpenChange={onClose}>
<AlertDialogContent className="max-w-md">
<AlertDialogHeader>
<AlertDialogTitle>Peringatan Ukuran File</AlertDialogTitle>
<AlertDialogDescription>
Ukuran file {fileName} melebihi batas maksimum 25 MB! Silakan pilih file yang lebih kecil.
</DialogDescription>
</DialogHeader>
<DialogFooter className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose}>
Tutup
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className="flex justify-end gap-2">
<AlertDialogCancel asChild>
<Button variant="outline" onClick={onClose}>
Tutup
</Button>
</AlertDialogCancel>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}

View File

@ -1,12 +1,13 @@
import { Button } from "@/shadcn/components/ui/button";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from "@/shadcn/components/ui/dialog";
AlertDialog,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/shadcn/components/ui/alert-dialog";
interface ValidationModalProps {
opened: boolean;
@ -20,20 +21,22 @@ export default function ValidationModal({
unansweredQuestions,
}: ValidationModalProps) {
return (
<Dialog open={opened} onOpenChange={onClose}>
<DialogContent className="max-w-md">
<DialogHeader>
<DialogTitle>Peringatan</DialogTitle>
<DialogDescription>
<AlertDialog open={opened} onOpenChange={onClose}>
<AlertDialogContent className="max-w-md">
<AlertDialogHeader>
<AlertDialogTitle>Peringatan</AlertDialogTitle>
<AlertDialogDescription>
Anda mempunyai {unansweredQuestions} pertanyaan yang belum terjawab! Pastikan semua jawaban sudah lengkap sebelum melanjutkan.
</DialogDescription>
</DialogHeader>
<DialogFooter className="flex justify-end gap-2">
<Button variant="outline" onClick={onClose}>
Tutup
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className="flex justify-end gap-2">
<AlertDialogCancel asChild>
<Button variant="outline" onClick={onClose}>
Tutup
</Button>
</AlertDialogCancel>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}