diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/RejectSelectedModal.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/RejectSelectedModal.tsx new file mode 100644 index 000000000..954cb59b4 --- /dev/null +++ b/apps/web/app/[locale]/timesheet/[memberId]/components/RejectSelectedModal.tsx @@ -0,0 +1,82 @@ +import { clsxm } from "@/app/utils"; +import { Modal } from "@/lib/components"; +import { useState } from "react"; +export interface IRejectSelectedModalProps { + isOpen: boolean; + closeModal: () => void; + onReject: (reason: string) => void; + minReasonLength?: number; + maxReasonLength?: number; +} +export function RejectSelectedModal({ isOpen, closeModal, maxReasonLength, onReject, minReasonLength }: IRejectSelectedModalProps) { + const [isSubmitting, setIsSubmitting] = useState(false); + const [reason, setReason] = useState(''); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setIsSubmitting(true); + try { + await onReject(reason); + closeModal(); + } finally { + setIsSubmitting(false); + } + }; + return ( + +
+
+ + You are about to reject the selected entry, would you like to proceed? + +