create: component modal confirmation assessment for assessment management
This commit is contained in:
parent
054c20412d
commit
fdc85d6072
|
|
@ -0,0 +1,36 @@
|
|||
import { Modal, Text, Flex } from "@mantine/core";
|
||||
import { Button } from "@/shadcn/components/ui/button";
|
||||
|
||||
interface FinishAssessmentModalProps {
|
||||
assessmentId: string;
|
||||
opened: boolean;
|
||||
onClose: () => void;
|
||||
onConfirm: (assessmentId: string) => void;
|
||||
}
|
||||
|
||||
export default function FinishAssessmentModal({
|
||||
assessmentId,
|
||||
opened,
|
||||
onClose,
|
||||
onConfirm,
|
||||
}: FinishAssessmentModalProps) {
|
||||
return (
|
||||
<Modal opened={opened} onClose={onClose} title="Konfirmasi Selesai Asesmen">
|
||||
<Text>
|
||||
Apakah Anda yakin ingin mengakhiri assessment ini? Pastikan semua jawaban sudah lengkap sebelum melanjutkan. Jika Anda sudah siap, klik 'Ya' untuk menyelesaikan.
|
||||
</Text>
|
||||
<Flex gap="sm" justify="flex-end" mt="md">
|
||||
<Button variant="outline" onClick={onClose}>
|
||||
Tidak
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
onConfirm(assessmentId);
|
||||
}}
|
||||
>
|
||||
Ya
|
||||
</Button>
|
||||
</Flex>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user