8000 add screenshort and fix product add by vicheanath · Pull Request #11 · vicheanath/kroma-pos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add screenshort and fix product add #11

New issue
Merged
merged 1 commit into from
May 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,15 @@
git clone https://github.com/yourusername/kromapos.git
cd kromapos
npm install


# Screenshots

# show screenshots of the

![KromaPOS BarCode Generator](./docs/barcode-generator.png)
![KromaPOS Barcode](./docs/barcode.png)
![KromaPOS Inventory](./docs/inventory.png)
![KromaPOS Receipt Design](./docs/receipt-desing.png)
![KromaPOS Report](./docs/report.png)
![KromaPOS Sale](./docs/sale.png)
17 changes: 12 additions & 5 deletions app/(dashboard)/barcode-designer/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,22 +247,29 @@ export default function BarcodeGeneratorPage() {
useEffect(() => {
if (barcodeValue && barcodeRef.current) {
try {
JsBarcode(barcodeRef.current, barcodeValue, {
const svgElement = barcodeRef.current.querySelector("svg");
if (svgElement) {
svgElement.remove(); // Remove existing SVG to avoid duplication
}
const newSvg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
barcodeRef.current.appendChild(newSvg);

JsBarcode(newSvg, barcodeValue, {
format: barcodeType,
width,
height,
fontSize,
displayValue: showText,
background: backgroundColor,
lineColor,
})
});
} catch (error) {
console.error("Error rendering barcode:", error)
console.error("Error rendering barcode:", error);
toast({
title: "Render Error",
description: "Failed to render the barcode. Please check your settings.",
variant: "destructive",
})
});
}
}
}, [barcodeValue, barcodeType, width, height, fontSize, showText, backgroundColor, lineColor])
Expand Down Expand Up @@ -462,7 +469,7 @@ export default function BarcodeGeneratorPage() {
<CardDescription>Live preview of your barcode.</CardDescription>
</CardHeader>
<CardContent className="flex items-center justify-center p-8">
<svg ref={barcodeRef} className="bg-white p-4 rounded-md"></svg>
<div ref={barcodeRef} className="bg-white p-4 rounded-md"></div>
</CardContent>
</Card>
</div>
Expand Down
Loading
0