- {/* Basic Info */}
@@ -89,7 +78,6 @@ function ProductDetailsPage() {
- {/* Inventory */}
@@ -101,7 +89,6 @@ function ProductDetailsPage() {
- {/* Composition */}
@@ -126,7 +113,6 @@ function ProductDetailsPage() {
- {/* Pricing */}
@@ -140,7 +126,6 @@ function ProductDetailsPage() {
- {/* Visibility */}
@@ -153,7 +138,6 @@ function ProductDetailsPage() {
- {/* Actions */}
);
}
-
-function DetailRow({
- label,
- value,
- valueClass = "",
- last = false,
-}: {
- label: string;
- value: string;
- valueClass?: string;
- last?: boolean;
-}) {
- return (
-
- {label}
- {value}
-
- );
-}
diff --git a/apps/pharmanager/src/routes/products/index.tsx b/apps/pharmanager/src/routes/products/index.tsx
index 92004a4..302111b 100644
--- a/apps/pharmanager/src/routes/products/index.tsx
+++ b/apps/pharmanager/src/routes/products/index.tsx
@@ -1,9 +1,9 @@
import { useState, useMemo, useCallback } from "react";
import { createFileRoute, Link } from "@tanstack/react-router";
-import { Search, Plus, Pencil, Trash2, Pill } from "lucide-react";
+import { Pencil, Trash2, Pill } from "lucide-react";
import { GridTable } from "#/components/GridTable";
import type { GridTableColumn } from "#/components/GridTable";
-import { Button, buttonVariants } from "#/components/ui";
+import { Button, SearchToolbar } from "#/components/ui";
import { useListProducts, useRemoveProduct, trpc } from "shared-react";
interface ProductRow {
@@ -200,25 +200,13 @@ function ProductsIndexPage() {
return (
-
-
-
- setSearchQuery(e.target.value)}
- placeholder="Search by product name, brand, or distributor..."
- className="bg-transparent border-none outline-none text-sm text-slate-900 w-full placeholder:text-slate-400"
- />
-
-
-
- Add Product
-
-
+
Loading batch details...;
if (error || !batch) {
return (
-
-
-
Batch not found
-
The batch you're looking for doesn't exist.
-
- Back to Stock
-
-
+
);
}
@@ -66,10 +65,7 @@ function StockDetailsPage() {
return (
-
-
- Back to Stock
-
+
@@ -146,12 +142,3 @@ function StockDetailsPage() {
);
}
-
-function DetailRow({ label, value, valueClass = "", last = false }: { label: string; value: string; valueClass?: string; last?: boolean }) {
- return (
-
- {label}
- {value}
-
- );
-}
diff --git a/apps/pharmanager/src/routes/stock/index.tsx b/apps/pharmanager/src/routes/stock/index.tsx
index 14a3710..4382186 100644
--- a/apps/pharmanager/src/routes/stock/index.tsx
+++ b/apps/pharmanager/src/routes/stock/index.tsx
@@ -1,9 +1,9 @@
import { useState, useMemo, useCallback } from "react";
import { createFileRoute, Link } from "@tanstack/react-router";
-import { Search, Plus, Pencil, Trash2, Package, Star } from "lucide-react";
+import { Pencil, Trash2, Package, Star } from "lucide-react";
import { GridTable } from "#/components/GridTable";
import type { GridTableColumn } from "#/components/GridTable";
-import { Button, buttonVariants } from "#/components/ui";
+import { Button, SearchToolbar } from "#/components/ui";
import { useListStockBatches, useRemoveStockBatch, trpc } from "shared-react";
interface StockRow {
@@ -186,22 +186,13 @@ function StockIndexPage() {
return (
-
-
-
- setSearchQuery(e.target.value)}
- placeholder="Search by product, brand, batch, or rack..."
- className="bg-transparent border-none outline-none text-sm text-slate-900 w-full placeholder:text-slate-400"
- />
-
-
-
- Add Stock
-
-
+
-
-
-
- setSearchQuery(e.target.value)}
- placeholder="Search by name, alias, or description..."
- className="bg-transparent border-none outline-none text-sm text-slate-900 w-full placeholder:text-slate-400"
- />
-
-
-
- Add Rack
-
-
+