Se cambio del modulo de producto-inventario el $ por Bs.

This commit is contained in:
2025-12-15 13:04:00 -04:00
parent 28d51a9c00
commit 6482e692b3
3 changed files with 21 additions and 21 deletions

View File

@@ -9,9 +9,9 @@ export const columns: ColumnDef<InventoryTable>[] = [
accessorKey: 'urlImg', accessorKey: 'urlImg',
header: 'img', header: 'img',
cell: ({ row }) => { cell: ({ row }) => {
return ( return (
<img src={`/uploads/inventory/${row.original.userId}/${row.original.id}/${row.original.urlImg}`} alt="" width={64} height={64} className="rounded"/> <img src={`/uploads/inventory/${row.original.userId}/${row.original.id}/${row.original.urlImg}`} alt="" width={64} height={64} className="rounded" />
) )
}, },
}, },
{ {
@@ -27,7 +27,7 @@ export const columns: ColumnDef<InventoryTable>[] = [
{ {
accessorKey: 'price', accessorKey: 'price',
header: 'Precio', header: 'Precio',
cell: ({ row }) => `${row.original.price}$` cell: ({ row }) => `${row.original.price} Bs.`
}, },
{ {
accessorKey: 'stock', accessorKey: 'stock',

View File

@@ -32,7 +32,7 @@ export function ProductCard({ product, onClick }: cardProps) {
{product.status === 'AGOTADO' ? ( {product.status === 'AGOTADO' ? (
<p className="font-semibold text-lg text-red-900">AGOTADO</p> <p className="font-semibold text-lg text-red-900">AGOTADO</p>
) : ('')} ) : ('')}
<p className="font-semibold text-lg">$ {product.price}</p> <p className="font-semibold text-lg">{product.price} Bs.</p>
</CardFooter> </CardFooter>
</Card> </Card>
) )

View File

@@ -1,6 +1,6 @@
'use client'; 'use client';
import { useState } from "react"; import { useState } from "react";
import { allProducts } from "../../schemas/inventory"; import { allProducts } from "../../schemas/inventory";
import { import {
Card, Card,
CardContent, CardContent,
@@ -9,11 +9,11 @@ import {
CardTitle, CardTitle,
} from '@repo/shadcn/card'; } from '@repo/shadcn/card';
export function ProductList({product}: {product: allProducts}) { export function ProductList({ product }: { product: allProducts }) {
const [selectedImg, setSelectedImg] = useState(`/uploads/inventory/${product.userId}/${product.id}/${product.urlImg}`) const [selectedImg, setSelectedImg] = useState(`/uploads/inventory/${product.userId}/${product.id}/${product.urlImg}`)
console.log(product); console.log(product);
return ( return (
// <PageContainer> // <PageContainer>
<main className='px-4 lg:px-6 flex flex-col md:flex-row gap-3 lg:gap-4 md:relative'> <main className='px-4 lg:px-6 flex flex-col md:flex-row gap-3 lg:gap-4 md:relative'>
<div className='w-full flex justify-between flex-col'> <div className='w-full flex justify-between flex-col'>
@@ -31,15 +31,15 @@ return (
</span> </span>
</span> */} </span> */}
{product.gallery?.map((img, index) => ( {product.gallery?.map((img, index) => (
<img <img
key={index} key={index}
className="cursor-pointer border-2 object-cover w-[64px] h-[64px] md:w-[96px] md:h-[96px] aspect-square rounded-2xl" className="cursor-pointer border-2 object-cover w-[64px] h-[64px] md:w-[96px] md:h-[96px] aspect-square rounded-2xl"
src={`/uploads/inventory/${product.userId}/${product.id}/${img}`} src={`/uploads/inventory/${product.userId}/${product.id}/${img}`}
alt="" alt=""
onClick={() => setSelectedImg(`/uploads/inventory/${product.userId}/${product.id}/${img}`)} onClick={() => setSelectedImg(`/uploads/inventory/${product.userId}/${product.id}/${img}`)}
/> />
))} ))}
{/* <div className="sticky right-0 flex items-center"> {/* <div className="sticky right-0 flex items-center">
<span className="text-xl p-3 cursor-pointer bg-neutral-800/50 rounded-full text-white"> <span className="text-xl p-3 cursor-pointer bg-neutral-800/50 rounded-full text-white">
{">"} {">"}
</span> </span>
@@ -53,7 +53,7 @@ return (
<CardTitle className="font-bold text-2xl text-primary"> <CardTitle className="font-bold text-2xl text-primary">
{product.title.charAt(0).toUpperCase() + product.title.slice(1)} {product.title.charAt(0).toUpperCase() + product.title.slice(1)}
</CardTitle> </CardTitle>
<p className='font-semibold'>{product.price}$ <p className='font-semibold'>{product.price} Bs.
{product.status === 'AGOTADO' ? ( {product.status === 'AGOTADO' ? (
<span className="font-semibold text-lg text-red-900"> AGOTADO</span> <span className="font-semibold text-lg text-red-900"> AGOTADO</span>
) : ('')} ) : ('')}