Files
tm_panel/src/app/customers/feedback/[id]/page.tsx
T
AmirReza Jamali 14f36827ab 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.
2025-09-23 15:08:37 +03:30

30 lines
744 B
TypeScript

"use client";
import Breadcrumb from "@/components/Breadcrumbs/Breadcrumb";
import FeedbackTable from "@/components/Tables/feedback-table";
import { BreadcrumbItem } from "@/types/shared";
import { use } from "react";
interface IProps {
params: Promise<{
id: string;
}>;
}
const TenderFeedbackPage = ({ params }: IProps) => {
const { id } = use(params);
const breadcrumbItems: BreadcrumbItem[] = [
{ href: "/", name: "Dashboard" },
{ href: "/customers", name: "Customers" },
{ href: `/customers/feedback/${id}`, name: "Customers feedback" },
];
return (
<>
<Breadcrumb items={breadcrumbItems} />
<FeedbackTable paramKey="customer_id" id={id} />
</>
);
};
export default TenderFeedbackPage;