feat(feedback): Add feedback view for companies and customers

This commit introduces the ability to view feedback associated with specific companies and customers directly from their respective tables.

To support this, the `TenderFeedbackTable` has been refactored into a more generic `FeedbackTable` component. This new component accepts a `paramKey` prop (e.g., "tender_id", "company_id") to filter feedback for different entities.

A new feedback icon has been added to the actions column in both the Companies and Customers tables, providing a direct link to the feedback page for each entry.
This commit is contained in:
AmirReza Jamali
2025-09-23 15:08:37 +03:30
parent 8cf8e4f5b2
commit 14f36827ab
8 changed files with 143 additions and 41 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
"use client";
import { PencilSquareIcon, TrashIcon } from "@/assets/icons";
import { FeedbackIcon, PencilSquareIcon, TrashIcon } from "@/assets/icons";
import ConfirmationModal from "@/components/ui/ConfirmationModal";
import {
Table,
@@ -117,6 +117,13 @@ const CustomersTable = () => {
<span className="sr-only">Assign To Company </span>
<Building />
</button>
<button
onClick={() => {
router.push(`${pathName}/feedback/${customer.id}`);
}}
>
<FeedbackIcon />
</button>
</div>
</TableCell>
</TableRow>