fixed minor issues

This commit is contained in:
AmirReza Jamali
2025-09-23 13:30:07 +03:30
parent 3276bc80e4
commit 0fda25f339
4 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ export type NavData = z.infer<typeof navDataSchema>;
export const NAV_DATA: NavData = [
{
label: "MAIN MENU",
label: "",
items: [
{
title: "Dashboard",
@@ -1,6 +1,7 @@
"use client";
import { ExclamationIcon } from "@/assets/icons";
import { ShowcaseSection } from "@/components/Layouts/showcase-section";
import {
Table,
TableBody,
@@ -9,10 +10,10 @@ import {
TableHeader,
} from "@/components/ui/table";
import TableSkeleton from "@/components/ui/TableSkeleton";
import { cn } from "@/lib/utils";
import { unixToDate } from "@/utils/shared";
import { TableRow } from "../../../ui/table";
import useTenderFeedbackPresenter from "./useTenderFeedbackPresenter";
import { cn } from "@/lib/utils";
interface IProps {
id: string;
@@ -22,7 +23,10 @@ const TenderFeedbackTable = ({ id }: IProps) => {
const { feedback, isLoading, columns, pathName, router } =
useTenderFeedbackPresenter({ id });
return (
<div className="flex flex-col rounded-[10px] bg-white px-7.5 pb-4 pt-7.5 shadow-1 dark:bg-gray-dark dark:shadow-card">
<ShowcaseSection
title={!isLoading && `Tender: ${feedback?.[0].tender?.title}`}
className="flex flex-col rounded-[10px] bg-white px-7.5 pb-4 pt-7.5 shadow-1 dark:bg-gray-dark dark:shadow-card"
>
<Table>
<TableHeader>
<TableRow>
@@ -52,9 +56,7 @@ const TenderFeedbackTable = ({ id }: IProps) => {
<TableCell className="uppercase" colSpan={100}>
{unixToDate(item.updated_at)}
</TableCell>
<TableCell className="uppercase" colSpan={100}>
{item?.tender?.title ?? "-"}
</TableCell>
<TableCell className="uppercase" colSpan={100}>
{unixToDate(item.created_at)}
</TableCell>
@@ -76,7 +78,7 @@ const TenderFeedbackTable = ({ id }: IProps) => {
)}
</TableBody>
</Table>
</div>
</ShowcaseSection>
);
};
@@ -10,7 +10,7 @@ const useTenderFeedbackPresenter = ({ id }: { id: string }) => {
"row",
"feedback type",
"updated at",
"tender name",
"created at",
"actions",
];
+1 -1
View File
@@ -1,6 +1,6 @@
import * as moment from "moment";
export const unixToDate = (unix: number) => {
return moment.unix(unix).format("YYYY/MM/DD");
return moment.unix(unix).format("YYYY/MM/DD HH:MM");
};
export const msToDate = (ms: number) => {
return moment.default(ms).format("YYYY/MM/DD");