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:
AmirReza Jamali
2025-11-25 14:53:16 +03:30
parent 6da653cb15
commit 2ec752df0c
6 changed files with 154 additions and 7 deletions
+5 -3
View File
@@ -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