+
-
+
+
-
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
- )}
- {/* Materials list */}
-
- {materials.length === 0 ? (
-
-
-
- Henüz malzeme eklenmemiş
-
-
- Yukarıdaki butona tıklayarak malzeme ekleyebilirsiniz
-
+ {/* Quantity Information */}
+
+
- ) : (
- materials.map((material) => (
-
-
-
-
-
-
-
-
-
- {material.salesOrder?.orderNumber ||
- material.salesOrder?.id}
-
-
- {material.material &&
- `${material.material.code} - ${material.material.name}`}
-
-
- Planlanan:{" "}
-
- {material.plannedQuantity}
- {" "}
- • Gereken:{" "}
-
- {material.requiredQuantity}
-
- • Fire:{" "}
-
- {material.scrapQuantity}
-
-
-
-
-
-
+
+ {/* Schedule Information */}
+
+
+ {/* Cost Information */}
+
+
+
+
+
+
Maliyet Bilgileri
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* Customer Requirement */}
+
+
+
+ {/* Right: Materials section */}
+
+
+
+
+
+
+
+
Malzemeler
+
Üretim için gerekli malzemeler
+
+
+
+
+
+ {/* New material form */}
+ {showNewMaterialForm && (
+
+
+
Yeni Malzeme
+
+
+
+
+
+
+
+
+
+
- ))
+
)}
+
+ {/* Materials list */}
+
+ {materials.length === 0 ? (
+
+
+
Henüz malzeme eklenmemiş
+
+ Yukarıdaki butona tıklayarak malzeme ekleyebilirsiniz
+
+
+ ) : (
+ materials.map((material) => (
+
+
+
+
+
+
+
+
+
+ {material.salesOrder?.orderNumber || material.salesOrder?.id}
+
+
+ {material.material &&
+ `${material.material.code} - ${material.material.name}`}
+
+
+ Planlanan:{' '}
+
+ {material.plannedQuantity}
+ {' '}
+ • Gereken:{' '}
+
+ {material.requiredQuantity}
+
+ • Fire:{' '}
+
+ {material.scrapQuantity}
+
+
+
+
+
+
+
+
+ ))
+ )}
+
-
- );
-};
+
+ )
+}
-export default ProductionOrderForm;
+export default ProductionOrderForm
diff --git a/ui/src/views/mrp/components/ProductionOrderList.tsx b/ui/src/views/mrp/components/ProductionOrderList.tsx
index 5a9b1ebd..dea4ef37 100644
--- a/ui/src/views/mrp/components/ProductionOrderList.tsx
+++ b/ui/src/views/mrp/components/ProductionOrderList.tsx
@@ -1,6 +1,6 @@
-import React, { useState } from "react";
-import { Link } from "react-router-dom";
-import { useQuery } from "@tanstack/react-query";
+import React, { useState } from 'react'
+import { Link } from 'react-router-dom'
+import { useQuery } from '@tanstack/react-query'
import {
FaIndustry,
FaPlus,
@@ -16,25 +16,18 @@ import {
FaArrowRight,
FaArrowLeft,
FaCheck,
-} from "react-icons/fa";
-import classNames from "classnames";
-import {
- ProductionOrderStatusEnum,
- ProductionOrderTypeEnum,
-} from "../../../types/mrp";
-import dayjs from "dayjs";
-import { mockProductionOrders } from "../../../mocks/mockProductionOrders";
-import { mockSalesOrders } from "../../../mocks/mockSalesOrders";
-import { mockBOMs } from "../../../mocks/mockBOMs";
-import {
- SaleOrderStatusEnum,
- SaleOrderItemStatusEnum,
- CrmSalesOrderItem,
-} from "../../../types/crm";
-import { MrpBOM, MrpBOMComponent, MrpBOMOperation } from "../../../types/mrp";
-import { mockWorkCenters } from "../../../mocks/mockWorkCenters";
-import Widget from "../../../components/common/Widget";
-import { PriorityEnum } from "../../../types/common";
+} from 'react-icons/fa'
+import classNames from 'classnames'
+import { ProductionOrderStatusEnum, ProductionOrderTypeEnum } from '../../../types/mrp'
+import dayjs from 'dayjs'
+import { mockProductionOrders } from '../../../mocks/mockProductionOrders'
+import { mockSalesOrders } from '../../../mocks/mockSalesOrders'
+import { mockBOMs } from '../../../mocks/mockBOMs'
+import { SaleOrderStatusEnum, SaleOrderItemStatusEnum, CrmSalesOrderItem } from '../../../types/crm'
+import { MrpBOM, MrpBOMComponent, MrpBOMOperation } from '../../../types/mrp'
+import { mockWorkCenters } from '../../../mocks/mockWorkCenters'
+import Widget from '../../../components/common/Widget'
+import { PriorityEnum } from '../../../types/common'
import {
getPriorityColor,
getPriorityText,
@@ -43,30 +36,31 @@ import {
getProductionOrderStatusColor,
getProductionOrderStatusIcon,
getProductionOrderStatusText,
-} from "../../../utils/erp";
-import { WorkOrderStatusEnum } from "../../../types/pm";
+} from '../../../utils/erp'
+import { WorkOrderStatusEnum } from '../../../types/pm'
+import { Container } from '@/components/shared'
const ProductionOrderList: React.FC = () => {
- const [searchTerm, setSearchTerm] = useState("");
- const [filterStatus, setFilterStatus] = useState("all");
- const [filterPriority, setFilterPriority] = useState("all");
- const [showFilters, setShowFilters] = useState(false);
- const [filterMaterial, setFilterMaterial] = useState("");
- const [filterOrderNumber, setFilterOrderNumber] = useState("");
- const [filterCustomer, setFilterCustomer] = useState("");
+ const [searchTerm, setSearchTerm] = useState('')
+ const [filterStatus, setFilterStatus] = useState('all')
+ const [filterPriority, setFilterPriority] = useState('all')
+ const [showFilters, setShowFilters] = useState(false)
+ const [filterMaterial, setFilterMaterial] = useState('')
+ const [filterOrderNumber, setFilterOrderNumber] = useState('')
+ const [filterCustomer, setFilterCustomer] = useState('')
// Modal states
- const [showCreateModal, setShowCreateModal] = useState(false);
- const [currentStep, setCurrentStep] = useState(1);
+ const [showCreateModal, setShowCreateModal] = useState(false)
+ const [currentStep, setCurrentStep] = useState(1)
const [selectedSalesOrderItems, setSelectedSalesOrderItems] = useState<
(CrmSalesOrderItem & { productionQuantity: number })[]
- >([]);
+ >([])
const [selectedBOMs, setSelectedBOMs] = useState<{
- [materialId: string]: MrpBOM;
- }>({});
+ [materialId: string]: MrpBOM
+ }>({})
const [workCenterSelections, setWorkCenterSelections] = useState<{
- [key: string]: string;
- }>({});
+ [key: string]: string
+ }>({})
const {
data: productionOrders,
@@ -74,7 +68,7 @@ const ProductionOrderList: React.FC = () => {
error,
} = useQuery({
queryKey: [
- "production-orders",
+ 'production-orders',
searchTerm,
filterStatus,
filterPriority,
@@ -83,64 +77,59 @@ const ProductionOrderList: React.FC = () => {
filterCustomer,
],
queryFn: async () => {
- await new Promise((resolve) => setTimeout(resolve, 500));
+ await new Promise((resolve) => setTimeout(resolve, 500))
return mockProductionOrders.filter((order) => {
// Arama ve filtreler
const matchesSearch =
order.orderNumber.toLowerCase().includes(searchTerm.toLowerCase()) ||
order.materials
.map((m) => m.material?.name.toLowerCase())
- .includes(searchTerm.toLowerCase());
- const matchesStatus =
- filterStatus === "all" || order.status === filterStatus;
- const matchesPriority =
- filterPriority === "all" || order.priority === filterPriority;
- return matchesSearch && matchesStatus && matchesPriority;
- });
+ .includes(searchTerm.toLowerCase())
+ const matchesStatus = filterStatus === 'all' || order.status === filterStatus
+ const matchesPriority = filterPriority === 'all' || order.priority === filterPriority
+ return matchesSearch && matchesStatus && matchesPriority
+ })
},
- });
+ })
// Modal functions
const handleSalesOrderItemSelect = (item: CrmSalesOrderItem) => {
setSelectedSalesOrderItems((prev) => {
- const exists = prev.find((i) => i.id === item.id);
+ const exists = prev.find((i) => i.id === item.id)
if (exists) {
- return prev.filter((i) => i.id !== item.id);
+ return prev.filter((i) => i.id !== item.id)
} else {
- return [...prev, { ...item, productionQuantity: item.quantity }];
+ return [...prev, { ...item, productionQuantity: item.quantity }]
}
- });
- };
+ })
+ }
const handleProductionQuantityChange = (itemId: string, quantity: number) => {
setSelectedSalesOrderItems((prev) =>
prev.map((item) => {
if (item.id === itemId) {
- const maxQuantity = item.quantity - (item.deliveredQuantity || 0);
- const validQuantity = Math.min(Math.max(0, quantity), maxQuantity);
- return { ...item, productionQuantity: validQuantity };
+ const maxQuantity = item.quantity - (item.deliveredQuantity || 0)
+ const validQuantity = Math.min(Math.max(0, quantity), maxQuantity)
+ return { ...item, productionQuantity: validQuantity }
}
- return item;
- })
- );
- };
+ return item
+ }),
+ )
+ }
const handleBOMSelect = (materialId: string, bom: MrpBOM) => {
setSelectedBOMs((prev) => ({
...prev,
[materialId]: bom,
- }));
- };
+ }))
+ }
- const handleWorkCenterSelect = (
- operationId: string,
- workCenterId: string
- ) => {
+ const handleWorkCenterSelect = (operationId: string, workCenterId: string) => {
setWorkCenterSelections((prev) => ({
...prev,
[operationId]: workCenterId,
- }));
- };
+ }))
+ }
const handleCreateWorkOrders = () => {
// Create work orders based on selected BOMs and their operations
@@ -165,7 +154,7 @@ const ProductionOrderList: React.FC = () => {
scrapQuantity: 0,
workCenterId: workCenterSelections[bomOp.operationId],
workCenter: mockWorkCenters.find(
- (wc) => wc.id === workCenterSelections[bomOp.operationId]
+ (wc) => wc.id === workCenterSelections[bomOp.operationId],
),
assignedOperators: [],
setupTime: bomOp.setupTime,
@@ -177,39 +166,39 @@ const ProductionOrderList: React.FC = () => {
qualityChecks: [],
creationTime: new Date(),
lastModificationTime: new Date(),
- })) || []
- );
+ })) || [],
+ )
- console.log("Creating work orders:", workOrders);
- console.log("Selected items:", selectedSalesOrderItems);
- console.log("Selected BOMs:", selectedBOMs);
- console.log("Work center selections:", workCenterSelections);
+ console.log('Creating work orders:', workOrders)
+ console.log('Selected items:', selectedSalesOrderItems)
+ console.log('Selected BOMs:', selectedBOMs)
+ console.log('Work center selections:', workCenterSelections)
// Reset modal
- setShowCreateModal(false);
- setCurrentStep(1);
- setSelectedSalesOrderItems([]);
- setSelectedBOMs({});
- setWorkCenterSelections({});
+ setShowCreateModal(false)
+ setCurrentStep(1)
+ setSelectedSalesOrderItems([])
+ setSelectedBOMs({})
+ setWorkCenterSelections({})
// In a real app, you would dispatch an action to create these work orders
- alert(`${workOrders.length} adet iş emri başarıyla oluşturuldu!`);
- };
+ alert(`${workOrders.length} adet iş emri başarıyla oluşturuldu!`)
+ }
const renderModalContent = () => {
switch (currentStep) {
case 1:
- return renderSalesOrderSelection();
+ return renderSalesOrderSelection()
case 2:
- return renderBOMSelection();
+ return renderBOMSelection()
case 3:
- return renderWorkCenterSelection();
+ return renderWorkCenterSelection()
case 4:
- return renderSummary();
+ return renderSummary()
default:
- return null;
+ return null
}
- };
+ }
const renderSalesOrderSelection = () => {
const openSalesOrders = mockSalesOrders.filter((order) =>
@@ -217,43 +206,32 @@ const ProductionOrderList: React.FC = () => {
SaleOrderStatusEnum.Confirmed,
SaleOrderStatusEnum.Ready,
SaleOrderStatusEnum.InProduction,
- ].includes(order.status)
- );
+ ].includes(order.status),
+ )
return (
-
- Açık Satış Siparişleri (Step 1)
-
+
Açık Satış Siparişleri (Step 1)
Üretim emri oluşturmak için malzeme satırlarını seçin.
{openSalesOrders.map((order) => (
-
+
-
- {order.orderNumber}
-
-
- {order.customer?.name}
-
+ {order.orderNumber}
+ {order.customer?.name}
{order.items
- .filter(
- (item) => item.status !== SaleOrderItemStatusEnum.Delivered
- )
+ .filter((item) => item.status !== SaleOrderItemStatusEnum.Delivered)
.map((item) => {
const selectedItem = selectedSalesOrderItems.find(
- (selected) => selected.id === item.id
- );
- const isSelected = !!selectedItem;
+ (selected) => selected.id === item.id,
+ )
+ const isSelected = !!selectedItem
return (
{
/>
- {item.material?.code} {" - "}
+ {item.material?.code} {' - '}
{item.material?.name || item.materialId}
- Miktar: {item.quantity} | Teslim Edilen:{" "}
- {item.deliveredQuantity || 0}
+ Miktar: {item.quantity} | Teslim Edilen: {item.deliveredQuantity || 0}
{isSelected && (
-
+
{
- const value = parseFloat(e.target.value) || 0;
- const maxAllowed =
- item.quantity - (item.deliveredQuantity || 0);
+ const value = parseFloat(e.target.value) || 0
+ const maxAllowed = item.quantity - (item.deliveredQuantity || 0)
if (value > maxAllowed) {
- e.target.value = maxAllowed.toString();
+ e.target.value = maxAllowed.toString()
}
handleProductionQuantityChange(
item.id,
- value > maxAllowed ? maxAllowed : value
- );
+ value > maxAllowed ? maxAllowed : value,
+ )
}}
onBlur={(e) => {
- const value = parseFloat(e.target.value) || 0;
- const maxAllowed =
- item.quantity - (item.deliveredQuantity || 0);
+ const value = parseFloat(e.target.value) || 0
+ const maxAllowed = item.quantity - (item.deliveredQuantity || 0)
if (value > maxAllowed) {
- handleProductionQuantityChange(
- item.id,
- maxAllowed
- );
+ handleProductionQuantityChange(item.id, maxAllowed)
}
}}
className="w-16 px-1.5 py-0.5 text-xs border border-gray-300 rounded focus:ring-blue-500 focus:border-blue-500"
@@ -316,43 +284,42 @@ const ProductionOrderList: React.FC = () => {
)}
- );
+ )
})}
))}
- );
- };
+ )
+ }
const renderBOMSelection = () => {
- if (selectedSalesOrderItems.length === 0) return null;
+ if (selectedSalesOrderItems.length === 0) return null
// Group selected items by material
const groupedItems: {
[materialId: string]: (CrmSalesOrderItem & {
- productionQuantity: number;
- })[];
- } = selectedSalesOrderItems.reduce((acc, item) => {
- if (!acc[item.materialId!]) {
- acc[item.materialId!] = [];
- }
- acc[item.materialId!].push(item);
- return acc;
- }, {} as { [materialId: string]: (CrmSalesOrderItem & { productionQuantity: number })[] });
+ productionQuantity: number
+ })[]
+ } = selectedSalesOrderItems.reduce(
+ (acc, item) => {
+ if (!acc[item.materialId!]) {
+ acc[item.materialId!] = []
+ }
+ acc[item.materialId!].push(item)
+ return acc
+ },
+ {} as { [materialId: string]: (CrmSalesOrderItem & { productionQuantity: number })[] },
+ )
// Check for missing BOMs
- const missingBOMs = Object.keys(groupedItems).filter(
- (materialId) => !selectedBOMs[materialId]
- );
+ const missingBOMs = Object.keys(groupedItems).filter((materialId) => !selectedBOMs[materialId])
return (
BOM Seçimi
-
- Her seçilen malzeme için uygun BOM'u seçin.
-
+
Her seçilen malzeme için uygun BOM'u seçin.
{missingBOMs.length > 0 && (
@@ -364,13 +331,13 @@ const ProductionOrderList: React.FC = () => {
{missingBOMs.map((materialId) => {
- const material = groupedItems[materialId][0].material;
+ const material = groupedItems[materialId][0].material
return (
-
- {material?.code} {" - "}
+ {material?.code} {' - '}
{material?.name || materialId}
- );
+ )
})}
@@ -378,16 +345,11 @@ const ProductionOrderList: React.FC = () => {
{Object.entries(groupedItems).map(([materialId, items]) => {
- const material = items[0].material;
- const totalQuantity = items.reduce(
- (sum, item) => sum + item.productionQuantity,
- 0
- );
+ const material = items[0].material
+ const totalQuantity = items.reduce((sum, item) => sum + item.productionQuantity, 0)
- const availableBOMs = mockBOMs.filter(
- (bom) => bom.materialId === materialId
- );
- const selectedBOM = selectedBOMs[materialId];
+ const availableBOMs = mockBOMs.filter((bom) => bom.materialId === materialId)
+ const selectedBOM = selectedBOMs[materialId]
return (
{
>
- {material?.code} {" - "}
+ {material?.code} {' - '}
{material?.name || materialId}
-
- Toplam Miktar: {totalQuantity}
-
+
Toplam Miktar: {totalQuantity}
{availableBOMs.map((bom) => (
-
+
-
- {bom.bomCode}
-
+ {bom.bomCode}
(Versiyon: {bom.version})
@@ -423,11 +378,11 @@ const ProductionOrderList: React.FC = () => {
onClick={() => handleBOMSelect(materialId, bom)}
className={`px-2 py-0.5 rounded text-xs ${
selectedBOM?.id === bom.id
- ? "bg-green-600 text-white"
- : "bg-blue-600 text-white hover:bg-blue-700"
+ ? 'bg-green-600 text-white'
+ : 'bg-blue-600 text-white hover:bg-blue-700'
}`}
>
- {selectedBOM?.id === bom.id ? "Seçildi" : "Seç"}
+ {selectedBOM?.id === bom.id ? 'Seçildi' : 'Seç'}
@@ -436,14 +391,12 @@ const ProductionOrderList: React.FC = () => {
Bileşenler:
- {bom.components
- .slice(0, 3)
- .map((comp: MrpBOMComponent) => (
- -
- {comp.material?.name || comp.materialId} (
- {comp.quantity} {comp.unitId})
-
- ))}
+ {bom.components.slice(0, 3).map((comp: MrpBOMComponent) => (
+ -
+ {comp.material?.name || comp.materialId} ({comp.quantity}{' '}
+ {comp.unitId})
+
+ ))}
{bom.components.length > 3 && (
-
...ve {bom.components.length - 3} daha fazla
@@ -454,13 +407,11 @@ const ProductionOrderList: React.FC = () => {
Operasyonlar:
- {bom.operations
- ?.slice(0, 3)
- .map((op: MrpBOMOperation) => (
- -
- {op.sequence}. {op.operation?.name}
-
- ))}
+ {bom.operations?.slice(0, 3).map((op: MrpBOMOperation) => (
+ -
+ {op.sequence}. {op.operation?.name}
+
+ ))}
{bom.operations && bom.operations.length > 3 && (
-
...ve {bom.operations.length - 3} daha fazla
@@ -474,25 +425,21 @@ const ProductionOrderList: React.FC = () => {
))}
- );
+ )
})}
- );
- };
+ )
+ }
const renderWorkCenterSelection = () => {
- const selectedBOMsList = Object.values(selectedBOMs);
- if (selectedBOMsList.length === 0) return null;
+ const selectedBOMsList = Object.values(selectedBOMs)
+ if (selectedBOMsList.length === 0) return null
return (
-
- İş Merkezi Seçimi
-
-
- Her operasyon için uygun iş merkezini seçin.
-
+
İş Merkezi Seçimi
+
Her operasyon için uygun iş merkezini seçin.
{selectedBOMsList.map((bom) => (
@@ -505,38 +452,25 @@ const ProductionOrderList: React.FC = () => {
{bom.operations?.map((bomOp: MrpBOMOperation) => {
const availableWorkCenters = mockWorkCenters.filter((wc) => {
- const operationWorkCenterId =
- bomOp.workCenterId || bomOp.operation?.workCenterId;
- return operationWorkCenterId
- ? wc.id === operationWorkCenterId
- : true;
- });
+ const operationWorkCenterId = bomOp.workCenterId || bomOp.operation?.workCenterId
+ return operationWorkCenterId ? wc.id === operationWorkCenterId : true
+ })
return (
-
+
{bomOp.sequence}. {bomOp.operation?.name}
-
- {bomOp.operation?.description}
-
+
{bomOp.operation?.description}
{/* İş merkezi seçimi */}
- );
+ )
})}
))}
- );
- };
+ )
+ }
const renderSummary = () => {
- const selectedBOMsList = Object.values(selectedBOMs);
- if (selectedBOMsList.length === 0) return null;
+ const selectedBOMsList = Object.values(selectedBOMs)
+ if (selectedBOMsList.length === 0) return null
return (
@@ -571,19 +505,12 @@ const ProductionOrderList: React.FC = () => {
{/* Seçilen Malzemeler */}
-
- Seçilen Malzemeler:
-
+
Seçilen Malzemeler:
{selectedSalesOrderItems.map((item, index) => (
-
+
{item.material?.name}
-
- Miktar: {item.productionQuantity}
-
+ Miktar: {item.productionQuantity}
))}
@@ -598,59 +525,41 @@ const ProductionOrderList: React.FC = () => {
-
- Bileşen İhtiyaçları:
-
+
Bileşen İhtiyaçları:
{bom.components.map((comp: MrpBOMComponent) => {
const totalQuantity = selectedSalesOrderItems
.filter((item) => item.materialId === bom.materialId)
- .reduce(
- (sum, item) => sum + item.productionQuantity,
- 0
- );
+ .reduce((sum, item) => sum + item.productionQuantity, 0)
const requiredQuantity =
- comp.quantity *
- totalQuantity *
- (1 + comp.scrapPercentage / 100);
+ comp.quantity * totalQuantity * (1 + comp.scrapPercentage / 100)
return (
-
+
{comp.material?.name || comp.materialId}
{requiredQuantity.toFixed(2)} {comp.unitId}
- );
+ )
})}
-
- İş Merkezi Atamaları:
-
+
İş Merkezi Atamaları:
{bom.operations?.map((bomOp: MrpBOMOperation) => {
const selectedWC = mockWorkCenters.find(
- (wc) =>
- wc.id === workCenterSelections[bomOp.operationId]
- );
+ (wc) => wc.id === workCenterSelections[bomOp.operationId],
+ )
return (
-
+
{bomOp.sequence}. {bomOp.operation?.name}
-
- {selectedWC ? selectedWC.name : "Seçilmemiş"}
-
+ {selectedWC ? selectedWC.name : 'Seçilmemiş'}
- );
+ )
})}
@@ -659,18 +568,16 @@ const ProductionOrderList: React.FC = () => {
))}
- );
- };
+ )
+ }
if (isLoading) {
return (
-
- Üretim emirleri yükleniyor...
-
+
Üretim emirleri yükleniyor...
- );
+ )
}
if (error) {
@@ -678,476 +585,425 @@ const ProductionOrderList: React.FC = () => {
-
- Üretim emirleri yüklenirken hata oluştu.
-
+ Üretim emirleri yüklenirken hata oluştu.
- );
+ )
}
return (
-
- {/* Header */}
-
-
-
Üretim Emirleri
-
- Üretim süreçlerinizi yönetin ve izleyin
-
-
-
-
+
+
+ {/* Header */}
+
+
+
Üretim Emirleri
+
Üretim süreçlerinizi yönetin ve izleyin
+
+
+
-
-
-
-
-
-
-
- setSearchTerm(e.target.value)}
- className="pl-10 pr-4 py-1.5 w-full border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
- />
-
-
-
-
-
- {/* Filters Panel */}
- {showFilters && (
-
-
-
-
-
-
-
-
-
-
-
-
- setFilterMaterial(e.target.value)}
- placeholder="Malzeme..."
- className="w-full border border-gray-300 rounded-lg px-2 py-1.5 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent"
- />
-
-
-
- setFilterOrderNumber(e.target.value)}
- placeholder="Sipariş No..."
- className="w-full border border-gray-300 rounded-lg px-2 py-1.5 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent"
- />
-
-
-
- setFilterCustomer(e.target.value)}
- placeholder="Müşteri..."
- className="w-full border border-gray-300 rounded-lg px-2 py-1.5 text-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent"
- />
-
-
-
-
+
- )}
- {/* Statistics Cards - Compacted */}
-
-
+
+
+
+ setSearchTerm(e.target.value)}
+ className="pl-10 pr-4 py-1.5 w-full border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
+ />
+
-
o.status === ProductionOrderStatusEnum.InProgress
- ).length || 0
- }
- color="yellow"
- icon="FaCog"
- />
-
- o.status === ProductionOrderStatusEnum.Completed
- ).length || 0
- }
- color="green"
- icon="FaCheckCircle"
- />
-
- o.priority === PriorityEnum.Urgent)
- .length || 0
- }
- color="red"
- icon="FaExclamationTriangle"
- />
-
-
- {/* Production Orders Table */}
-
-
-
- Üretim Emirleri
-
+
-
-
-
-
- |
- Emir Bilgileri
- |
-
- Malzeme
- |
-
- Durum / Öncelik
- |
-
- Planlanan Tarihler
- |
-
- Miktar / İlerleme
- |
-
- Maliyet
- |
-
- İşlemler
- |
-
-
-
-
- {productionOrders?.map((order) => {
- const progressPercentage = getProgressPercentage(order);
-
- return (
-
- |
- |