feat(inquiries): Add change status functionality to inquiries
- Create ChangeStatusForm component with status, reason, and description fields - Add change status modal to inquiries table with form integration - Implement useChangeInquiryStatus hook integration in presenter - Add edit icon button to trigger status change modal for each inquiry - Update Status component to accept status prop for proper styling - Update FormFooter component to support form submission handling - Add isChangeStatusModalOpen state management to presenter - Update TInquiries type definitions to include change status credentials - Enhance inquiries list with status change workflow alongside existing delete functionality
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
import { useIsMutating } from "@tanstack/react-query";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
interface IProps {}
|
||||
interface IProps {
|
||||
onCancel?: () => void;
|
||||
}
|
||||
|
||||
const FormFooter = ({}: IProps) => {
|
||||
const FormFooter = ({ onCancel }: IProps) => {
|
||||
const isMutating = useIsMutating();
|
||||
const router = useRouter();
|
||||
return (
|
||||
@@ -21,7 +23,7 @@ const FormFooter = ({}: IProps) => {
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={router.back}
|
||||
onClick={onCancel ?? router.back}
|
||||
className="mt-6 flex w-fit justify-center rounded-lg bg-error p-[13px] font-medium text-white hover:bg-opacity-90"
|
||||
>
|
||||
Opt out
|
||||
|
||||
Reference in New Issue
Block a user