Add CSV export for orders and update UI symbols

Introduces an exportOrdersToCSV function in lib/api-client.ts to allow exporting orders by status as a CSV file. Updates various UI components to use the '•' (bullet) symbol instead of '·' (middle dot) and replaces some emoji/unicode characters for improved consistency and compatibility. Also normalizes the 'use client' directive to include a BOM in many files.
This commit is contained in:
g
2025-12-15 17:57:18 +00:00
parent 07dcaf55c0
commit 0176f89cb7
91 changed files with 232 additions and 136 deletions

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
import { useState, useRef } from "react";
import { Button } from "@/components/ui/button";
@@ -350,4 +350,4 @@ __italic text__
</DialogContent>
</Dialog>
);
}
}

View File

@@ -1,4 +1,4 @@
import { Dialog, DialogContent } from "@/components/ui/dialog";
import { Dialog, DialogContent } from "@/components/ui/dialog";
import { ChevronLeft, ChevronRight, X } from "lucide-react";
import { Button } from "@/components/ui/button";
import { useEffect } from "react";
@@ -96,4 +96,4 @@ export function ImageViewerModal({ isOpen, onClose, imageUrl, onNavigate }: Imag
</DialogContent>
</Dialog>
);
}
}

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
import { useState } from "react";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
@@ -65,7 +65,7 @@ export default function ImportProductsModal({ open, setOpen, onImportComplete }:
const [name] = productInfo.split("\n");
if (!name) continue;
const [category, subcategory] = productInfo.split("\n")[1].split("")[0].split("->")
const [category, subcategory] = productInfo.split("\n")[1].split("ÔÇó")[0].split("->")
.map(item => item.trim());
if (!category || !subcategory) continue;
@@ -193,4 +193,4 @@ export default function ImportProductsModal({ open, setOpen, onImportComplete }:
</DialogContent>
</Dialog>
);
}
}

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
import { useState, useEffect } from "react";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
@@ -320,7 +320,7 @@ const ProductBasicInfo: React.FC<{
</div>
<div className="bg-background rounded-lg border border-border p-4">
<h3 className="text-sm font-medium mb-4">💰 Cost & Profit Tracking</h3>
<h3 className="text-sm font-medium mb-4">­ƒÆ Cost & Profit Tracking</h3>
<p className="text-xs text-muted-foreground mb-4">
Track your costs to automatically calculate profit margins and markup percentages.
</p>
@@ -474,4 +474,4 @@ const UnitTypeSelect: React.FC<{
</Button>
</div>
</div>
);
);

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
import { useState, useEffect } from "react";
import { Button } from "@/components/ui/button";
@@ -127,4 +127,4 @@ export default function ProductSelector({ selectedProducts, onSelectionChange }:
)}
</div>
);
}
}

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
import { useState, useEffect } from "react";
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";

View File

@@ -1,4 +1,4 @@
"use client";
"use client";
import { ChangeEvent, FormEvent } from "react";
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "@/components/ui/dialog";
@@ -9,7 +9,7 @@ import { ShippingData } from "@/lib/types";
interface ShippingModalProps {
open: boolean;
onClose: () => void;
onSave: (shippingData: ShippingData) => void; // Allow passing shippingData
onSave: (shippingData: ShippingData) => void; //  Allow passing shippingData
shippingData: ShippingData;
setShippingData: React.Dispatch<React.SetStateAction<ShippingData>>;
editing: boolean;