Improve UI
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useState, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button } from '../../../ui/Button';
|
||||
import { useCurrentTenant } from '../../../../stores/tenant.store';
|
||||
import { useTenantCurrency } from '../../../../hooks/useTenantCurrency';
|
||||
import { useCreateIngredient, useClassifyBatch, useAddStock } from '../../../../api/hooks/inventory';
|
||||
import { useValidateImportFile, useImportSalesData } from '../../../../api/hooks/sales';
|
||||
import { useSuppliers } from '../../../../api/hooks/suppliers';
|
||||
@@ -54,6 +55,7 @@ export const UploadSalesDataStep: React.FC<UploadSalesDataStepProps> = ({
|
||||
isFirstStep
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { currencySymbol } = useTenantCurrency();
|
||||
const [selectedFile, setSelectedFile] = useState<File | null>(null);
|
||||
const [isValidating, setIsValidating] = useState(false);
|
||||
const [validationResult, setValidationResult] = useState<ImportValidationResponse | null>(null);
|
||||
@@ -658,7 +660,7 @@ export const UploadSalesDataStep: React.FC<UploadSalesDataStepProps> = ({
|
||||
</p>
|
||||
<div className="mt-2 flex items-center gap-4 text-xs text-[var(--text-secondary)]">
|
||||
<span>Stock: {item.stock_quantity} {item.unit_of_measure}</span>
|
||||
<span>Costo: €{item.cost_per_unit.toFixed(2)}/{item.unit_of_measure}</span>
|
||||
<span>Costo: {currencySymbol}{item.cost_per_unit.toFixed(2)}/{item.unit_of_measure}</span>
|
||||
<span>Caducidad: {item.estimated_shelf_life_days} días</span>
|
||||
</div>
|
||||
{item.sales_data && (
|
||||
@@ -962,7 +964,7 @@ export const UploadSalesDataStep: React.FC<UploadSalesDataStepProps> = ({
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-[var(--text-primary)] mb-1">
|
||||
Costo por Unidad (€)
|
||||
Costo por Unidad ({currencySymbol})
|
||||
</label>
|
||||
<input
|
||||
type="number"
|
||||
@@ -1170,7 +1172,7 @@ export const UploadSalesDataStep: React.FC<UploadSalesDataStepProps> = ({
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-[var(--text-primary)] mb-1">
|
||||
Costo por Unidad (€)
|
||||
Costo por Unidad ({currencySymbol})
|
||||
</label>
|
||||
<input
|
||||
type="number"
|
||||
|
||||
Reference in New Issue
Block a user