diff --git a/src/modules/clients/pages/ClientsPage.tsx b/src/modules/clients/pages/ClientsPage.tsx index e8f515a..57e86a4 100644 --- a/src/modules/clients/pages/ClientsPage.tsx +++ b/src/modules/clients/pages/ClientsPage.tsx @@ -16,6 +16,8 @@ export function ClientsPage() { const tableCols = [ { key: "name", header: "Name", accessor: (c: Client) => `${c.firstName} ${c.lastName}`, sortable: true }, { key: "email", header: "Email", accessor: (c: Client) => c.email ?? "—" }, + { key: "phone", header: "Phone", accessor: (c: Client) => c.phone ?? "—" }, + { key: "location", header: "Location", accessor: (c: Client) => `${c.city}, ${c.state}` }, { key: "createdAt", header: "Created At", accessor: (c: Client) => c.createdAt, sortable: true }, ]; @@ -26,26 +28,26 @@ export function ClientsPage() { -
+
-
-

Clients

+
+
+

Clients

-

- Manage your client base in one place. View all registered clients, create new records, and update or - remove existing information as needed. -

-
+

+ Manage your client base in one place. View all registered clients, create new records, and update or + remove existing information as needed. +

+
-
-
+
diff --git a/src/modules/clients/types/Client.types.ts b/src/modules/clients/types/Client.types.ts index b83d65a..7596c8f 100644 --- a/src/modules/clients/types/Client.types.ts +++ b/src/modules/clients/types/Client.types.ts @@ -3,6 +3,14 @@ export interface Client { firstName: string; lastName: string; email: string; + phone: string; + taxId: string; + birthDate: string; + gender: string; + city: string; + state: string; + address: string; + zipCode: string; createdAt: string; updatedAt: string; [key: string]: string; diff --git a/src/modules/dashboard/pages/DashboardPage.tsx b/src/modules/dashboard/pages/DashboardPage.tsx index e041bcf..9530bcb 100644 --- a/src/modules/dashboard/pages/DashboardPage.tsx +++ b/src/modules/dashboard/pages/DashboardPage.tsx @@ -69,7 +69,7 @@ export function DashboardPage() { -
+

Dashboard

diff --git a/src/modules/orders/pages/OrdersPage.tsx b/src/modules/orders/pages/OrdersPage.tsx index 786a37d..f369fa2 100644 --- a/src/modules/orders/pages/OrdersPage.tsx +++ b/src/modules/orders/pages/OrdersPage.tsx @@ -26,26 +26,26 @@ export function OrdersPage() { -
+
-
-

Orders

+
+
+

Orders

-

- Track and manage all orders efficiently. Browse existing orders, create new ones, and edit or delete - records to keep everything up to date. -

-
+

+ Track and manage all orders efficiently. Browse existing orders, create new ones, and edit or delete + records to keep everything up to date. +

+
-
-
+
diff --git a/src/modules/orders/types/Order.types.ts b/src/modules/orders/types/Order.types.ts index 5770ec9..b95916f 100644 --- a/src/modules/orders/types/Order.types.ts +++ b/src/modules/orders/types/Order.types.ts @@ -1,7 +1,22 @@ export interface Order { id: string; clientId: string; + vendorId: string; + status: string; createdAt: string; updatedAt: string; + canceledAt: string; + cancelReason: string; + subtotal: string; + discount: string; + total: string; + discountCode: string; + paymentMethod: string; + paymentStatus: string; + paymentDueDate: string; + invoiceNumber: string; + invoiceUrl: string; + invoiceIssuedAt: string; + invoiceTaxId: string; [key: string]: string; } diff --git a/src/modules/services/pages/ServicesPage.tsx b/src/modules/services/pages/ServicesPage.tsx index ec693a7..8f7b970 100644 --- a/src/modules/services/pages/ServicesPage.tsx +++ b/src/modules/services/pages/ServicesPage.tsx @@ -26,26 +26,26 @@ export function ServicesPage() { -
+
-
-

Services

+
+
+

Services

-

- Organize the services you offer. Add new services, update details, or remove outdated entries to keep - your catalog accurate. -

-
+

+ Organize the services you offer. Add new services, update details, or remove outdated entries to keep + your catalog accurate. +

+
-
-
+
diff --git a/src/modules/services/types/Service.types.ts b/src/modules/services/types/Service.types.ts index 16386b0..55382c9 100644 --- a/src/modules/services/types/Service.types.ts +++ b/src/modules/services/types/Service.types.ts @@ -2,7 +2,14 @@ export interface Service { id: string; name: string; description: string; + shortDescription: string; + imageUrl: string; createdAt: string; updatedAt: string; + price: string; + promotionalPrice: string; + promotionalPriceStart: string; + promotionalPriceEnd: string; + status: string; [key: string]: string; } diff --git a/src/shared/components/InputField/InputField.styles.ts b/src/shared/components/InputField/InputField.styles.ts index bcb8a2d..ca6f598 100644 --- a/src/shared/components/InputField/InputField.styles.ts +++ b/src/shared/components/InputField/InputField.styles.ts @@ -1,8 +1,8 @@ import clsx from "clsx"; const defaultClasses = clsx( - "w-full appearance-none rounded border py-2 leading-tight shadow-xs shadow-border", - "transition-all focus:outline-none bg-card" + "appearance-none rounded border py-2 leading-tight shadow-xs shadow-border", + "transition-all focus:outline-none" ); const stateClasses = { @@ -34,6 +34,6 @@ export function getInputFieldClasses( hasLeftAddon ? "pl-10" : "pl-3", hasRightAddon ? "pr-10" : "pr-3", disabled && disabledClasses, - bgTransparent && bgClass + !bgTransparent && bgClass ); } diff --git a/src/shared/components/Table/Table/Table.tsx b/src/shared/components/Table/Table/Table.tsx index f4c6c87..879cb9f 100644 --- a/src/shared/components/Table/Table/Table.tsx +++ b/src/shared/components/Table/Table/Table.tsx @@ -116,8 +116,8 @@ export function Table(props: TableProps) { ) : ( <> -
- +
+
{columns.map((col) => { diff --git a/src/shared/components/Table/TableEmpty/TableEmpty.tsx b/src/shared/components/Table/TableEmpty/TableEmpty.tsx index fafadcd..14fec18 100644 --- a/src/shared/components/Table/TableEmpty/TableEmpty.tsx +++ b/src/shared/components/Table/TableEmpty/TableEmpty.tsx @@ -1,9 +1,12 @@ +import { MessageSquareX } from "lucide-react"; import type { TableEmptyProps } from "./TableEmpty.types"; export function TableEmpty({ context, emptyState }: TableEmptyProps) { return ( -
-

+

+ + +

{emptyState ?? (context ? `No ${context} found` : "No registers found")}

diff --git a/src/shared/components/Table/TableHead/TableHead.tsx b/src/shared/components/Table/TableHead/TableHead.tsx index ba234e7..31b7d39 100644 --- a/src/shared/components/Table/TableHead/TableHead.tsx +++ b/src/shared/components/Table/TableHead/TableHead.tsx @@ -1,4 +1,4 @@ -import { InputField } from "@/shared/components/InputField"; +import clsx from "clsx"; import type { TableHeadProps } from "./TableHead.types"; import { SearchIcon } from "lucide-react"; @@ -7,19 +7,30 @@ export function TableHead({ searchable, query, pageSize, pageSizeOptions, setQue
{searchable && ( - } - value={query} - onChange={(e) => setQuery(e.target.value)} - /> +
+ {!query && ( + + + + )} + + setQuery(e.target.value)} + /> +
)}
-
+