diff --git a/src/app/(notifications)/notification-history/[id]/page.tsx b/src/app/(notifications)/notification-history/[id]/page.tsx
index ecc32c4..425234d 100644
--- a/src/app/(notifications)/notification-history/[id]/page.tsx
+++ b/src/app/(notifications)/notification-history/[id]/page.tsx
@@ -5,6 +5,7 @@ import { ShowcaseSection } from "@/components/Layouts/showcase-section";
import IsVisible from "@/components/ui/IsVisible";
import { useGetNotificationDetails } from "@/hooks/queries/useNotificationQueries";
import { BreadcrumbItem } from "@/types/shared";
+import { unixToDate } from "@/utils/shared";
import { use } from "react";
interface IProps {
@@ -60,7 +61,7 @@ const NotificationDetailsPage = ({ params }: IProps) => {
- {data?.data.seen_at}
+ {unixToDate({ unix: data?.data.seen_at ?? 0, hasTime: false })}
diff --git a/src/app/tenders/[details]/page.tsx b/src/app/tenders/[details]/page.tsx
index e58faaa..b730785 100644
--- a/src/app/tenders/[details]/page.tsx
+++ b/src/app/tenders/[details]/page.tsx
@@ -4,20 +4,12 @@ import { LocationIcon } from "@/assets/icons";
import Breadcrumb from "@/components/Breadcrumbs/Breadcrumb";
import { ShowcaseSection } from "@/components/Layouts/showcase-section";
import Status from "@/components/ui/Status";
-import {
- Table,
- TableBody,
- TableHead,
- TableHeader,
- TableRow,
-} from "@/components/ui/table";
import { useTenderDetailQuery } from "@/hooks/queries";
import { useGetFlagQuery } from "@/hooks/queries/useFlagsQueries";
-import { msToDate, unixToDate } from "@/utils/shared";
+import { msToDate } from "@/utils/shared";
import getSymbolFromCurrency from "currency-symbol-map";
-import { use } from "react";
-import { TableCell } from "../../../components/ui/table";
import Link from "next/link";
+import { use } from "react";
interface IProps {
params: Promise<{
diff --git a/src/components/Tables/companies/company-categories/index.tsx b/src/components/Tables/companies/company-categories/index.tsx
index 463fd81..7688e98 100644
--- a/src/components/Tables/companies/company-categories/index.tsx
+++ b/src/components/Tables/companies/company-categories/index.tsx
@@ -2,7 +2,6 @@
import { PencilSquareIcon, TrashIcon } from "@/assets/icons";
import { Switch } from "@/components/FormElements/switch";
import ConfirmationModal from "@/components/ui/ConfirmationModal";
-import { _TooltipDefaultParams } from "@/constants/tooltip";
import IsVisible from "@/components/ui/IsVisible";
import {
Table,
@@ -13,6 +12,7 @@ import {
TableRow,
} from "@/components/ui/table";
import TableSkeleton from "@/components/ui/TableSkeleton";
+import { _TooltipDefaultParams } from "@/constants/tooltip";
import { unixToDate } from "@/utils/shared";
import Link from "next/link";
import { Tooltip } from "react-tooltip";
@@ -67,7 +67,7 @@ const CompanyCategoriesTable = () => {
{category.name}
{category.description}
- {unixToDate(category.created_at)}
+ {unixToDate({ unix: category.created_at, hasTime: true })}
diff --git a/src/components/Tables/customers/index.tsx b/src/components/Tables/customers/index.tsx
index 872e92a..3797bc1 100644
--- a/src/components/Tables/customers/index.tsx
+++ b/src/components/Tables/customers/index.tsx
@@ -1,7 +1,6 @@
"use client";
import { ExclamationIcon, PencilSquareIcon, TrashIcon } from "@/assets/icons";
import ConfirmationModal from "@/components/ui/ConfirmationModal";
-import { _TooltipDefaultParams } from "@/constants/tooltip";
import {
Table,
TableBody,
@@ -10,6 +9,7 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
+import { _TooltipDefaultParams } from "@/constants/tooltip";
import Link from "next/link";
import useCustomerListPresenter from "./useCustomerListPresenter";
@@ -18,8 +18,8 @@ import Modal from "@/components/ui/modal";
import Status from "@/components/ui/Status";
import TableSkeleton from "@/components/ui/TableSkeleton";
import { unixToDate } from "@/utils/shared";
-import { Tooltip } from "react-tooltip";
import { toast } from "react-toastify";
+import { Tooltip } from "react-tooltip";
import AssignToCompanyModalContent from "./AssignToCompanyModalContent";
const CustomersTable = () => {
@@ -67,7 +67,7 @@ const CustomersTable = () => {
{customer.full_name}
{customer.email}
- {unixToDate(customer.created_at)}
+ {unixToDate({ unix: customer.created_at, hasTime: true })}
diff --git a/src/components/Tables/feedback-table/index.tsx b/src/components/Tables/feedback-table/index.tsx
index 3dbd299..6751676 100644
--- a/src/components/Tables/feedback-table/index.tsx
+++ b/src/components/Tables/feedback-table/index.tsx
@@ -67,11 +67,11 @@ const FeedbackTable = ({ id, paramKey }: IProps) => {
{item.feedback_type}
- {unixToDate(item.updated_at)}
+ {unixToDate({ unix: item.updated_at, hasTime: true })}
- {unixToDate(item.created_at)}
+ {unixToDate({ unix: item.created_at, hasTime: true })}
{
- return moment.unix(unix).format("YYYY/MM/DD HH:MM");
+export const unixToDate = ({
+ hasTime = false,
+ unix,
+}: {
+ unix: number;
+ hasTime?: boolean;
+}) => {
+ return moment.unix(unix).format(`YYYY/MM/DD ${hasTime && "HH:MM"}`);
};
export const msToDate = (ms: number) => {
return moment.default(ms).format("YYYY/MM/DD");