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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user