From 4fb1a931c56f58ba60c1a79893777926660b0748 Mon Sep 17 00:00:00 2001 From: AmirReza Jamali Date: Tue, 16 Sep 2025 18:31:33 +0330 Subject: [PATCH] refactor(logo): Update main logo SVG to use currentColor The main logo SVG has been replaced with an updated version. The previous logo had hardcoded fill colors, making it difficult to adapt to different color schemes, such as light and dark modes. The new SVG uses `fill="currentColor"`, which allows its color to be controlled via the parent element's CSS `color` property. This makes the logo easily themeable and more flexible for use throughout the application. --- public/images/fav-icon.svg | 11 ++ public/images/main-logo.svg | 32 ++-- src/app/layout.tsx | 2 +- .../FormElements/InputGroup/index.tsx | 2 +- src/components/FormElements/select.tsx | 2 +- src/components/Tables/companies/index.tsx | 2 +- .../companies/useCompanyListPresenter.ts | 2 +- src/components/Tables/customers/index.tsx | 5 +- src/components/Tables/tenders/Skeleton.tsx | 43 ++--- src/components/Tables/tenders/index.tsx | 20 +-- src/components/forms/admins/CreateAdmin.tsx | 6 +- .../forms/companies/CreateCompany.tsx | 155 +++--------------- src/components/logo.tsx | 3 +- src/components/ui/Status.tsx | 51 ++++++ src/constants/Texts.ts | 1 + src/constants/regex.ts | 1 + src/utils/shared.ts | 2 +- 17 files changed, 138 insertions(+), 202 deletions(-) create mode 100644 public/images/fav-icon.svg create mode 100644 src/components/ui/Status.tsx create mode 100644 src/constants/regex.ts diff --git a/public/images/fav-icon.svg b/public/images/fav-icon.svg new file mode 100644 index 0000000..63e9aea --- /dev/null +++ b/public/images/fav-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/main-logo.svg b/public/images/main-logo.svg index 0179d3d..c4da7db 100644 --- a/public/images/main-logo.svg +++ b/public/images/main-logo.svg @@ -1,20 +1,14 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 63f53ea..62150e0 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -17,7 +17,7 @@ export const metadata: Metadata = { description: "Next.js admin dashboard toolkit with 200+ templates, UI components, and integrations for fast dashboard development.", icons: { - icon: "/images/main-logo.svg", + icon: "/images/fav-icon.svg", }, }; diff --git a/src/components/FormElements/InputGroup/index.tsx b/src/components/FormElements/InputGroup/index.tsx index 2e0505b..0adcfd0 100644 --- a/src/components/FormElements/InputGroup/index.tsx +++ b/src/components/FormElements/InputGroup/index.tsx @@ -63,7 +63,7 @@ const InputGroup = ({ className="text-body-sm font-medium text-dark dark:text-white" > {label} - {required && *} + {required && *}
({ className="block text-body-sm font-medium text-dark dark:text-white" > {label} - {required && *} + {required && *}
diff --git a/src/components/Tables/companies/index.tsx b/src/components/Tables/companies/index.tsx index c6a8b35..7eb2629 100644 --- a/src/components/Tables/companies/index.tsx +++ b/src/components/Tables/companies/index.tsx @@ -40,7 +40,7 @@ const CompaniesTable = ({}: IProps) => { {columns.map((columns) => ( {columns} diff --git a/src/components/Tables/companies/useCompanyListPresenter.ts b/src/components/Tables/companies/useCompanyListPresenter.ts index 725d17c..3f82769 100644 --- a/src/components/Tables/companies/useCompanyListPresenter.ts +++ b/src/components/Tables/companies/useCompanyListPresenter.ts @@ -32,7 +32,7 @@ export const useCompanyListPresenter = () => { "country", "state", "city", - "postal_code", + "postal code", "language", "currency", "employee count", diff --git a/src/components/Tables/customers/index.tsx b/src/components/Tables/customers/index.tsx index ee5a2bb..ae23bb6 100644 --- a/src/components/Tables/customers/index.tsx +++ b/src/components/Tables/customers/index.tsx @@ -17,6 +17,7 @@ import AssignToCompanyModalContent from "./AssignToCompanyModalContent"; import Modal from "@/components/ui/modal"; import { TAssignCustomerToCompanyCredentials } from "@/lib/api"; import { toast } from "react-toastify"; +import Status from "@/components/ui/Status"; const CustomersTable = () => { const { isPending, @@ -63,7 +64,9 @@ const CustomersTable = () => { {customer.email} {customer.created_at} {customer.type} - {customer.status} + + {customer.status} + {customer.companies?.length ? ( customer.companies.map((c) => ( diff --git a/src/components/Tables/tenders/Skeleton.tsx b/src/components/Tables/tenders/Skeleton.tsx index bcbd831..826f15d 100644 --- a/src/components/Tables/tenders/Skeleton.tsx +++ b/src/components/Tables/tenders/Skeleton.tsx @@ -10,33 +10,20 @@ import { export function TendersSkeleton() { return ( -
-

- Tenders -

- - - - - Full name - Email - Type - Status - Company - Actions - - - - - {Array.from({ length: 5 }).map((_, i) => ( - - - - - - ))} - -
-
+ + {Array.from({ length: 5 }).map((_, i) => ( + + + + + + + + + + + + ))} + ); } diff --git a/src/components/Tables/tenders/index.tsx b/src/components/Tables/tenders/index.tsx index d5cd5fb..c379bf1 100644 --- a/src/components/Tables/tenders/index.tsx +++ b/src/components/Tables/tenders/index.tsx @@ -1,7 +1,7 @@ "use client"; import useTenderListPresenter from "./useTenderListPresenter"; - +import Status from "@/components/ui/Status"; import { Table, TableBody, @@ -30,6 +30,9 @@ const TendersTable = () => { + + Row + Title @@ -42,6 +45,7 @@ const TendersTable = () => { + {isPending && } {allTenders.map((item, index) => !item ? ( @@ -52,6 +56,9 @@ const TendersTable = () => { key={item.id} className="odd:bg-gray-2 dark:odd:bg-gray-7" > + + {index + 1} + {item.title} @@ -59,21 +66,14 @@ const TendersTable = () => { {item.country_code} - - {item.status} - + {item.status} ), )} + {isFetchingNextPage && }
- {isFetchingNextPage && } {(data?.pages.length ?? 0) >= 5 && hasNextPage && (