a lot of
This commit is contained in:
@ -16,8 +16,8 @@ import {
|
||||
import { DeliveryDetailsProps } from "./types";
|
||||
|
||||
const DELIVERY_STATUS_CONFIG = {
|
||||
delivered: {
|
||||
label: "Доставлено",
|
||||
"in-stock": {
|
||||
label: "На складе",
|
||||
color: "bg-green-500/20 text-green-300",
|
||||
icon: CheckCircle,
|
||||
},
|
||||
@ -26,6 +26,22 @@ const DELIVERY_STATUS_CONFIG = {
|
||||
color: "bg-blue-500/20 text-blue-300",
|
||||
icon: Truck,
|
||||
},
|
||||
confirmed: {
|
||||
label: "Подтверждено",
|
||||
color: "bg-cyan-500/20 text-cyan-300",
|
||||
icon: CheckCircle,
|
||||
},
|
||||
planned: {
|
||||
label: "Запланировано",
|
||||
color: "bg-yellow-500/20 text-yellow-300",
|
||||
icon: Clock,
|
||||
},
|
||||
// Обратная совместимость
|
||||
delivered: {
|
||||
label: "Доставлено",
|
||||
color: "bg-green-500/20 text-green-300",
|
||||
icon: CheckCircle,
|
||||
},
|
||||
pending: {
|
||||
label: "Ожидание",
|
||||
color: "bg-yellow-500/20 text-yellow-300",
|
||||
|
@ -32,6 +32,27 @@ import {
|
||||
|
||||
// Статусы расходников с цветами
|
||||
const STATUS_CONFIG = {
|
||||
"in-stock": {
|
||||
label: "Доступен",
|
||||
color: "bg-green-500/20 text-green-300",
|
||||
icon: CheckCircle,
|
||||
},
|
||||
"in-transit": {
|
||||
label: "В пути",
|
||||
color: "bg-blue-500/20 text-blue-300",
|
||||
icon: Clock,
|
||||
},
|
||||
confirmed: {
|
||||
label: "Подтверждено",
|
||||
color: "bg-cyan-500/20 text-cyan-300",
|
||||
icon: CheckCircle,
|
||||
},
|
||||
planned: {
|
||||
label: "Запланировано",
|
||||
color: "bg-yellow-500/20 text-yellow-300",
|
||||
icon: Clock,
|
||||
},
|
||||
// Обратная совместимость и специальные статусы
|
||||
available: {
|
||||
label: "Доступен",
|
||||
color: "bg-green-500/20 text-green-300",
|
||||
@ -47,11 +68,6 @@ const STATUS_CONFIG = {
|
||||
color: "bg-red-500/20 text-red-300",
|
||||
icon: AlertTriangle,
|
||||
},
|
||||
"in-transit": {
|
||||
label: "В пути",
|
||||
color: "bg-blue-500/20 text-blue-300",
|
||||
icon: Clock,
|
||||
},
|
||||
reserved: {
|
||||
label: "Зарезервирован",
|
||||
color: "bg-purple-500/20 text-purple-300",
|
||||
|
@ -477,6 +477,7 @@ export function FulfillmentWarehouseDashboard() {
|
||||
supplyOrders,
|
||||
allProducts,
|
||||
mySupplies,
|
||||
myFulfillmentSupplies,
|
||||
suppliesReceivedToday,
|
||||
suppliesUsedToday,
|
||||
productsReceivedToday,
|
||||
|
@ -15,7 +15,6 @@ export function SuppliesGrid({
|
||||
return (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
|
||||
{supplies.map((supply) => {
|
||||
const statusConfig = getStatusConfig(supply.status);
|
||||
const isExpanded = expandedSupplies.has(supply.id);
|
||||
const deliveries = getSupplyDeliveries(supply);
|
||||
|
||||
@ -26,7 +25,6 @@ export function SuppliesGrid({
|
||||
supply={supply}
|
||||
isExpanded={isExpanded}
|
||||
onToggleExpansion={onToggleExpansion}
|
||||
statusConfig={statusConfig}
|
||||
getSupplyDeliveries={getSupplyDeliveries}
|
||||
/>
|
||||
|
||||
|
@ -18,7 +18,6 @@ export function SupplyCard({
|
||||
supply,
|
||||
isExpanded,
|
||||
onToggleExpansion,
|
||||
statusConfig,
|
||||
getSupplyDeliveries,
|
||||
}: SupplyCardProps) {
|
||||
const formatCurrency = (amount: number) => {
|
||||
@ -33,7 +32,6 @@ export function SupplyCard({
|
||||
return new Intl.NumberFormat("ru-RU").format(num);
|
||||
};
|
||||
|
||||
const StatusIcon = statusConfig.icon;
|
||||
const isLowStock =
|
||||
supply.currentStock <= supply.minStock && supply.currentStock > 0;
|
||||
const stockPercentage =
|
||||
@ -58,12 +56,6 @@ export function SupplyCard({
|
||||
{supply.description}
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2 ml-2">
|
||||
<Badge className={`${statusConfig.color} text-xs`}>
|
||||
<StatusIcon className="h-3 w-3 mr-1" />
|
||||
{statusConfig.label}
|
||||
</Badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Основная информация */}
|
||||
|
@ -54,7 +54,6 @@ export interface SupplyCardProps {
|
||||
supply: Supply;
|
||||
isExpanded: boolean;
|
||||
onToggleExpansion: (id: string) => void;
|
||||
statusConfig: StatusConfig;
|
||||
getSupplyDeliveries: (supply: Supply) => Supply[];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user