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',
header: 'img',
cell: ({ row }) => {
return (
<img src={`/uploads/inventory/${row.original.userId}/${row.original.id}/${row.original.urlImg}`} alt="" width={64} height={64} className="rounded"/>
)
return (
<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',
header: 'Precio',
cell: ({ row }) => `${row.original.price}$`
cell: ({ row }) => `${row.original.price} Bs.`
},
{
accessorKey: 'stock',

View File

@@ -32,7 +32,7 @@ export function ProductCard({ product, onClick }: cardProps) {
{product.status === 'AGOTADO' ? (
<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>
</Card>
)

View File

@@ -1,6 +1,6 @@
'use client';
import { useState } from "react";
import { allProducts } from "../../schemas/inventory";
import { allProducts } from "../../schemas/inventory";
import {
Card,
CardContent,
@@ -9,11 +9,11 @@ import {
CardTitle,
} from '@repo/shadcn/card';
export function ProductList({product}: {product: allProducts}) {
const [selectedImg, setSelectedImg] = useState(`/uploads/inventory/${product.userId}/${product.id}/${product.urlImg}`)
export function ProductList({ product }: { product: allProducts }) {
const [selectedImg, setSelectedImg] = useState(`/uploads/inventory/${product.userId}/${product.id}/${product.urlImg}`)
console.log(product);
return (
return (
// <PageContainer>
<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'>
@@ -31,21 +31,21 @@ return (
</span>
</span> */}
{product.gallery?.map((img, index) => (
<img
key={index}
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}`}
alt=""
onClick={() => setSelectedImg(`/uploads/inventory/${product.userId}/${product.id}/${img}`)}
/>
))}
{/* <div className="sticky right-0 flex items-center">
<img
key={index}
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}`}
alt=""
onClick={() => setSelectedImg(`/uploads/inventory/${product.userId}/${product.id}/${img}`)}
/>
))}
{/* <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>
</div> */}
</section>
</div>
<Card className="flex flex-col md:w-[400px] lg:w-[500px] min-h-[400px] md:h-[85vh] md:overflow-auto md:sticky top-0 right-0">
@@ -53,7 +53,7 @@ return (
<CardTitle className="font-bold text-2xl text-primary">
{product.title.charAt(0).toUpperCase() + product.title.slice(1)}
</CardTitle>
<p className='font-semibold'>{product.price}$
<p className='font-semibold'>{product.price} Bs.
{product.status === 'AGOTADO' ? (
<span className="font-semibold text-lg text-red-900"> AGOTADO</span>
) : ('')}