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

View File

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

View File

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