Büyük temizlik

This commit is contained in:
Sedat Öztürk 2025-12-13 17:51:35 +03:00
parent 16dca4a08d
commit 94eab3095b
261 changed files with 193 additions and 96218 deletions

View file

@ -19,6 +19,7 @@ public class IntranetDashboardDto
public List<OvertimeDto> Overtimes { get; set; } = [];
public List<SurveyDto> Surveys { get; set; } = [];
public List<SocialPostDto> SocialPosts { get; set; } = [];
public List<ProjectTaskDto> Tasks { get; set; } = [];
}

View file

@ -0,0 +1,29 @@
using System;
using Volo.Abp.Application.Dtos;
namespace Erp.Platform.Intranet;
public class ProjectTaskDto : FullAuditedEntityDto<Guid>
{
public Guid? TenantId { get; set; }
public Guid? ProjectId { get; set; }
public Guid? PhaseId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string? TaskTypeId { get; set; }
public string Priority { get; set; }
public string? StatusId { get; set; }
public Guid? EmployeeId { get; set; }
public EmployeeDto Employee { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public int Progress { get; set; }
public bool IsActive { get; set; }
}

View file

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using ClosedXML;
using Erp.Platform.BlobStoring;
using Erp.Platform.Entities;
using Erp.Platform.FileManagement;
@ -38,6 +37,7 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
private readonly IRepository<Overtime, Guid> _overtimeRepository;
private readonly IRepository<Survey, Guid> _surveyRepository;
private readonly IRepository<SocialPost, Guid> _socialPostRepository;
private readonly IRepository<ProjectTask, Guid> _projectTaskRepository;
public IntranetAppService(
ICurrentTenant currentTenant,
@ -57,7 +57,8 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
IRepository<Leave, Guid> leaveRepository,
IRepository<Overtime, Guid> overtimeRepository,
IRepository<Survey, Guid> surveyRepository,
IRepository<SocialPost, Guid> socialPostRepository
IRepository<SocialPost, Guid> socialPostRepository,
IRepository<ProjectTask, Guid> projectTaskRepository
)
{
_currentTenant = currentTenant;
@ -78,6 +79,8 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
_overtimeRepository = overtimeRepository;
_surveyRepository = surveyRepository;
_socialPostRepository = socialPostRepository;
_projectTaskRepository = projectTaskRepository;
}
public async Task<IntranetDashboardDto> GetIntranetDashboardAsync()
@ -97,10 +100,23 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
Leaves = await GetLeavesAsync(),
Overtimes = await GetOvertimesAsync(),
Surveys = await GetSurveysAsync(),
SocialPosts = await GetSocialPostsAsync()
SocialPosts = await GetSocialPostsAsync(),
Tasks = await GetProjectTasksAsync()
};
}
private async Task<List<ProjectTaskDto>> GetProjectTasksAsync()
{
var tasks = await _projectTaskRepository
.WithDetailsAsync(e => e.Employee)
.ContinueWith(t => t.Result.Where(s => s.Priority == "High" || s.Priority == "Urgent")
.OrderByDescending(s => s.StartDate)
.Take(3)
.ToList());
return ObjectMapper.Map<List<ProjectTask>, List<ProjectTaskDto>>(tasks);
}
private async Task<List<SocialPostDto>> GetSocialPostsAsync()
{
var socialPosts = await _socialPostRepository
@ -125,8 +141,6 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
private async Task<List<OvertimeDto>> GetOvertimesAsync()
{
var today = DateTime.Now;
var overtimes = await _overtimeRepository
.WithDetailsAsync(e => e.Employee)
.ContinueWith(t => t.Result.ToList());
@ -136,8 +150,6 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService
private async Task<List<LeaveDto>> GetLeavesAsync()
{
var today = DateTime.Now;
var leaves = await _leaveRepository
.WithDetailsAsync(e => e.Employee)
.ContinueWith(t => t.Result.ToList());

View file

@ -40,6 +40,8 @@ public class IntranetAutoMapperProfile : Profile
CreateMap<SocialPollOption, SocialPollOptionDto>();
CreateMap<SocialComment, SocialCommentDto>();
CreateMap<SocialLike, SocialLikeDto>();
CreateMap<ProjectTask, ProjectTaskDto>();
}
}

View file

@ -454,510 +454,6 @@
"componentPath": "@/views/coordinator/ExamInterface/PDFTestInterface",
"routeType": "protected",
"authority": ["App.Coordinator.Tests"]
},
{
"key": "admin.supplychain.requests",
"path": "/admin/supplychain/requests",
"componentPath": "@/views/supplychain/components/PurchaseRequests",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.requestsNew",
"path": "/admin/supplychain/requests/new",
"componentPath": "@/views/supplychain/components/PurchaseRequestForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.requestsEdit",
"path": "/admin/supplychain/requests/edit/:id",
"componentPath": "@/views/supplychain/components/PurchaseRequestForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.requestsView",
"path": "/admin/supplychain/requests/view/:id",
"componentPath": "@/views/supplychain/components/PurchaseRequestForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.quotations",
"path": "/admin/supplychain/quotations",
"componentPath": "@/views/supplychain/components/QuotationManagement",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.quotationsNew",
"path": "/admin/supplychain/quotations/new",
"componentPath": "@/views/supplychain/components/QuotationForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.quotationsEdit",
"path": "/admin/supplychain/quotations/edit/:id",
"componentPath": "@/views/supplychain/components/QuotationForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.quotationsView",
"path": "/admin/supplychain/quotations/view/:id",
"componentPath": "@/views/supplychain/components/QuotationForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.orders",
"path": "/admin/supplychain/orders",
"componentPath": "@/views/supplychain/components/OrderManagement",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.ordersNew",
"path": "/admin/supplychain/orders/new",
"componentPath": "@/views/supplychain/components/OrderManagementForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.ordersEdit",
"path": "/admin/supplychain/orders/edit/:id",
"componentPath": "@/views/supplychain/components/OrderManagementForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.ordersView",
"path": "/admin/supplychain/orders/view/:id",
"componentPath": "@/views/supplychain/components/OrderManagementForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.supplychain.delivery",
"path": "/admin/supplychain/delivery",
"componentPath": "@/views/supplychain/components/DeliveryTracking",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.equipment",
"path": "/admin/maintenance/equipment",
"componentPath": "@/views/maintenance/components/WorkCenterCards",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.equipmentNew",
"path": "/admin/maintenance/equipment/new",
"componentPath": "@/views/maintenance/components/WorkCenterCards",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.equipmentEdit",
"path": "/admin/maintenance/equipment/edit/:id",
"componentPath": "@/views/maintenance/components/WorkCenterCards",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.equipmentDetail",
"path": "/admin/maintenance/equipment/:id",
"componentPath": "@/views/maintenance/components/WorkCenterCards",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.workcenters",
"path": "/admin/maintenance/workcenters",
"componentPath": "@/views/maintenance/components/WorkCenterCards",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.plans",
"path": "/admin/maintenance/plans",
"componentPath": "@/views/maintenance/components/MaintenancePlans",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.calendar",
"path": "/admin/maintenance/calendar",
"componentPath": "@/views/maintenance/components/MaintenanceCalendar",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.teams",
"path": "/admin/maintenance/teams",
"componentPath": "@/views/maintenance/components/MaintenanceTeams",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.faults",
"path": "/admin/maintenance/faults",
"componentPath": "@/views/maintenance/components/FaultNotifications",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.workorders",
"path": "/admin/maintenance/workorders",
"componentPath": "@/views/maintenance/components/MaintenanceWorkOrders",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.workordersNew",
"path": "/admin/maintenance/workorders/new",
"componentPath": "@/views/maintenance/components/MaintenanceWorkOrders",
"routeType": "protected",
"authority": null
},
{
"key": "admin.maintenance.workordersDetail",
"path": "/admin/maintenance/workorders/:id",
"componentPath": "@/views/maintenance/components/MaintenanceWorkOrders",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.definitions",
"path": "/admin/warehouse/definitions",
"componentPath": "@/views/warehouse/components/WarehouseDefinitions",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.putaway",
"path": "/admin/warehouse/putaway",
"componentPath": "@/views/warehouse/components/PutawayRules",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.receipt",
"path": "/admin/warehouse/receipt",
"componentPath": "@/views/warehouse/components/WarehouseReceipt",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.issue",
"path": "/admin/warehouse/issue",
"componentPath": "@/views/warehouse/components/WarehouseIssue",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.transfer",
"path": "/admin/warehouse/transfer",
"componentPath": "@/views/warehouse/components/WarehouseTransfer",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.inventory",
"path": "/admin/warehouse/inventory",
"componentPath": "@/views/warehouse/components/StockLevelsInventory",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.movements",
"path": "/admin/warehouse/movements",
"componentPath": "@/views/warehouse/components/MaterialMovements",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.movementDetail",
"path": "/admin/warehouse/movements/:id",
"componentPath": "@/views/warehouse/components/MaterialMovements",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.stocklevel",
"path": "/admin/warehouse/stocklevel",
"componentPath": "@/views/warehouse/components/InventoryTracking",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.warehouses",
"path": "/admin/warehouse/warehouses",
"componentPath": "@/views/warehouse/components/WarehouseDefinitions",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.warehouseNew",
"path": "/admin/warehouse/new",
"componentPath": "@/views/warehouse/components/WarehouseDefinitions",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.warehouseEdit",
"path": "/admin/warehouse/edit/:id",
"componentPath": "@/views/warehouse/components/WarehouseDefinitions",
"routeType": "protected",
"authority": null
},
{
"key": "admin.warehouse.warehouseDetail",
"path": "/admin/warehouse/warehouses/:id",
"componentPath": "@/views/warehouse/components/WarehouseDefinitions",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.list",
"path": "/admin/projects",
"componentPath": "@/views/project/components/ProjectList",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.new",
"path": "/admin/projects/new",
"componentPath": "@/views/project/components/ProjectForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.edit",
"path": "/admin/projects/edit/:id",
"componentPath": "@/views/project/components/ProjectForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.detail",
"path": "/admin/projects/:id",
"componentPath": "@/views/project/components/ProjectView",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.tasks",
"path": "/admin/projects/tasks",
"componentPath": "@/views/project/components/ProjectTasks",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.phases",
"path": "/admin/projects/phases",
"componentPath": "@/views/project/components/ProjectPhases",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.activities",
"path": "/admin/projects/activities",
"componentPath": "@/views/project/components/ActivityTypes",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.workload",
"path": "/admin/projects/workload",
"componentPath": "@/views/project/components/ProjectGantt",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.costTracking",
"path": "/admin/projects/cost-tracking",
"componentPath": "@/views/project/components/CostTimeTracking",
"routeType": "protected",
"authority": null
},
{
"key": "admin.project.dailyUpdates",
"path": "/admin/projects/daily-updates",
"componentPath": "@/views/project/components/TaskDailyUpdates",
"routeType": "protected",
"authority": null
},
{
"key": "admin.crm.activities",
"path": "/admin/crm/activities",
"componentPath": "@/views/crm/components/ActivityRecords",
"routeType": "protected",
"authority": null
},
{
"key": "admin.crm.salesOrders",
"path": "/admin/crm/sales-orders",
"componentPath": "@/views/crm/components/SalesOrders",
"routeType": "protected",
"authority": null
},
{
"key": "admin.crm.salesOrdersNew",
"path": "/admin/crm/sales-orders/new",
"componentPath": "@/views/crm/components/SalesOrderForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.crm.salesOrdersEdit",
"path": "/admin/crm/sales-orders/edit/:id",
"componentPath": "@/views/crm/components/SalesOrderForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.crm.salesOrdersDetail",
"path": "/admin/crm/sales-orders/:id",
"componentPath": "@/views/crm/components/SalesOrderView",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.operationTypes",
"path": "/admin/mrp/operation-types",
"componentPath": "@/views/mrp/components/OperationTypes",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.workcenters",
"path": "/admin/mrp/workcenters",
"componentPath": "@/views/maintenance/components/WorkCenterCards",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.operations",
"path": "/admin/mrp/operations",
"componentPath": "@/views/mrp/components/OperationDefinitions",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.bom",
"path": "/admin/mrp/bom",
"componentPath": "@/views/mrp/components/BOMManagement",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.productionOrders",
"path": "/admin/mrp/production-orders",
"componentPath": "@/views/mrp/components/ProductionOrderList",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.productionOrderNew",
"path": "/admin/mrp/production-orders/new",
"componentPath": "@/views/mrp/components/ProductionOrderForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.productionOrderEdit",
"path": "/admin/mrp/production-orders/:id/edit",
"componentPath": "@/views/mrp/components/ProductionOrderForm",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.productionOrderDetail",
"path": "/admin/mrp/production-orders/:id",
"componentPath": "@/views/mrp/components/ProductionOrderView",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.workOrders",
"path": "/admin/mrp/work-orders",
"componentPath": "@/views/mrp/components/WorkOrders",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.demandPlanning",
"path": "/admin/mrp/demand-planning",
"componentPath": "@/views/mrp/components/DemandPlanning",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.materialRequirements",
"path": "/admin/mrp/material-requirements",
"componentPath": "@/views/mrp/components/Requirements",
"routeType": "protected",
"authority": null
},
{
"key": "admin.mrp.planningGantt",
"path": "/admin/mrp/planning-gantt",
"componentPath": "@/views/mrp/components/PlanningGantt",
"routeType": "protected",
"authority": null
},
{
"key": "admin.accounting.currentAccounts",
"path": "/admin/accounting/current-accounts",
"componentPath": "@/views/accounting/CurrentAccountPage",
"routeType": "protected",
"authority": null
},
{
"key": "admin.accounting.waybills",
"path": "/admin/accounting/waybills",
"componentPath": "@/views/accounting/WaybillPage",
"routeType": "protected",
"authority": null
},
{
"key": "admin.accounting.invoices",
"path": "/admin/accounting/invoices",
"componentPath": "@/views/accounting/InvoicePage",
"routeType": "protected",
"authority": null
},
{
"key": "admin.accounting.invoicesNew",
"path": "/admin/accounting/invoices/new",
"componentPath": "@/views/accounting/InvoicePage",
"routeType": "protected",
"authority": null
},
{
"key": "admin.accounting.cash",
"path": "/admin/accounting/cash",
"componentPath": "@/views/accounting/CashPage",
"routeType": "protected",
"authority": null
},
{
"key": "admin.accounting.bank",
"path": "/admin/accounting/bank",
"componentPath": "@/views/accounting/BankPage",
"routeType": "protected",
"authority": null
},
{
"key": "admin.accounting.checkNote",
"path": "/admin/accounting/check-note",
"componentPath": "@/views/accounting/CheckNotePage",
"routeType": "protected",
"authority": null
}
],
"Menus": [

View file

@ -26,7 +26,7 @@ public class ProjectTask : FullAuditedEntity<Guid>, IMultiTenant
public Status? Status { get; set; }
public Guid? EmployeeId { get; set; }
public Employee? Employee { get; set; }
public Employee Employee { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }

View file

@ -1,6 +1,25 @@
{
"commit": "43a8e20e",
"commit": "16dca4a0",
"releases": [
{
"version": "1.0.37",
"buildDate": "2025-12-07",
"commit": "8fd2d58c0f629af466df87dd8b03a17d9c44ceb2",
"changeLog": [
"- Before ve After Insert Command",
"- Before ve After Update Command",
"- Before ve After Delete Command",
"Bu tanımlamalar artık liste formlarda çalıştırıldı test edildi."
]
},
{
"version": "1.0.36",
"buildDate": "2025-12-06",
"commit": "9938acb94c3758a54bcb8593690825b63a4ab54f",
"changeLog": [
"SQL Query Manager komponentin üretildi. Artık uygulama üzerinden veritabanına hükmedilebilecek."
]
},
{
"version": "1.0.34",
"buildDate": "2025-11-18",
@ -173,7 +192,7 @@
{
"version": "1.0.14",
"buildDate": "2025-09-22",
"commit": "1c4ab4f8232b4cd2a39fa66f8101664840113ce5",
"commit": "51208b86937484d68b699120d74872067b1c7ef6",
"changeLog": [
"Yeni versiyon çıktı uyarı gelecek şekilde düzenlendi.",
"Sağ alt kısımda mesaj çıkacak ve yenile butonu ile uygulama yeni versiyona geçecektir."

View file

@ -1,180 +0,0 @@
import React, { useState, useRef, useEffect } from "react";
import { FaChevronDown, FaTimes } from "react-icons/fa";
import { mockEmployees } from "../../mocks/mockEmployees";
import { EmployeeDto } from "@/proxy/intranet/models";
interface MultiSelectEmployeeProps {
selectedEmployees: string[];
onChange: (employeeIds: string[]) => void;
placeholder?: string;
disabled?: boolean;
className?: string;
}
const MultiSelectEmployee: React.FC<MultiSelectEmployeeProps> = ({
selectedEmployees,
onChange,
placeholder = "Personel seçin",
disabled = false,
className = "",
}) => {
const [isOpen, setIsOpen] = useState(false);
const [searchTerm, setSearchTerm] = useState("");
const dropdownRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
if (
dropdownRef.current &&
!dropdownRef.current.contains(event.target as Node)
) {
setIsOpen(false);
setSearchTerm("");
}
};
document.addEventListener("mousedown", handleClickOutside);
return () => {
document.removeEventListener("mousedown", handleClickOutside);
};
}, []);
const filteredEmployees = mockEmployees.filter(
(employee: EmployeeDto) =>
employee.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
employee.code.toLowerCase().includes(searchTerm.toLowerCase())
);
const handleEmployeeToggle = (employeeId: string) => {
if (selectedEmployees.includes(employeeId)) {
onChange(selectedEmployees.filter((id) => id !== employeeId));
} else {
onChange([...selectedEmployees, employeeId]);
}
};
const handleRemoveEmployee = (employeeId: string, e: React.MouseEvent) => {
e.stopPropagation();
onChange(selectedEmployees.filter((id) => id !== employeeId));
};
const selectedEmployeeObjects = mockEmployees.filter((emp: EmployeeDto) =>
selectedEmployees.includes(emp.id)
);
return (
<div className={`relative ${className}`} ref={dropdownRef}>
<div
className={`
w-full min-h-[38px] px-2 py-2 border border-gray-300 rounded-lg
focus:ring-2 focus:ring-blue-500 focus:border-blue-500 cursor-pointer
${
disabled
? "bg-gray-100 cursor-not-allowed"
: "bg-white hover:border-gray-400"
}
`}
onClick={() => !disabled && setIsOpen(!isOpen)}
>
<div className="flex items-center justify-between">
<div className="flex flex-wrap gap-1 flex-1">
{selectedEmployeeObjects.length > 0 ? (
selectedEmployeeObjects.map((employee: EmployeeDto) => (
<span
key={employee.id}
className="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-blue-100 text-blue-800"
>
{employee.name}
{!disabled && (
<button
type="button"
onClick={(e) => handleRemoveEmployee(employee.id, e)}
className="ml-1 inline-flex items-center justify-center w-4 h-4 rounded-full hover:bg-blue-200"
>
<FaTimes className="w-2 h-2" />
</button>
)}
</span>
))
) : (
<span className="text-gray-500">{placeholder}</span>
)}
</div>
{!disabled && (
<FaChevronDown
className={`w-4 h-4 text-gray-400 transition-transform ${
isOpen ? "transform rotate-180" : ""
}`}
/>
)}
</div>
</div>
{isOpen && !disabled && (
<div className="absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-hidden">
{/* Search Input */}
<div className="p-2 border-b border-gray-200">
<input
type="text"
placeholder="Personel ara..."
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-full px-3 py-2 text-sm border border-gray-300 rounded focus:ring-1 focus:ring-blue-500 focus:border-blue-500"
onClick={(e) => e.stopPropagation()}
/>
</div>
{/* Options List */}
<div className="max-h-48 overflow-y-auto">
{filteredEmployees.length > 0 ? (
filteredEmployees.map((employee: EmployeeDto) => (
<div
key={employee.id}
className={`
px-3 py-2 cursor-pointer hover:bg-gray-100 flex items-center justify-between
${
selectedEmployees.includes(employee.id)
? "bg-blue-50"
: ""
}
`}
onClick={() => handleEmployeeToggle(employee.id)}
>
<div>
<div className="text-sm font-medium text-gray-900">
{employee.name}
</div>
<div className="text-xs text-gray-500">
{employee.code} - {employee.jobPosition?.name}
</div>
</div>
{selectedEmployees.includes(employee.id) && (
<div className="w-4 h-4 bg-blue-500 text-white rounded-full flex items-center justify-center">
<svg
className="w-3 h-3"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
fillRule="evenodd"
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
clipRule="evenodd"
/>
</svg>
</div>
)}
</div>
))
) : (
<div className="px-3 py-2 text-sm text-gray-500">
Personel bulunamadı
</div>
)}
</div>
</div>
)}
</div>
);
};
export default MultiSelectEmployee;

View file

@ -1,190 +0,0 @@
import React, { useState, useRef, useEffect } from "react";
import { FaChevronDown, FaTimes } from "react-icons/fa";
import { mockMaintenanceTeams } from "../../mocks/mockMaintenanceTeams";
import { Team } from "../../types/common";
interface MultiSelectTeamProps {
selectedTeams: string[];
onChange: (teams: string[]) => void;
placeholder?: string;
disabled?: boolean;
className?: string;
}
const MultiSelectTeam: React.FC<MultiSelectTeamProps> = ({
selectedTeams,
onChange,
placeholder = "Ekip seçin",
disabled = false,
className = "",
}) => {
const [isOpen, setIsOpen] = useState(false);
const [searchTerm, setSearchTerm] = useState("");
const dropdownRef = useRef<HTMLDivElement>(null);
useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
if (
dropdownRef.current &&
!dropdownRef.current.contains(event.target as Node)
) {
setIsOpen(false);
setSearchTerm("");
}
};
document.addEventListener("mousedown", handleClickOutside);
return () => {
document.removeEventListener("mousedown", handleClickOutside);
};
}, []);
const filteredTeams = mockMaintenanceTeams.filter(
(team: Team) =>
team.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
team.code.toLowerCase().includes(searchTerm.toLowerCase())
);
const handleTeamToggle = (teamName: string) => {
if (selectedTeams.includes(teamName)) {
onChange(selectedTeams.filter((name) => name !== teamName));
} else {
onChange([...selectedTeams, teamName]);
}
};
const handleRemoveTeam = (teamName: string, e: React.MouseEvent) => {
e.stopPropagation();
onChange(selectedTeams.filter((name) => name !== teamName));
};
const selectedTeamObjects = mockMaintenanceTeams.filter((team: Team) =>
selectedTeams.includes(team.name)
);
return (
<div className={`relative ${className}`} ref={dropdownRef}>
<div
className={`
w-full min-h-[38px] px-2 py-2 border border-gray-300 rounded-lg
focus:ring-2 focus:ring-blue-500 focus:border-blue-500 cursor-pointer
${
disabled
? "bg-gray-100 cursor-not-allowed"
: "bg-white hover:border-gray-400"
}
`}
onClick={() => !disabled && setIsOpen(!isOpen)}
>
<div className="flex items-center justify-between">
<div className="flex flex-wrap gap-1 flex-1">
{selectedTeamObjects.length > 0 ? (
selectedTeamObjects.map((team: Team) => (
<span
key={team.id}
className="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-blue-100 text-blue-800"
>
{team.name}
{!disabled && (
<button
type="button"
onClick={(e) => handleRemoveTeam(team.name, e)}
className="ml-1 inline-flex items-center justify-center w-4 h-4 rounded-full hover:bg-blue-200"
>
<FaTimes className="w-2 h-2" />
</button>
)}
</span>
))
) : (
<span className="text-gray-500">{placeholder}</span>
)}
</div>
{!disabled && (
<FaChevronDown
className={`w-4 h-4 text-gray-400 transition-transform ${
isOpen ? "transform rotate-180" : ""
}`}
/>
)}
</div>
</div>
{isOpen && !disabled && (
<div className="absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-hidden">
{/* Search Input */}
<div className="p-2 border-b border-gray-200">
<input
type="text"
placeholder="Ekip ara..."
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-full px-3 py-2 text-sm border border-gray-300 rounded focus:ring-1 focus:ring-blue-500 focus:border-blue-500"
onClick={(e) => e.stopPropagation()}
/>
</div>
{/* Options List */}
<div className="max-h-48 overflow-y-auto">
{filteredTeams.length > 0 ? (
filteredTeams.map((team: Team) => (
<div
key={team.id}
className={`
px-3 py-2 cursor-pointer hover:bg-gray-100 flex items-center justify-between
${selectedTeams.includes(team.name) ? "bg-blue-50" : ""}
`}
onClick={() => handleTeamToggle(team.name)}
>
<div>
<div className="text-sm font-medium text-gray-900">
{team.name}
</div>
<div className="text-xs text-gray-500">
{team.code} - {team.description}
</div>
<div className="flex items-center mt-1">
<span
className={`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${
team.isActive
? "bg-green-100 text-green-800"
: "bg-gray-100 text-gray-800"
}`}
>
{team.isActive ? "Aktif" : "Pasif"}
</span>
<span className="ml-2 text-xs text-gray-500">
{team.members.filter((m) => m.isActive).length} üye
</span>
</div>
</div>
{selectedTeams.includes(team.name) && (
<div className="w-4 h-4 bg-blue-500 text-white rounded-full flex items-center justify-center">
<svg
className="w-3 h-3"
fill="currentColor"
viewBox="0 0 20 20"
>
<path
fillRule="evenodd"
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
clipRule="evenodd"
/>
</svg>
</div>
)}
</div>
))
) : (
<div className="px-3 py-2 text-sm text-gray-500">
Ekip bulunamadı
</div>
)}
</div>
</div>
)}
</div>
);
};
export default MultiSelectTeam;

View file

@ -1,174 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
CrmActivity,
CrmActivityTypeEnum,
ActivityStatusEnum,
} from "../types/crm";
import { mockBusinessParties } from "./mockBusinessParties";
import { mockEmployees } from "./mockEmployees";
export const mockActivities: CrmActivity[] = [
{
id: "act_001",
activityType: CrmActivityTypeEnum.Call,
subject: "Teklif Görüşmesi - ABC Şirketi",
description: "Yeni proje için teklif sunumu ve fiyat görüşmesi yapılacak.",
customerId: "6",
customer: mockBusinessParties.find((cust) => cust.id === "6"),
activityDate: new Date("2024-01-25T10:00:00"),
startTime: new Date("2024-01-25T10:00:00"),
endTime: new Date("2024-01-25T11:00:00"),
duration: 60,
assignedTo: "1",
assigned: mockEmployees.find((emp) => emp.id === "1"),
participants: ["3", "2"],
status: ActivityStatusEnum.Planned,
priority: PriorityEnum.High,
followUpDate: new Date("2024-01-30"),
followUpActivity: "Teklif cevabı takip edilecek",
creationTime: new Date("2024-01-20T09:00:00"),
lastModificationTime: new Date("2024-01-20T09:00:00"),
},
{
id: "act_002",
activityType: CrmActivityTypeEnum.Meeting,
subject: "Proje Kickoff Toplantısı",
description: "XYZ projesi için başlangıç toplantısı düzenlenecek.",
customerId: "5",
customer: mockBusinessParties.find((cust) => cust.id === "5"),
activityDate: new Date("2024-01-24T14:00:00"),
startTime: new Date("2024-01-24T14:00:00"),
endTime: new Date("2024-01-24T16:00:00"),
duration: 120,
assignedTo: "2",
assigned: mockEmployees.find((emp) => emp.id === "2"),
participants: ["3", "2", "4"],
status: ActivityStatusEnum.Completed,
priority: PriorityEnum.Normal,
outcome: "Proje kapsamı netleştirildi ve görev dağılımı yapıldı.",
nextSteps: "Detaylı proje planı hazırlanacak.",
creationTime: new Date("2024-01-18T11:30:00"),
lastModificationTime: new Date("2024-01-24T16:15:00"),
},
{
id: "act_003",
activityType: CrmActivityTypeEnum.Email,
subject: "Ürün Katalogu Gönderimi",
description:
"Müşteriye güncel ürün katalogu ve fiyat listesi e-posta ile gönderildi.",
customerId: "5",
customer: mockBusinessParties.find((cust) => cust.id === "5"),
activityDate: new Date("2024-01-23T09:30:00"),
duration: 15,
assignedTo: "3",
assigned: mockEmployees.find((emp) => emp.id === "3"),
participants: [],
status: ActivityStatusEnum.Completed,
priority: PriorityEnum.Low,
outcome: "Katalog başarıyla gönderildi, müşteri geri dönüş yaptı.",
creationTime: new Date("2024-01-23T09:15:00"),
lastModificationTime: new Date("2024-01-23T09:45:00"),
},
{
id: "act_004",
activityType: CrmActivityTypeEnum.Demo,
subject: "Yazılım Demo Sunumu",
description:
"Erp sisteminin demo sunumu müşteri lokasyonunda gerçekleştirilecek.",
customerId: "5",
customer: mockBusinessParties.find((cust) => cust.id === "5"),
activityDate: new Date("2024-01-26T13:00:00"),
startTime: new Date("2024-01-26T13:00:00"),
endTime: new Date("2024-01-26T15:00:00"),
duration: 120,
assignedTo: "4",
assigned: mockEmployees.find((emp) => emp.id === "4"),
participants: ["5", "10"],
status: ActivityStatusEnum.InProgress,
priority: PriorityEnum.High,
followUpDate: new Date("2024-01-29"),
followUpActivity: "Demo sonrası müşteri geri bildirimlerini al",
creationTime: new Date("2024-01-19T16:00:00"),
lastModificationTime: new Date("2024-01-22T10:30:00"),
},
{
id: "act_005",
activityType: CrmActivityTypeEnum.Task,
subject: "Müşteri Memnuniyet Anketi",
description:
"Proje teslimi sonrası müşteri memnuniyet anketi düzenlenecek.",
customerId: "6",
customer: mockBusinessParties.find((cust) => cust.id === "6"),
activityDate: new Date("2024-01-28T10:00:00"),
duration: 30,
assignedTo: "5",
assigned: mockEmployees.find((emp) => emp.id === "5"),
participants: [],
status: ActivityStatusEnum.Planned,
priority: PriorityEnum.Normal,
followUpDate: new Date("2024-02-05"),
followUpActivity: "Anket sonuçlarını değerlendir ve rapor hazırla",
creationTime: new Date("2024-01-21T14:20:00"),
lastModificationTime: new Date("2024-01-21T14:20:00"),
},
{
id: "act_006",
activityType: CrmActivityTypeEnum.Note,
subject: "Müşteri Taleplerini Değerlendirme",
description:
"Müşterinin ek özellik talepleri not alındı ve teknik ekiple paylaşıldı.",
customerId: "6",
customer: mockBusinessParties.find((cust) => cust.id === "6"),
activityDate: new Date("2024-01-22T15:45:00"),
assignedTo: "6",
assigned: mockEmployees.find((emp) => emp.id === "6"),
participants: [],
status: ActivityStatusEnum.Completed,
priority: PriorityEnum.Normal,
outcome:
"Talepler teknik ekiple değerlendirildi, uygulama planı oluşturuldu.",
nextSteps: "Müşteriye geri dönüş yapılacak ve timeline paylaşılacak.",
creationTime: new Date("2024-01-22T15:30:00"),
lastModificationTime: new Date("2024-01-22T16:00:00"),
},
{
id: "act_007",
activityType: CrmActivityTypeEnum.Proposal,
subject: "Yıllık Bakım Sözleşmesi Teklifi",
description:
"Sistemin yıllık bakım ve destek hizmetleri için teklif hazırlandı.",
customerId: "5",
customer: mockBusinessParties.find((cust) => cust.id === "5"),
activityDate: new Date("2024-01-27T11:00:00"),
duration: 45,
assignedTo: "7",
assigned: mockEmployees.find((emp) => emp.id === "7"),
participants: ["7"],
status: ActivityStatusEnum.Planned,
priority: PriorityEnum.Normal,
followUpDate: new Date("2024-02-03"),
followUpActivity: "Teklif sunumu yapılacak",
creationTime: new Date("2024-01-24T09:30:00"),
lastModificationTime: new Date("2024-01-24T09:30:00"),
},
{
id: "act_008",
activityType: CrmActivityTypeEnum.Call,
subject: "Ödeme Planı Görüşmesi",
description:
"Projenin ödeme planı ve faturalandırma detayları görüşülecek.",
customerId: "5",
customer: mockBusinessParties.find((cust) => cust.id === "5"),
activityDate: new Date("2024-01-29T09:00:00"),
startTime: new Date("2024-01-29T09:00:00"),
endTime: new Date("2024-01-29T09:30:00"),
duration: 30,
assignedTo: "8",
assigned: mockEmployees.find((emp) => emp.id === "8"),
participants: [],
status: ActivityStatusEnum.Planned,
priority: PriorityEnum.High,
creationTime: new Date("2024-01-25T13:15:00"),
lastModificationTime: new Date("2024-01-25T13:15:00"),
},
];

View file

@ -1,92 +0,0 @@
import { PsActivityTypeEnum, PsActivity } from "../types/ps";
export const activityTypes: PsActivity[] = [
{
id: "1",
activityType: PsActivityTypeEnum.TaskCreated,
name: "Görev Oluşturma",
description: "Yeni bir görev oluşturulması",
category: "Görev Yönetimi",
defaultDuration: 0.5,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "2",
activityType: PsActivityTypeEnum.TaskUpdated,
name: "Görev Güncelleme",
description: "Mevcut görevde değişiklik yapılması",
category: "Görev Yönetimi",
defaultDuration: 0.25,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "3",
activityType: PsActivityTypeEnum.TaskCompleted,
name: "Görev Tamamlama",
description: "Görevin tamamlanarak kapatılması",
category: "Görev Yönetimi",
defaultDuration: 0.5,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "4",
activityType: PsActivityTypeEnum.CommentAdded,
name: "Yorum Ekleme",
description: "Görev veya projeye yorum eklenmesi",
category: "İletişim",
defaultDuration: 0.1,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "5",
activityType: PsActivityTypeEnum.FileUploaded,
name: "Dosya Yükleme",
description: "Proje veya göreve dosya eklenmesi",
category: "Dokümantasyon",
defaultDuration: 0.25,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "6",
activityType: PsActivityTypeEnum.StatusChanged,
name: "Durum Değişikliği",
description: "Görev veya proje durumunun değiştirilmesi",
category: "Durum Yönetimi",
defaultDuration: 0.1,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "7",
activityType: PsActivityTypeEnum.AssignmentChanged,
name: "Atama Değişikliği",
description: "Görevin farklı bir kişiye atanması",
category: "Kaynak Yönetimi",
defaultDuration: 0.1,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "8",
activityType: PsActivityTypeEnum.MeetingScheduled,
name: "Toplantı Planlama",
description: "Proje ile ilgili toplantı planlanması",
category: "Toplantı",
defaultDuration: 1.0,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
];

View file

@ -1,193 +0,0 @@
import {
ApprovalLevelEnum,
MmApprovalWorkflow,
RequestTypeEnum,
} from "../types/mm";
import { mockDepartments } from "./mockDepartments";
export const mockApprovalWorkflows: MmApprovalWorkflow[] = [
{
id: "1",
name: "Üretim Malzeme Onayı",
departmentId: "1",
department: mockDepartments.find((d) => d.id === "1"),
requestType: RequestTypeEnum.Material,
amountThreshold: 50000,
approvalLevels: [
{
id: "AL001",
workflowId: "1",
level: ApprovalLevelEnum.Supervisor,
approverUserIds: ["USR001", "USR002"],
approverNames: ["Mehmet Yılmaz", "Ali Kaya"],
sequence: 1,
isRequired: true,
isParallel: false,
timeoutDays: 2,
},
{
id: "AL002",
workflowId: "1",
level: ApprovalLevelEnum.Manager,
approverUserIds: ["USR003"],
approverNames: ["Ayşe Demir"],
sequence: 2,
isRequired: true,
isParallel: false,
timeoutDays: 3,
},
{
id: "AL003",
workflowId: "1",
level: ApprovalLevelEnum.FinanceManager,
approverUserIds: ["USR004"],
approverNames: ["Fatma Özkan"],
sequence: 3,
isRequired: false,
isParallel: false,
timeoutDays: 5,
},
],
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "2",
name: "IT İş Merkezi Onayı",
departmentId: "2",
department: mockDepartments.find((d) => d.id === "2"),
requestType: RequestTypeEnum.WorkCenter,
amountThreshold: 100000,
approvalLevels: [
{
id: "AL004",
workflowId: "2",
level: ApprovalLevelEnum.TechnicalManager,
approverUserIds: ["USR005"],
approverNames: ["Murat Şen"],
sequence: 1,
isRequired: true,
isParallel: false,
timeoutDays: 3,
},
{
id: "AL005",
workflowId: "2",
level: ApprovalLevelEnum.Director,
approverUserIds: ["USR006", "USR007"],
approverNames: ["Hasan Kara", "Zeynep Akın"],
sequence: 2,
isRequired: true,
isParallel: true,
timeoutDays: 5,
},
{
id: "AL006",
workflowId: "2",
level: ApprovalLevelEnum.GeneralManager,
approverUserIds: ["USR008"],
approverNames: ["Ahmet Yıldız"],
sequence: 3,
isRequired: true,
isParallel: false,
timeoutDays: 7,
},
],
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "3",
name: "Bakım Hizmet Onayı",
departmentId: "3",
department: mockDepartments.find((d) => d.id === "3"),
requestType: RequestTypeEnum.Service,
amountThreshold: 25000,
approvalLevels: [
{
id: "AL007",
workflowId: "3",
level: ApprovalLevelEnum.Supervisor,
approverUserIds: ["USR009"],
approverNames: ["Kemal Özdemir"],
sequence: 1,
isRequired: true,
isParallel: false,
timeoutDays: 1,
},
{
id: "AL008",
workflowId: "3",
level: ApprovalLevelEnum.Manager,
approverUserIds: ["USR010"],
approverNames: ["Leyla Çelik"],
sequence: 2,
isRequired: true,
isParallel: false,
timeoutDays: 2,
},
],
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "4",
name: "Yüksek Tutar Onayı",
departmentId: "4",
department: mockDepartments.find((d) => d.id === "4"),
requestType: RequestTypeEnum.Material,
amountThreshold: 500000,
approvalLevels: [
{
id: "AL009",
workflowId: "4",
level: ApprovalLevelEnum.Manager,
approverUserIds: ["USR011"],
approverNames: ["Selim Yağcı"],
sequence: 1,
isRequired: true,
isParallel: false,
timeoutDays: 2,
},
{
id: "AL010",
workflowId: "4",
level: ApprovalLevelEnum.FinanceManager,
approverUserIds: ["USR012"],
approverNames: ["Burcu Arslan"],
sequence: 2,
isRequired: true,
isParallel: false,
timeoutDays: 3,
},
{
id: "AL011",
workflowId: "4",
level: ApprovalLevelEnum.Director,
approverUserIds: ["USR013"],
approverNames: ["Can Demirtaş"],
sequence: 3,
isRequired: true,
isParallel: false,
timeoutDays: 5,
},
{
id: "AL012",
workflowId: "4",
level: ApprovalLevelEnum.GeneralManager,
approverUserIds: ["USR014"],
approverNames: ["Eda Yurtseven"],
sequence: 4,
isRequired: true,
isParallel: false,
timeoutDays: 7,
},
],
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
];

View file

@ -1,319 +0,0 @@
import { MrpBOM, BOMTypeEnum } from "../types/mrp";
import { mockMaterials } from "./mockMaterials";
import { mockOperations } from "./mockOperations";
// Mock data
export const mockBOMs: MrpBOM[] = [
{
id: "1",
bomCode: "BOM-MOT-001",
materialId: "1", // Motor Blok - Workflow ile eşleştirilen malzeme
material: mockMaterials.find((m) => m.id === "1")!,
version: "1.0",
validFrom: new Date("2024-01-01"),
validTo: new Date("2024-12-31"),
isActive: true,
bomType: BOMTypeEnum.Production,
baseQuantity: 1,
components: [
{
id: "COMP001",
bomId: "1",
materialId: "3", // Çelik Levha
material: mockMaterials.find((m) => m.id === "3")!,
quantity: 2,
unitId: "PCS",
scrapPercentage: 5,
isPhantom: false,
position: 10,
validFrom: new Date("2024-01-01"),
isActive: true,
},
{
id: "COMP002",
bomId: "1",
materialId: "4", // Alüminyum Profil
material: mockMaterials.find((m) => m.id === "4")!,
quantity: 1,
unitId: "PCS",
scrapPercentage: 2,
isPhantom: false,
position: 20,
validFrom: new Date("2024-01-01"),
isActive: true,
},
{
id: "COMP003",
bomId: "1",
materialId: "5", // Plastik Kapak
material: mockMaterials.find((m) => m.id === "5")!,
quantity: 1,
unitId: "PCS",
scrapPercentage: 3,
isPhantom: false,
position: 30,
validFrom: new Date("2024-01-01"),
isActive: true,
},
],
operations: [
// Workflow RT001 ile eşleştirilen operasyonlar
{
id: "BOMOP001",
bomId: "1",
operationId: "1", // CNC Torna
operation: mockOperations.find((op) => op.id === "1")!,
sequence: 10,
setupTime: 30,
runTime: 45,
queueTime: 15,
moveTime: 5,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
{
id: "BOMOP002",
bomId: "1",
operationId: "2", // Kaynak
operation: mockOperations.find((op) => op.id === "2")!,
sequence: 20,
setupTime: 15,
runTime: 60,
queueTime: 10,
moveTime: 5,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
{
id: "BOMOP003",
bomId: "1",
operationId: "3", // Kalite Kontrolü
operation: mockOperations.find((op) => op.id === "3")!,
sequence: 30,
setupTime: 5,
runTime: 20,
queueTime: 5,
moveTime: 3,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
],
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "2",
bomCode: "BOM-GEAR-001",
materialId: "2", // Şanzıman Kasası - Workflow ile eşleştirilen malzeme
material: mockMaterials.find((m) => m.id === "2")!,
version: "2.1",
validFrom: new Date("2024-02-01"),
validTo: new Date("2024-12-31"),
isActive: true,
bomType: BOMTypeEnum.Production,
baseQuantity: 1,
components: [
{
id: "COMP004",
bomId: "2",
materialId: "1", // Motor Blok
material: mockMaterials.find((m) => m.id === "1")!,
quantity: 1,
unitId: "PCS",
scrapPercentage: 3,
isPhantom: false,
position: 10,
validFrom: new Date("2024-02-01"),
isActive: true,
},
{
id: "COMP005",
bomId: "2",
materialId: "3", // Çelik Levha
material: mockMaterials.find((m) => m.id === "3")!,
quantity: 3,
unitId: "KG",
scrapPercentage: 4,
isPhantom: false,
position: 20,
validFrom: new Date("2024-02-01"),
isActive: true,
},
{
id: "COMP006",
bomId: "2",
materialId: "4", // Alüminyum Profil
material: mockMaterials.find((m) => m.id === "4")!,
quantity: 2,
unitId: "M",
scrapPercentage: 2,
isPhantom: false,
position: 30,
validFrom: new Date("2024-02-01"),
isActive: true,
},
],
operations: [
// Workflow RT002 ile eşleştirilen operasyonlar
{
id: "BOMOP004",
bomId: "2",
operationId: "4", // Paketleme
operation: mockOperations.find((op) => op.id === "4")!,
sequence: 10,
setupTime: 20,
runTime: 45,
queueTime: 10,
moveTime: 5,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
{
id: "BOMOP005",
bomId: "2",
operationId: "1", // CNC Torna
operation: mockOperations.find((op) => op.id === "1")!,
sequence: 20,
setupTime: 25,
runTime: 70,
queueTime: 12,
moveTime: 8,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
{
id: "BOMOP006",
bomId: "2",
operationId: "3", // Kalite Kontrolü
operation: mockOperations.find((op) => op.id === "3")!,
sequence: 30,
setupTime: 10,
runTime: 30,
queueTime: 8,
moveTime: 5,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
],
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "3",
bomCode: "BOM-PCB-001",
materialId: "5", // Plastik Kapak - yeni workflow ekleyelim
material: mockMaterials.find((m) => m.id === "5")!,
version: "1.0",
validFrom: new Date("2024-03-01"),
isActive: true,
bomType: BOMTypeEnum.Production,
baseQuantity: 1,
components: [
{
id: "COMP007",
bomId: "3",
materialId: "3", // Çelik Levha
material: mockMaterials.find((m) => m.id === "3")!,
quantity: 0.5,
unitId: "KG",
scrapPercentage: 5,
isPhantom: false,
position: 10,
validFrom: new Date("2024-03-01"),
isActive: true,
},
{
id: "COMP008",
bomId: "3",
materialId: "4", // Alüminyum Profil
material: mockMaterials.find((m) => m.id === "4")!,
quantity: 0.2,
unitId: "M",
scrapPercentage: 3,
isPhantom: false,
position: 20,
validFrom: new Date("2024-03-01"),
isActive: true,
},
],
operations: [
// Basit plastik kapak işlemleri
{
id: "BOMOP007",
bomId: "3",
operationId: "5", // Bakım/Kalıp işlemi
operation: mockOperations.find((op) => op.id === "5")!,
sequence: 10,
setupTime: 15,
runTime: 25,
queueTime: 5,
moveTime: 3,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
{
id: "BOMOP008",
bomId: "3",
operationId: "4", // Paketleme
operation: mockOperations.find((op) => op.id === "4")!,
sequence: 20,
setupTime: 5,
runTime: 10,
queueTime: 3,
moveTime: 2,
isActive: true,
waitTime: 0,
workCenterId: "",
isParallel: false,
prerequisites: [],
qualityChecks: [],
tools: [],
skills: [],
},
],
creationTime: new Date(),
lastModificationTime: new Date(),
},
];

View file

@ -1,88 +0,0 @@
import { HrBadge, BadgeCategoryEnum, BadgeRarityEnum } from "../types/hr";
export const mockBadges: HrBadge[] = [
{
id: "badge-001",
code: "STAR_PERFORMER",
name: "Yıldız Performans",
description:
"Üstün performans sergileyen çalışanlara verilen prestijli rozet",
icon: "⭐",
color: "#FFD700",
backgroundColor: "#FFF8DC",
category: BadgeCategoryEnum.Performance,
criteria: "3 çeyrek üst üste hedefleri %110 üzerinde tamamlama",
points: 100,
rarity: BadgeRarityEnum.Epic,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "badge-002",
code: "TEAM_LEADER",
name: "Takım Lideri",
description:
"Takım arkadaşlarına öncülük eden ve onları motive eden çalışanlar için",
icon: "👑",
color: "#4B0082",
backgroundColor: "#E6E6FA",
category: BadgeCategoryEnum.Leadership,
criteria: "Takım projelerinde liderlik gösterme ve ekip başarısına katkı",
points: 75,
rarity: BadgeRarityEnum.Rare,
isActive: true,
creationTime: new Date("2024-02-10"),
lastModificationTime: new Date("2024-02-10"),
},
{
id: "badge-003",
code: "INNOVATOR",
name: "İnovatör",
description:
"Yaratıcı çözümler üreten ve yenilikçi yaklaşımlar sergileyen çalışanlar",
icon: "💡",
color: "#FF6B35",
backgroundColor: "#FFF0E6",
category: BadgeCategoryEnum.Innovation,
criteria: "Şirkete değer katan yenilikçi fikirler sunma",
points: 80,
rarity: BadgeRarityEnum.Rare,
isActive: true,
creationTime: new Date("2024-03-05"),
lastModificationTime: new Date("2024-03-05"),
},
{
id: "badge-004",
code: "PERFECT_ATTENDANCE",
name: "Mükemmel Devam",
description:
"Düzenli ve zamanında işe gelen, devamsızlık yapmayan çalışanlar",
icon: "📅",
color: "#28A745",
backgroundColor: "#E8F5E8",
category: BadgeCategoryEnum.Attendance,
criteria: "6 ay boyunca devamsızlık yapmama",
points: 50,
rarity: BadgeRarityEnum.Uncommon,
isActive: true,
creationTime: new Date("2024-04-20"),
lastModificationTime: new Date("2024-04-20"),
},
{
id: "badge-005",
code: "CUSTOMER_CHAMPION",
name: "Müşteri Şampiyonu",
description: "Müşteri memnuniyetinde üstün başarı gösteren çalışanlar",
icon: "🏆",
color: "#DC3545",
backgroundColor: "#FFEBEE",
category: BadgeCategoryEnum.Customer,
criteria: "Müşteri memnuniyet puanı %95 üzerinde alma",
points: 90,
rarity: BadgeRarityEnum.Epic,
isActive: true,
creationTime: new Date("2024-05-12"),
lastModificationTime: new Date("2024-05-12"),
},
];

View file

@ -1,43 +0,0 @@
import {
FiBankMovement,
BankTransactionTypeEnum,
TransactionStatusEnum,
} from "../types/fi";
import { mockBanks } from "./mockBanks";
export const mockBankMovements: FiBankMovement[] = [
{
id: "1",
bankAccountId: "1",
bankAccount: mockBanks.find((acc) => acc.id === "1"),
transactionDate: new Date("2024-01-20"),
valueDate: new Date("2024-01-20"),
description: "Müşteri havale ödemesi",
referenceNumber: "EFT-001",
transactionType: BankTransactionTypeEnum.EFT,
amount: 25000,
currency: "TRY",
status: TransactionStatusEnum.Completed,
recipientName: "ABC Şirket",
recipientIban: "TR120006400000112345678901",
recipientBank: "İş Bankası",
creationTime: new Date("2024-01-20"),
},
{
id: "2",
bankAccountId: "1",
bankAccount: mockBanks.find((acc) => acc.id === "1"),
transactionDate: new Date("2024-01-19"),
valueDate: new Date("2024-01-19"),
description: "Tedarikçi ödeme",
referenceNumber: "EFT-002",
transactionType: BankTransactionTypeEnum.Transfer,
amount: 15000,
currency: "TRY",
status: TransactionStatusEnum.Completed,
recipientName: "Tedarikçi Ltd.",
recipientIban: "TR980006200012600006298453",
recipientBank: "Garanti BBVA",
creationTime: new Date("2024-01-19"),
},
];

View file

@ -1,5 +1,4 @@
import { BankAccountTypeEnum } from "../types/fi";
import { BankAccount } from "../types/common";
import { BankAccount, BankAccountTypeEnum } from "@/proxy/intranet/models";
export const mockBanks: BankAccount[] = [
{

View file

@ -1,521 +0,0 @@
import { BankAccountTypeEnum } from '../types/fi'
import { BusinessParty, BusinessPartyIndustryEnum, BusinessPartyStatusEnum, PartyType, PaymentTerms } from '../types/common'
import { CustomerSegmentEnum, CustomerTypeEnum } from '../types/crm'
import { SupplierTypeEnum, SupplierCardTypeEnum } from '../types/mm'
export const mockBusinessParties: BusinessParty[] = [
{
id: '1',
code: 'SUP001',
partyType: PartyType.Supplier,
name: 'ABC Malzeme Ltd.',
primaryContact: {
id: '2',
firstName: 'Fatma',
lastName: 'Demir',
name: 'Fatma Demir',
title: 'Genel Müdür',
department: 'Yönetim',
email: 'fatma.demir@uretim.com',
phoneNumber: '3125550202',
mobileNumber: '5325550202',
isPrimary: true,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
email: 'aliveli@gmail.com',
phoneNumber: '+90 212 555 1234',
address: {
street: 'İstiklal Cad. No:10',
city: 'İstanbul',
state: 'İstanbul',
postalCode: '34430',
country: 'Türkiye',
},
taxNumber: '1234567890',
paymentTerms: PaymentTerms.Net30,
currency: 'TRY',
cardNumber: 'SC-2024-001',
cardType: SupplierCardTypeEnum.Standard,
validFrom: new Date('2024-01-01'),
validTo: new Date('2024-12-31'),
creditLimit: 500000,
isActive: true,
currentBalance: 120000,
discountRate: 5,
specialConditions: ['Toplu sipariş indirimi', 'Öncelikli teslimat'],
lastOrderDate: new Date('2024-08-15'),
performanceMetrics: {
deliveryPerformance: 95,
qualityRating: 90,
priceCompetitiveness: 85,
responsiveness: 67,
complianceRating: 88,
overallScore: 100,
lastEvaluationDate: new Date('2024-08-01'),
},
certifications: ['ISO 9001', 'ISO 14001'],
bankAccounts: [
{
id: 'BA001',
bankName: 'Garanti BBVA',
accountNumber: '1234567890',
iban: 'TR330006100519786457841326',
swiftCode: 'TGBATRIS',
isDefault: true,
accountCode: '',
branchName: '',
accountType: BankAccountTypeEnum.Current,
currency: '',
balance: 0,
overdraftLimit: 0,
dailyTransferLimit: 0,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
contacts: [
{
id: 'C001',
firstName: 'Ali',
lastName: 'Veli',
name: 'Ali Veli',
title: 'Satınalma Müdürü',
email: 'aliveli@gmail.com',
phoneNumber: '+90 212 555 1234',
department: 'Satınalma',
isPrimary: true,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
supplierType: SupplierTypeEnum.Manufacturer,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: '2',
code: 'SUP002',
supplierType: SupplierTypeEnum.ServiceProvider,
name: 'XYZ Teknoloji A.Ş.',
primaryContact: {
id: '2',
firstName: 'Fatma',
lastName: 'Demir',
name: 'Fatma Demir',
title: 'Genel Müdür',
department: 'Yönetim',
email: 'fatma.demir@uretim.com',
phoneNumber: '3125550202',
mobileNumber: '5325550202',
isPrimary: true,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
email: 'aysedemir@gmail.com',
phoneNumber: '+90 216 555 5678',
address: {
street: 'Barbaros Bulv. No:20',
city: 'İstanbul',
state: 'İstanbul',
postalCode: '34746',
country: 'Türkiye',
},
taxNumber: '0987654321',
paymentTerms: PaymentTerms.Net15,
currency: 'TRY',
cardNumber: 'SC-2024-002',
cardType: SupplierCardTypeEnum.Premium,
validFrom: new Date('2024-02-01'),
validTo: new Date('2024-12-31'),
creditLimit: 250000,
isActive: true,
currentBalance: 75000,
discountRate: 3,
specialConditions: ['Hızlı teslimat', 'Kalite garantisi'],
lastOrderDate: new Date('2024-08-20'),
performanceMetrics: {
deliveryPerformance: 88,
qualityRating: 90,
priceCompetitiveness: 85,
responsiveness: 87,
complianceRating: 91,
overallScore: 88,
lastEvaluationDate: new Date('2024-08-01'),
},
certifications: ['ISO 9001'],
bankAccounts: [
{
id: 'BA002',
bankName: 'İş Bankası',
accountNumber: '0987654321',
iban: 'TR440006200519786457841327',
swiftCode: 'ISBKTRIS',
isDefault: true,
accountCode: '',
branchName: '',
accountType: BankAccountTypeEnum.Current,
currency: '',
balance: 0,
overdraftLimit: 0,
dailyTransferLimit: 0,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
contacts: [
{
id: 'C002',
firstName: 'Ayşe',
lastName: 'Demir',
name: 'Ayşe Demir',
title: 'Satış Müdürü',
email: 'aysedemir@gmail.com',
phoneNumber: '+90 216 555 5678',
department: 'Satış',
isPrimary: true,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
creationTime: new Date(),
lastModificationTime: new Date(),
partyType: PartyType.Supplier,
},
{
id: '3',
code: 'SUP003',
supplierType: SupplierTypeEnum.Manufacturer,
name: 'LMN Endüstri A.Ş.',
primaryContact: {
id: '2',
firstName: 'Fatma',
lastName: 'Demir',
name: 'Fatma Demir',
title: 'Genel Müdür',
department: 'Yönetim',
email: 'fatma.demir@uretim.com',
phoneNumber: '3125550202',
mobileNumber: '5325550202',
isPrimary: true,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
email: 'mehmetyilmaz@gmail.com',
phoneNumber: '+90 232 555 7890',
address: {
street: 'Atatürk Cad. No:5',
city: 'İzmir',
state: 'İzmir',
postalCode: '35210',
country: 'Türkiye',
},
taxNumber: '1122334455',
paymentTerms: PaymentTerms.Net45,
currency: 'TRY',
cardNumber: 'SC-2024-003',
cardType: SupplierCardTypeEnum.Preferred,
validFrom: new Date('2024-03-01'),
validTo: new Date('2024-12-31'),
creditLimit: 150000,
isActive: true,
currentBalance: 45000,
discountRate: 2,
specialConditions: ['Toplu sipariş indirimi'],
lastOrderDate: new Date('2024-08-18'),
performanceMetrics: {
deliveryPerformance: 82,
qualityRating: 85,
priceCompetitiveness: 90,
responsiveness: 80,
complianceRating: 88,
overallScore: 85,
lastEvaluationDate: new Date('2024-07-15'),
},
certifications: ['ISO 9001', 'OHSAS 18001'],
bankAccounts: [
{
id: 'BA003',
bankName: 'Yapı Kredi',
accountNumber: '1122334455',
iban: 'TR550006300519786457841328',
swiftCode: 'YAPITRIS',
isDefault: true,
accountCode: '',
branchName: '',
accountType: BankAccountTypeEnum.Current,
currency: '',
balance: 0,
overdraftLimit: 0,
dailyTransferLimit: 0,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
contacts: [
{
id: 'C003',
firstName: 'Mehmet',
lastName: 'Yılmaz',
name: 'Mehmet Yılmaz',
title: 'Genel Müdür',
email: 'mehmetyilmaz@gmail.com',
phoneNumber: '+90 232 555 7890',
department: 'Yönetim',
isPrimary: true,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
creationTime: new Date(),
lastModificationTime: new Date(),
partyType: PartyType.Supplier,
},
{
id: '4',
code: 'SUP004',
supplierType: SupplierTypeEnum.Distributor,
name: 'OPQ Ticaret Ltd.',
primaryContact: {
id: '2',
firstName: 'Fatma',
lastName: 'Demir',
name: 'Fatma Demir',
title: 'Genel Müdür',
department: 'Yönetim',
email: 'fatma.demir@uretim.com',
phoneNumber: '3125550202',
mobileNumber: '5325550202',
isPrimary: true,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
email: 'fatmacelik@gmail.com',
phoneNumber: '+90 312 555 3456',
address: {
street: 'Kızılay Meydanı No:15',
city: 'Ankara',
state: 'Ankara',
postalCode: '06690',
country: 'Türkiye',
},
taxNumber: '6677889900',
paymentTerms: PaymentTerms.Net30,
currency: 'TRY',
cardNumber: 'SC-2024-004',
cardType: SupplierCardTypeEnum.Standard,
validFrom: new Date('2024-04-01'),
validTo: new Date('2024-12-31'),
creditLimit: 100000,
isActive: false,
currentBalance: 30000,
discountRate: 4,
specialConditions: ['Öncelikli sipariş', 'Hızlı teslimat'],
lastOrderDate: new Date('2024-06-30'),
performanceMetrics: {
deliveryPerformance: 75,
qualityRating: 78,
priceCompetitiveness: 82,
responsiveness: 76,
complianceRating: 80,
overallScore: 78,
lastEvaluationDate: new Date('2024-07-01'),
},
certifications: ['ISO 9001'],
bankAccounts: [
{
id: 'BA004',
bankName: 'Halkbank',
accountNumber: '6677889900',
iban: 'TR660006400519786457841329',
swiftCode: 'HALKTRIS',
isDefault: true,
accountCode: '',
branchName: '',
accountType: BankAccountTypeEnum.Current,
currency: '',
balance: 0,
overdraftLimit: 0,
dailyTransferLimit: 0,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
contacts: [
{
id: 'C004',
firstName: 'Fatma',
lastName: 'Çelik',
name: 'Fatma Çelik',
title: 'Finans Müdürü',
email: 'fatmacelik@gmail.com',
phoneNumber: '+90 312 555 3456',
department: 'Finans',
isPrimary: true,
isActive: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
],
creationTime: new Date(),
lastModificationTime: new Date(),
partyType: PartyType.Supplier,
},
{
id: '5',
code: 'CUST-002',
name: 'Üretim Ltd.',
customerType: CustomerTypeEnum.Company,
industry: BusinessPartyIndustryEnum.Finance,
website: 'www.uretim.com',
primaryContact: {
id: '2',
firstName: 'Fatma',
lastName: 'Demir',
name: 'Fatma Demir',
title: 'Genel Müdür',
department: 'Yönetim',
email: 'fatma.demir@uretim.com',
phoneNumber: '3125550202',
mobileNumber: '5325550202',
isPrimary: true,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
contacts: [],
address: {
street: 'Sanayi Sitesi 5. Cadde No:25',
city: 'Ankara',
state: 'Ankara',
postalCode: '06000',
country: 'Türkiye',
},
taxNumber: '0987654321',
registrationNumber: 'REG-002',
paymentTerms: PaymentTerms.Net60,
creditLimit: 500000,
currency: 'TRY',
status: BusinessPartyStatusEnum.Active,
customerSegment: CustomerSegmentEnum.SMB,
assignedSalesRep: 'REP-002',
teamId: 'TEAM-001',
totalRevenue: 850000,
lastOrderDate: new Date('2024-01-10'),
averageOrderValue: 42500,
lifetimeValue: 1700000,
opportunities: [],
orders: [],
activities: [],
isActive: true,
creationTime: new Date('2023-09-20'),
lastModificationTime: new Date('2024-01-18'),
partyType: PartyType.Customer,
},
{
id: '6',
code: 'CUST-001',
name: 'Teknoloji A.Ş.',
customerType: CustomerTypeEnum.Company,
industry: BusinessPartyIndustryEnum.Technology,
website: 'www.teknoloji.com',
primaryContact: {
id: '1',
firstName: 'Ali',
lastName: 'Yılmaz',
name: 'Ali Yılmaz',
title: 'Satınalma Müdürü',
department: 'Satınalma',
email: 'ali.yilmaz@teknoloji.com',
phoneNumber: '2125550201',
mobileNumber: '5325550201',
isPrimary: true,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
contacts: [],
address: {
street: 'Teknoloji Caddesi No:100',
city: 'İstanbul',
state: 'İstanbul',
postalCode: '34000',
country: 'Türkiye',
},
taxNumber: '1234567890',
registrationNumber: 'REG-001',
creditLimit: 1000000,
paymentTerms: PaymentTerms.Net30,
currency: 'TRY',
status: BusinessPartyStatusEnum.Active,
customerSegment: CustomerSegmentEnum.Enterprise,
assignedSalesRep: 'REP-001',
teamId: 'TEAM-001',
totalRevenue: 2500000,
lastOrderDate: new Date('2024-01-15'),
averageOrderValue: 125000,
lifetimeValue: 5000000,
opportunities: [],
orders: [],
activities: [],
isActive: true,
creationTime: new Date('2023-06-15'),
lastModificationTime: new Date('2024-01-20'),
partyType: PartyType.Customer,
},
]
export const mockBusinessPartyNew: BusinessParty = {
id: '',
code: '',
supplierType: SupplierTypeEnum.ServiceProvider,
name: '',
email: '',
phoneNumber: '',
address: {
street: '',
city: '',
state: '',
postalCode: '',
country: '',
},
taxNumber: '',
paymentTerms: PaymentTerms.Cash,
currency: 'TRY',
cardNumber: '',
cardType: SupplierCardTypeEnum.Standard,
validTo: new Date(),
validFrom: new Date(),
creditLimit: 0,
isActive: true,
currentBalance: 0,
discountRate: 0,
specialConditions: [],
lastOrderDate: new Date(),
performanceMetrics: {
deliveryPerformance: 0,
qualityRating: 0,
priceCompetitiveness: 0,
responsiveness: 0,
complianceRating: 0,
overallScore: 0,
lastEvaluationDate: new Date(),
},
certifications: [],
bankAccounts: [],
contacts: [],
creationTime: new Date(),
lastModificationTime: new Date(),
partyType: PartyType.Supplier,
}

View file

@ -1,26 +0,0 @@
import { FiCashAccount } from "../types/fi";
export const mockCashAccounts: FiCashAccount[] = [
{
id: "1",
accountCode: "KASA001",
name: "Ana Kasa",
description: "Ana nakit kasası",
currency: "TRY",
balance: 15000,
isActive: true,
creationTime: new Date("2024-01-01"),
lastModificationTime: new Date("2024-01-20"),
},
{
id: "2",
accountCode: "KASA002",
name: "USD Kasa",
description: "Döviz kasası",
currency: "USD",
balance: 2500,
isActive: true,
creationTime: new Date("2024-01-01"),
lastModificationTime: new Date("2024-01-18"),
},
];

View file

@ -1,29 +0,0 @@
import { FiCashMovement, CashMovementTypeEnum } from "../types/fi";
import { mockCashAccounts } from "./mockCashAccounts";
export const mockCashMovements: FiCashMovement[] = [
{
id: "1",
cashAccountId: "1",
cashAccount: mockCashAccounts[0],
transactionDate: new Date("2024-01-20"),
description: "Müşteri nakit ödemesi",
referenceNumber: "NAK-001",
movementType: CashMovementTypeEnum.Income,
amount: 5000,
currency: "TRY",
creationTime: new Date("2024-01-20"),
},
{
id: "2",
cashAccountId: "1",
cashAccount: mockCashAccounts[0],
transactionDate: new Date("2024-01-19"),
description: "Kasa gider",
referenceNumber: "NAK-002",
movementType: CashMovementTypeEnum.Expense,
amount: 1000,
currency: "TRY",
creationTime: new Date("2024-01-19"),
},
];

View file

@ -1,44 +0,0 @@
import { FiCheck, CheckStatusEnum, TypeEnum } from '../types/fi'
import { mockCurrentAccounts } from './mockCurrentAccounts'
export const mockChecks: FiCheck[] = [
{
id: '1',
checkNumber: 'CHK-001',
bankName: 'İş Bankası',
branchName: 'Levent Şubesi',
accountNumber: '1234567890',
type: TypeEnum.Received,
drawerName: 'XYZ Müşteri A.Ş.',
payeeName: 'ABC Şirket',
issueDate: new Date('2024-01-15'),
dueDate: new Date('2024-02-15'),
amount: 25000,
currency: 'TRY',
status: CheckStatusEnum.InHand,
currentAccountId: '1',
currentAccount: mockCurrentAccounts.find((ca) => ca.id === '1'),
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-01-15'),
},
{
id: '2',
checkNumber: 'CHK-002',
bankName: 'Garanti BBVA',
branchName: 'Şişli Şubesi',
accountNumber: '9876543210',
type: TypeEnum.Issued,
drawerName: 'ABC Şirket',
payeeName: 'Tedarikçi Ltd.',
issueDate: new Date('2024-01-10'),
dueDate: new Date('2024-02-10'),
amount: 15000,
currency: 'TRY',
status: CheckStatusEnum.Deposited,
bankingDate: new Date('2024-01-20'),
currentAccountId: '2',
currentAccount: mockCurrentAccounts.find((ca) => ca.id === '2'),
creationTime: new Date('2024-01-10'),
lastModificationTime: new Date('2024-01-20'),
},
]

View file

@ -1,79 +0,0 @@
export const adminNavigationItems = [
{
id: "dashboard",
title: "Dashboard",
icon: "LayoutDashboard",
path: "/admin/dashboard",
description: "Genel bakış ve istatistikler",
},
{
id: "tags",
title: "Etiket Yönetimi",
icon: "Tags",
path: "/admin/tags",
description: "Soru ve içerik etiketleri",
},
{
id: "question-pools",
title: "Soru Havuzları",
icon: "Database",
path: "/admin/question-pools",
description: "Soru havuzları ve kategoriler",
},
{
id: "exams",
title: "Sınav Yönetimi",
icon: "FileText",
path: "/admin/exams",
description: "Sınavları yönetin",
},
{
id: "assignments",
title: "Ödev Yönetimi",
icon: "BookOpen",
path: "/admin/assignments",
description: "Ödevleri yönetin",
},
{
id: "tests",
title: "Test Yönetimi",
icon: "ClipboardList",
path: "/admin/tests",
description: "PDF testler ve cevap anahtarları",
},
];
export const questionTypes = [
{ value: "multiple-choice", label: "Çoktan Seçmeli", icon: "CheckCircle" },
{ value: "fill-blank", label: "Boşluk Doldurma", icon: "Edit3" },
{ value: "multiple-answer", label: "Çok Yanıtlı", icon: "CheckSquare" },
{ value: "matching", label: "Eşleştirme", icon: "Link" },
{ value: "ordering", label: "Sıralama", icon: "ArrowUpDown" },
{ value: "open-ended", label: "Açık Uçlu", icon: "MessageSquare" },
{ value: "true-false", label: "Doğru-Yanlış", icon: "ToggleLeft" },
{ value: "calculation", label: "Hesaplama", icon: "Calculator" },
];
export const difficultyLevels = [
{ value: "easy", label: "Kolay", color: "green" },
{ value: "medium", label: "Orta", color: "yellow" },
{ value: "hard", label: "Zor", color: "red" },
];
export const examTypes = [
{ value: "exam", label: "Sınav", icon: "FileText" },
{ value: "assignment", label: "Ödev", icon: "BookOpen" },
{ value: "test", label: "Test", icon: "ClipboardList" },
];
export const getBreadcrumb = (currentPath: string): string[] => {
const pathMap: Record<string, string[]> = {
"/admin/dashboard": ["Admin", "Dashboard"],
"/admin/tags": ["Admin", "Etiket Yönetimi"],
"/admin/question-pools": ["Admin", "Soru Havuzları"],
"/admin/exams": ["Admin", "Sınav Yönetimi"],
"/admin/assignments": ["Admin", "Ödev Yönetimi"],
"/admin/tests": ["Admin", "Test Yönetimi"],
};
return pathMap[currentPath] || ["Admin"];
};

View file

@ -1,184 +0,0 @@
import { HrCostCenter, CostCenterType } from '../types/hr'
export const mockCostCenters: HrCostCenter[] = [
{
id: 'cc-001',
code: 'CC-ADM-001',
name: 'Genel Yönetim',
description: 'Şirket genel yönetim masrafları',
costCenterType: CostCenterType.Administrative,
budgetedAmount: 2500000,
actualAmount: 2350000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-12-01'),
subCostCenters: [],
},
{
id: 'cc-002',
code: 'CC-HR-001',
name: 'İnsan Kaynakları',
description: 'İnsan kaynakları departmanı masrafları',
costCenterType: CostCenterType.Support,
budgetedAmount: 1800000,
actualAmount: 1650000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-11-15'),
subCostCenters: [],
},
{
id: 'cc-003',
code: 'CC-FIN-001',
name: 'Finans ve Muhasebe',
description: 'Mali işler ve muhasebe masrafları',
costCenterType: CostCenterType.Support,
budgetedAmount: 1500000,
actualAmount: 1420000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-11-20'),
subCostCenters: [],
},
{
id: 'cc-004',
code: 'CC-IT-001',
name: 'Bilgi İşlem',
description: 'IT altyapı ve yazılım masrafları',
costCenterType: CostCenterType.Support,
budgetedAmount: 3200000,
actualAmount: 3100000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-12-05'),
subCostCenters: [],
},
{
id: 'cc-005',
code: 'CC-PROD-001',
name: 'Üretim Departmanı',
description: 'Üretim faaliyetleri masrafları',
costCenterType: CostCenterType.Production,
budgetedAmount: 8500000,
actualAmount: 8200000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-12-10'),
subCostCenters: [],
},
{
id: 'cc-006',
code: 'CC-SAL-001',
name: 'Satış ve Pazarlama',
description: 'Satış ve pazarlama faaliyetleri',
costCenterType: CostCenterType.Revenue,
budgetedAmount: 4200000,
actualAmount: 4050000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-12-08'),
subCostCenters: [],
},
{
id: 'cc-007',
code: 'CC-QUA-001',
name: 'Kalite Kontrol',
description: 'Kalite kontrol ve güvence masrafları',
costCenterType: CostCenterType.Support,
budgetedAmount: 1200000,
actualAmount: 1150000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-11-25'),
subCostCenters: [],
},
{
id: 'cc-008',
code: 'CC-LOG-001',
name: 'Lojistik ve Depo',
description: 'Lojistik operasyonları ve depo masrafları',
costCenterType: CostCenterType.Support,
budgetedAmount: 2800000,
actualAmount: 2650000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-12-03'),
subCostCenters: [],
},
{
id: 'cc-009',
code: 'CC-RND-001',
name: 'Ar-Ge Departmanı',
description: 'Araştırma ve geliştirme masrafları',
costCenterType: CostCenterType.Investment,
budgetedAmount: 3500000,
actualAmount: 3300000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-12-07'),
subCostCenters: [],
},
{
id: 'cc-010',
code: 'CC-PUR-001',
name: 'Satın Alma',
description: 'Satın alma ve tedarik masrafları',
costCenterType: CostCenterType.Support,
budgetedAmount: 1600000,
actualAmount: 1520000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-11-30'),
subCostCenters: [],
},
{
id: 'cc-011',
code: 'CC-MAI-001',
name: 'Bakım ve Onarım',
description: 'Bakım ve onarım masrafları',
costCenterType: CostCenterType.Service,
budgetedAmount: 2200000,
actualAmount: 2100000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-12-02'),
subCostCenters: [],
},
{
id: 'cc-012',
code: 'CC-CUS-001',
name: 'Müşteri Hizmetleri',
description: 'Müşteri hizmetleri masrafları',
costCenterType: CostCenterType.Service,
budgetedAmount: 1000000,
actualAmount: 950000,
currency: 'TRY',
fiscalYear: '2025',
isActive: true,
creationTime: new Date('2024-01-15'),
lastModificationTime: new Date('2024-11-28'),
subCostCenters: [],
},
]

View file

@ -1,5 +0,0 @@
export const mockCurrencies = [
{ value: "TRY", label: "Türk Lirası (₺)" },
{ value: "USD", label: "Amerikan Doları ($)" },
{ value: "EUR", label: "Euro (€)" },
];

View file

@ -1,154 +0,0 @@
import { FiCurrentAccountMovement, FiDocumentTypeEnum } from "../types/fi";
export const mockCurrentAccountMovements: FiCurrentAccountMovement[] = [
{
id: "am1",
accountId: "1",
transactionDate: new Date("2024-11-01"),
description: "Satış faturası - SF2024/001",
referenceNumber: "SF2024/001",
documentType: FiDocumentTypeEnum.Invoice,
documentNumber: "SF2024/001",
debitAmount: 0,
creditAmount: 25000,
balance: -15000,
currency: "TRY",
invoiceId: "inv1",
creationTime: new Date("2024-11-01T10:30:00"),
},
{
id: "am2",
accountId: "1",
transactionDate: new Date("2024-10-28"),
description: "Tahsilat - Nakit",
referenceNumber: "TH2024/001",
documentType: FiDocumentTypeEnum.Payment,
documentNumber: "TH2024/001",
debitAmount: 10000,
creditAmount: 0,
balance: 10000,
currency: "TRY",
paymentId: "pay1",
creationTime: new Date("2024-10-28T14:15:00"),
},
{
id: "am3",
accountId: "2",
transactionDate: new Date("2024-11-02"),
description: "Alış faturası - AF2024/003",
referenceNumber: "AF2024/003",
documentType: FiDocumentTypeEnum.Invoice,
documentNumber: "AF2024/003",
debitAmount: 15000,
creditAmount: 0,
balance: 25000,
currency: "TRY",
invoiceId: "inv2",
creationTime: new Date("2024-11-02T09:45:00"),
},
{
id: "am4",
accountId: "2",
transactionDate: new Date("2024-10-30"),
description: "Ödeme - Banka Havalesi",
referenceNumber: "OD2024/005",
documentType: FiDocumentTypeEnum.Payment,
documentNumber: "OD2024/005",
debitAmount: 0,
creditAmount: 12000,
balance: 10000,
currency: "TRY",
paymentId: "pay2",
creationTime: new Date("2024-10-30T16:20:00"),
},
{
id: "am5",
accountId: "1",
transactionDate: new Date("2024-10-25"),
description: "Satış faturası - SF2024/002",
referenceNumber: "SF2024/002",
documentType: FiDocumentTypeEnum.Invoice,
documentNumber: "SF2024/002",
debitAmount: 0,
creditAmount: 18000,
balance: 0,
currency: "TRY",
invoiceId: "inv3",
creationTime: new Date("2024-10-25T11:10:00"),
},
{
id: "am6",
accountId: "3",
transactionDate: new Date("2024-11-03"),
description: "Alış faturası - AF2024/004",
referenceNumber: "AF2024/004",
documentType: FiDocumentTypeEnum.Invoice,
documentNumber: "AF2024/004",
debitAmount: 8500,
creditAmount: 0,
balance: 8500,
currency: "TRY",
invoiceId: "inv4",
creationTime: new Date("2024-11-03T13:30:00"),
},
{
id: "am7",
accountId: "2",
transactionDate: new Date("2024-10-22"),
description: "Tahsilat - Çek",
referenceNumber: "TH2024/002",
documentType: FiDocumentTypeEnum.Check,
documentNumber: "TH2024/002",
debitAmount: 22000,
creditAmount: 0,
balance: 22000,
currency: "TRY",
paymentId: "pay3",
creationTime: new Date("2024-10-22T15:45:00"),
},
{
id: "am8",
accountId: "1",
transactionDate: new Date("2024-10-20"),
description: "İade faturası - IF2024/001",
referenceNumber: "IF2024/001",
documentType: FiDocumentTypeEnum.Invoice,
documentNumber: "IF2024/001",
debitAmount: 3000,
creditAmount: 0,
balance: 18000,
currency: "TRY",
invoiceId: "inv5",
creationTime: new Date("2024-10-20T12:20:00"),
},
{
id: "am9",
accountId: "3",
transactionDate: new Date("2024-10-18"),
description: "Ödeme - Kredi Kartı",
referenceNumber: "OD2024/006",
documentType: FiDocumentTypeEnum.Payment,
documentNumber: "OD2024/006",
debitAmount: 0,
creditAmount: 5000,
balance: 0,
currency: "TRY",
paymentId: "pay4",
creationTime: new Date("2024-10-18T14:00:00"),
},
{
id: "am10",
accountId: "4",
transactionDate: new Date("2024-11-04"),
description: "Satış faturası - SF2024/003",
referenceNumber: "SF2024/003",
documentType: FiDocumentTypeEnum.Invoice,
documentNumber: "SF2024/003",
debitAmount: 0,
creditAmount: 32000,
balance: -32000,
currency: "TRY",
invoiceId: "inv6",
creationTime: new Date("2024-11-04T10:15:00"),
},
];

View file

@ -1,115 +0,0 @@
import { AccountTypeEnum, FiCurrentAccount, RiskGroupEnum } from "../types/fi";
import { mockBusinessParties } from "./mockBusinessParties";
export const mockCurrentAccounts: FiCurrentAccount[] = [
{
id: "1",
accountCode: "CA001",
businessPartyId: "1",
businessParty: mockBusinessParties.find((bp) => bp.id === "1"),
type: AccountTypeEnum.Supplier,
taxNumber: "1234567890",
taxOffice: "Beylikdüzü V.D.",
contactPerson: "Ahmet Yılmaz",
phoneNumber: "+90 212 555 1234",
email: "info@abctedarik.com",
address: "Beylikdüzü Organize Sanayi Bölgesi, İstanbul",
creditLimit: 50000,
balance: -15000,
currency: "TRY",
riskGroup: RiskGroupEnum.Low,
paymentTerm: 30,
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-20"),
lastTransactionDate: new Date("2024-11-01"),
},
{
id: "2",
accountCode: "CA002",
businessPartyId: "2",
businessParty: mockBusinessParties.find((bp) => bp.id === "2"),
type: AccountTypeEnum.Customer,
taxNumber: "9876543210",
taxOffice: "Kadıköy V.D.",
contactPerson: "Fatma Demir",
phoneNumber: "+90 216 888 5678",
email: "satis@xyzmuster.com",
address: "Kadıköy, İstanbul",
creditLimit: 100000,
balance: 25000,
currency: "TRY",
riskGroup: RiskGroupEnum.Medium,
paymentTerm: 45,
isActive: true,
creationTime: new Date("2024-02-01"),
lastModificationTime: new Date("2024-02-10"),
lastTransactionDate: new Date("2024-11-02"),
},
{
id: "3",
accountCode: "CA003",
businessPartyId: "3",
businessParty: mockBusinessParties.find((bp) => bp.id === "3"),
type: AccountTypeEnum.Both,
taxNumber: "5555666677",
taxOffice: "Ümraniye V.D.",
contactPerson: "Mehmet Kaya",
phoneNumber: "+90 216 333 4455",
email: "info@definsaat.com",
address: "Ümraniye, İstanbul",
creditLimit: 75000,
balance: 8500,
currency: "TRY",
riskGroup: RiskGroupEnum.Low,
paymentTerm: 30,
isActive: true,
creationTime: new Date("2024-03-10"),
lastModificationTime: new Date("2024-03-15"),
lastTransactionDate: new Date("2024-11-03"),
},
{
id: "4",
accountCode: "CA004",
businessPartyId: "4",
businessParty: mockBusinessParties.find((bp) => bp.id === "4"),
type: AccountTypeEnum.Customer,
taxNumber: "1111222233",
taxOffice: "Beşiktaş V.D.",
contactPerson: "Ayşe Özkan",
phoneNumber: "+90 212 777 8899",
email: "info@ghiteknoloji.com",
address: "Beşiktaş, İstanbul",
creditLimit: 200000,
balance: -32000,
currency: "TRY",
riskGroup: RiskGroupEnum.Low,
paymentTerm: 60,
isActive: true,
creationTime: new Date("2024-04-05"),
lastModificationTime: new Date("2024-04-12"),
lastTransactionDate: new Date("2024-11-04"),
},
{
id: "5",
accountCode: "CA005",
businessPartyId: "5",
businessParty: mockBusinessParties.find((bp) => bp.id === "5"),
type: AccountTypeEnum.Supplier,
taxNumber: "9999888877",
taxOffice: "Maltepe V.D.",
contactPerson: "Ali Öz",
phoneNumber: "+90 216 555 1122",
email: "info@jklgida.com",
address: "Maltepe, İstanbul",
creditLimit: 30000,
balance: 45000,
currency: "TRY",
riskGroup: RiskGroupEnum.High,
paymentTerm: 15,
isActive: true,
creationTime: new Date("2024-05-20"),
lastModificationTime: new Date("2024-05-25"),
lastTransactionDate: new Date("2024-10-28"),
},
];

View file

@ -1,149 +0,0 @@
import { MmDelivery, DeliveryStatusEnum, RequestTypeEnum } from "../types/mm";
export const mockDeliveries: MmDelivery[] = [
{
id: "DEL001",
deliveryNumber: "TES-2024-001",
orderId: "ORD001",
orderNumber: "SIP-2024-001",
requestType: RequestTypeEnum.Material,
supplierId: "SUP001",
supplierName: "ABC Malzeme Ltd.",
courierCompany: "Hızlı Kargo",
trackingNumber: "HK123456789",
deliveryDate: new Date("2024-02-03"),
expectedDeliveryDate: new Date("2024-02-05"),
actualDeliveryDate: new Date("2024-02-03"),
status: DeliveryStatusEnum.Delivered,
deliveryAddress: "Organize Sanayi Bölgesi, 1. Cadde No:15, İstanbul",
receivedBy: "Ahmet Yıldız - Depo Sorumlusu",
items: [
{
id: "DELI001",
materialId: "MAL001",
materialName: "Çelik Profil 40x40",
orderedQuantity: 100,
deliveredQuantity: 100,
unit: "adet",
condition: "Good", // ✅ artık DeliveryItem union tipine uygun
notes: "Tam ve hasarsız teslim alındı",
},
{
id: "DELI002",
materialId: "MAL002",
materialName: "Kaynak Elektrodu",
orderedQuantity: 200,
deliveredQuantity: 200,
unit: "kg",
condition: "Good",
notes: "Ambalaj intact",
},
],
notes: "Öncelikli teslimat - 2 gün erken teslim edildi.",
attachments: ["teslimat_tutanagi.pdf", "kalite_kontrol_raporu.pdf"],
creationTime: new Date("2024-02-01"),
lastModificationTime: new Date("2024-02-03"),
},
{
id: "DEL002",
deliveryNumber: "TES-2024-002",
orderId: "ORD002",
orderNumber: "SIP-2024-002",
requestType: RequestTypeEnum.WorkCenter,
supplierId: "SUP002",
supplierName: "XYZ Teknoloji A.Ş.",
courierCompany: "Güvenli Nakliyat",
trackingNumber: "GN987654321",
deliveryDate: new Date("2024-02-08"),
expectedDeliveryDate: new Date("2024-02-12"),
status: DeliveryStatusEnum.PartiallyDelivered,
deliveryAddress: "İş Merkezi, 3. Kat, Levent, İstanbul",
receivedBy: "Zeynep Kaya - IT Sorumlusu",
items: [
{
id: "DELI003",
materialId: "EQP001",
materialName: "Masaüstü Bilgisayar",
orderedQuantity: 10,
deliveredQuantity: 7,
unit: "adet",
condition: "Good",
notes: "3 adet gecikecek - tedarikçi bilgilendirildi",
},
{
id: "DELI004",
materialId: "EQP002",
materialName: "Monitör",
orderedQuantity: 10,
deliveredQuantity: 10,
unit: "adet",
condition: "Good",
notes: "Tam teslimat",
},
],
notes: "Kısmi teslimat - kalan 3 adet bilgisayar sonraki hafta gelecek.",
attachments: ["kismi_teslimat_tutanagi.pdf"],
creationTime: new Date("2024-02-05"),
lastModificationTime: new Date("2024-02-08"),
},
{
id: "DEL003",
deliveryNumber: "TES-2024-003",
orderId: "ORD003",
orderNumber: "SIP-2024-003",
requestType: RequestTypeEnum.Service,
supplierId: "SUP003",
supplierName: "DEF Bakım Ltd.",
deliveryDate: new Date("2024-02-01"),
expectedDeliveryDate: new Date("2024-02-01"),
status: DeliveryStatusEnum.InTransit,
deliveryAddress: "Fabrika Sahası, Makine Atölyesi, Gebze, Kocaeli",
items: [
{
id: "DELI005",
materialId: "SRV001",
materialName: "Preventif Bakım Hizmeti",
orderedQuantity: 1,
deliveredQuantity: 0,
unit: "hizmet",
condition: "Good",
notes: "Teknisyen yolda",
},
],
notes: "Tekniker ekibi fabrikaya doğru yola çıktı.",
attachments: [],
creationTime: new Date("2024-01-30"),
lastModificationTime: new Date("2024-02-01"),
},
{
id: "DEL004",
deliveryNumber: "TES-2024-004",
orderId: "ORD004",
orderNumber: "SIP-2024-004",
requestType: RequestTypeEnum.Material,
supplierId: "SUP004",
supplierName: "GHI Kimya San.",
courierCompany: "Özel Taşıma",
trackingNumber: "OT456789123",
deliveryDate: new Date("2024-02-10"),
expectedDeliveryDate: new Date("2024-02-08"),
status: DeliveryStatusEnum.Delayed,
deliveryAddress: "Kimya Fabrikası, Yarışlı Mah., İzmit, Kocaeli",
items: [
{
id: "DELI006",
materialId: "CHE001",
materialName: "Endüstriyel Temizlik Kimyasalı",
orderedQuantity: 500,
deliveredQuantity: 0,
unit: "litre",
condition: "Good",
notes: "Özel izin bekliyor",
},
],
notes: "Kimyasal madde izni bekleniyor - 2 gün gecikme var.",
attachments: ["gecikme_bildirimi.pdf"],
creationTime: new Date("2024-02-05"),
lastModificationTime: new Date("2024-02-10"),
},
];

View file

@ -1,163 +0,0 @@
import {
MrpDemandForecast,
ForecastMethodEnum,
MrpMaterialRequirement,
RequirementSourceTypeEnum,
} from "../types/mrp";
import { mockMaterials } from "./mockMaterials";
export const mockDemandForecasts: MrpDemandForecast[] = [
{
id: "1",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
forecastPeriod: "Ocak 2025",
startDate: new Date("2025-01-01"),
endDate: new Date("2025-01-31"),
forecastMethod: ForecastMethodEnum.MovingAverage,
forecastQuantity: 1200,
actualQuantity: 1150,
accuracy: 95.8,
seasonalityFactor: 1.1,
trendFactor: 1.02,
creationTime: new Date("2024-12-15"),
lastModificationTime: new Date("2024-12-20"),
notes: "Geçen senenin aynı dönemine göre %10 artış öngörüldü.",
},
{
id: "2",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
forecastPeriod: "Ocak 2025",
startDate: new Date("2025-01-01"),
endDate: new Date("2025-01-31"),
forecastMethod: ForecastMethodEnum.ExponentialSmoothing,
forecastQuantity: 800,
actualQuantity: 820,
accuracy: 97.5,
trendFactor: 1.05,
creationTime: new Date("2024-12-18"),
lastModificationTime: new Date("2024-12-22"),
notes: "Yeni pazarlama kampanyasının etkisiyle talep artışı bekleniyor.",
},
{
id: "3",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
forecastPeriod: "Şubat 2025",
startDate: new Date("2025-02-01"),
endDate: new Date("2025-02-28"),
forecastMethod: ForecastMethodEnum.LinearRegression,
forecastQuantity: 2500,
creationTime: new Date("2024-12-20"),
lastModificationTime: new Date("2024-12-25"),
notes: "Tarihsel satış verilerine dayalı regresyon analizi sonucu.",
},
{
id: "4",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
forecastPeriod: "Şubat 2025",
startDate: new Date("2025-02-01"),
endDate: new Date("2025-02-28"),
forecastMethod: ForecastMethodEnum.Seasonal,
forecastQuantity: 550,
seasonalityFactor: 1.4,
creationTime: new Date("2024-12-22"),
lastModificationTime: new Date("2024-12-28"),
notes: "Kış sezonu nedeniyle talepte mevsimsel artış.",
},
{
id: "df-005",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
forecastPeriod: "Şubat 2025",
startDate: new Date("2025-02-01"),
endDate: new Date("2025-02-28"),
forecastMethod: ForecastMethodEnum.MovingAverage,
forecastQuantity: 1300,
accuracy: 88.0,
creationTime: new Date("2025-01-05"),
lastModificationTime: new Date("2025-01-10"),
notes: "Ocak ayı verileriyle güncellenmiş hareketli ortalama.",
},
];
export const mockMaterialRequirements: MrpMaterialRequirement[] = [
{
id: "1",
mrpRunId: "",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
grossRequirement: 1200,
scheduledReceipts: 200,
projectedAvailable: 150,
netRequirement: 850,
plannedOrderReceipt: 900,
plannedOrderRelease: 900,
requirementDate: new Date("2025-01-05"),
plannedReceiptDate: new Date("2025-01-10"),
plannedReleaseDate: new Date("2025-01-05"),
sourceType: RequirementSourceTypeEnum.Forecast,
sourceDocumentId: "df-001",
creationTime: new Date("2024-12-20"),
lastModificationTime: new Date("2024-12-22"),
},
{
id: "2",
mrpRunId: "",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
grossRequirement: 500,
scheduledReceipts: 0,
projectedAvailable: 50,
netRequirement: 450,
plannedOrderReceipt: 500,
plannedOrderRelease: 500,
plannedReceiptDate: new Date("2025-01-05"),
plannedReleaseDate: new Date("2025-01-10"),
requirementDate: new Date("2025-01-20"),
sourceType: RequirementSourceTypeEnum.SalesOrder,
sourceDocumentId: "SO-2025-001",
creationTime: new Date("2025-01-10"),
lastModificationTime: new Date("2025-01-15"),
},
{
id: "3",
mrpRunId: "",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
grossRequirement: 300,
scheduledReceipts: 100,
projectedAvailable: 350,
netRequirement: 0, // Stok yeterli
plannedOrderReceipt: 0,
plannedOrderRelease: 0,
plannedReceiptDate: new Date("2025-01-25"),
plannedReleaseDate: new Date("2025-01-20"),
requirementDate: new Date("2025-01-15"),
sourceType: RequirementSourceTypeEnum.Forecast,
sourceDocumentId: "df-003",
creationTime: new Date("2025-01-30"),
lastModificationTime: new Date("2025-01-30"),
},
{
id: "4",
mrpRunId: "",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
grossRequirement: 400,
scheduledReceipts: 0,
projectedAvailable: 20,
netRequirement: 380,
plannedOrderReceipt: 400,
plannedOrderRelease: 400,
plannedReceiptDate: new Date("2025-02-05"),
plannedReleaseDate: new Date("2025-01-30"),
requirementDate: new Date("2025-02-10"),
sourceType: RequirementSourceTypeEnum.SafetyStock,
sourceDocumentId: "SS-2025-001",
creationTime: new Date("2025-01-15"),
lastModificationTime: new Date("2025-01-20"),
},
];

View file

@ -1,9 +1,8 @@
import { DepartmentDto } from '../types/hr'
import { DepartmentDto } from "@/proxy/intranet/models"
export const mockDepartments: DepartmentDto[] = [
{
id: '1',
code: 'ÜRT',
name: 'Üretim',
description: 'Üretim departmanı',
parentDepartmentId: undefined,
@ -20,7 +19,6 @@ export const mockDepartments: DepartmentDto[] = [
},
{
id: '2',
code: 'BAK',
name: 'Bakım',
description: 'Bakım departmanı',
parentDepartmentId: undefined,
@ -37,7 +35,6 @@ export const mockDepartments: DepartmentDto[] = [
},
{
id: '3',
code: 'KAL',
name: 'Kalite Kontrol',
description: 'Kalite kontrol departmanı',
parentDepartmentId: '1',
@ -54,7 +51,6 @@ export const mockDepartments: DepartmentDto[] = [
},
{
id: '4',
code: 'DEP',
name: 'Depo',
description: 'Depo departmanı',
parentDepartmentId: '1',
@ -71,7 +67,6 @@ export const mockDepartments: DepartmentDto[] = [
},
{
id: '5',
code: 'IDR',
name: 'İdari İşler',
description: 'İdari işler departmanı',
parentDepartmentId: undefined,

View file

@ -1,59 +0,0 @@
import { HrEmploymentType, EmploymentTypeEnum } from "../types/hr";
import { mockEmployees } from "./mockEmployees";
export const mockEmployeeTypes: HrEmploymentType[] = [
{
id: "1",
name: "FULL_TIME",
count: mockEmployees.filter(
(a) => a.employmentType == EmploymentTypeEnum.FullTime
).length,
creationTime: new Date("2023-01-01T10:00:00Z"),
lastModificationTime: new Date("2023-01-01T10:00:00Z"),
},
{
id: "2",
name: "PART_TIME",
count: mockEmployees.filter(
(a) => a.employmentType == EmploymentTypeEnum.PartTime
).length,
creationTime: new Date("2023-01-01T10:00:00Z"),
lastModificationTime: new Date("2023-01-01T10:00:00Z"),
},
{
id: "3",
name: "CONTRACT",
count: mockEmployees.filter(
(a) => a.employmentType == EmploymentTypeEnum.Contract
).length,
creationTime: new Date("2023-01-01T10:00:00Z"),
lastModificationTime: new Date("2023-01-01T10:00:00Z"),
},
{
id: "4",
name: "INTERN",
count: mockEmployees.filter(
(a) => a.employmentType == EmploymentTypeEnum.Intern
).length,
creationTime: new Date("2023-01-01T10:00:00Z"),
lastModificationTime: new Date("2023-01-01T10:00:00Z"),
},
{
id: "5",
name: "TEMPORARY",
count: mockEmployees.filter(
(a) => a.employmentType == EmploymentTypeEnum.Temporary
).length,
creationTime: new Date("2023-01-01T10:00:00Z"),
lastModificationTime: new Date("2023-01-01T10:00:00Z"),
},
{
id: "6",
name: "CONSULTANT",
count: mockEmployees.filter(
(a) => a.employmentType == EmploymentTypeEnum.Consultant
).length,
creationTime: new Date("2023-01-01T10:00:00Z"),
lastModificationTime: new Date("2023-01-01T10:00:00Z"),
},
];

View file

@ -1,148 +0,0 @@
import { HrEvaluation360, CampaignStatusEnum } from "../types/hr";
// Örnek 360° Derece Değerlendirme
export const mockEvaluation360: HrEvaluation360[] = [
{
id: "campaign-001",
name: "2024 Q4 360° Derece Değerlendirme",
description: "2024 yılı son çeyrek 360° derece performans değerlendirmesi",
templateId: "template-001",
evaluationPeriod: "2024 Q4",
startDate: new Date("2024-11-01"),
endDate: new Date("2024-12-15"),
status: CampaignStatusEnum.Active,
departmentId: "1", // Üretim departmanı
targetEmployees: ["1", "2", "3", "4", "5"],
settings: {
allowSelfEvaluation: true,
requireManagerEvaluation: true,
minPeerEvaluations: 2,
minSubordinateEvaluations: 1,
allowAnonymousFeedback: true,
sendReminderEmails: true,
reminderIntervalDays: 3,
},
creationTime: new Date("2024-10-15"),
lastModificationTime: new Date("2024-11-15"),
},
{
id: "campaign-002",
name: "2025 Q1 Liderlik Değerlendirmesi",
description:
"Liderlik pozisyonları için özel 360° derece değerlendirme kampanyası",
templateId: "template-001",
evaluationPeriod: "2025 Q1",
startDate: new Date("2025-01-01"),
endDate: new Date("2025-02-28"),
status: CampaignStatusEnum.Active,
departmentId: "2", // Bakım departmanı
targetEmployees: ["7", "8", "9"],
settings: {
allowSelfEvaluation: true,
requireManagerEvaluation: true,
minPeerEvaluations: 3,
minSubordinateEvaluations: 2,
allowAnonymousFeedback: true,
sendReminderEmails: true,
reminderIntervalDays: 5,
},
creationTime: new Date("2024-12-01"),
lastModificationTime: new Date("2024-12-01"),
},
{
id: "campaign-003",
name: "2023 Kalite Departmanı Değerlendirme",
description:
"Kalite kontrol departmanı personeli için 360° derece değerlendirme",
templateId: "template-001",
evaluationPeriod: "2023 Annual",
startDate: new Date("2023-10-01"),
endDate: new Date("2023-11-30"),
status: CampaignStatusEnum.Active,
departmentId: "3", // Kalite Kontrol departmanı
targetEmployees: ["5", "6"],
settings: {
allowSelfEvaluation: true,
requireManagerEvaluation: true,
minPeerEvaluations: 2,
minSubordinateEvaluations: 0,
allowAnonymousFeedback: true,
sendReminderEmails: true,
reminderIntervalDays: 3,
},
creationTime: new Date("2024-09-15"),
lastModificationTime: new Date("2024-11-30"),
},
{
id: "campaign-004",
name: "2022 Kalite Departmanı Değerlendirme",
description:
"Kalite kontrol departmanı personeli için 360° derece değerlendirme",
templateId: "template-001",
evaluationPeriod: "2022 Annual",
startDate: new Date("2022-10-01"),
endDate: new Date("2024-11-30"),
status: CampaignStatusEnum.Active,
departmentId: "3", // Kalite Kontrol departmanı
targetEmployees: ["5", "6"],
settings: {
allowSelfEvaluation: true,
requireManagerEvaluation: true,
minPeerEvaluations: 2,
minSubordinateEvaluations: 0,
allowAnonymousFeedback: true,
sendReminderEmails: true,
reminderIntervalDays: 3,
},
creationTime: new Date("2024-09-15"),
lastModificationTime: new Date("2024-11-30"),
},
{
id: "campaign-005",
name: "2021 Kalite Departmanı Değerlendirme",
description:
"Kalite kontrol departmanı personeli için 360° derece değerlendirme",
templateId: "template-001",
evaluationPeriod: "2021 Annual",
startDate: new Date("2021-10-01"),
endDate: new Date("2021-11-30"),
status: CampaignStatusEnum.Active,
departmentId: "3", // Kalite Kontrol departmanı
targetEmployees: ["5", "6"],
settings: {
allowSelfEvaluation: true,
requireManagerEvaluation: true,
minPeerEvaluations: 2,
minSubordinateEvaluations: 0,
allowAnonymousFeedback: true,
sendReminderEmails: true,
reminderIntervalDays: 3,
},
creationTime: new Date("2024-09-15"),
lastModificationTime: new Date("2024-11-30"),
},
{
id: "campaign-006",
name: "2020 Kalite Departmanı Değerlendirme",
description:
"Kalite kontrol departmanı personeli için 360° derece değerlendirme",
templateId: "template-001",
evaluationPeriod: "2020 Annual",
startDate: new Date("2020-10-01"),
endDate: new Date("2020-11-30"),
status: CampaignStatusEnum.Active,
departmentId: "3", // Kalite Kontrol departmanı
targetEmployees: ["5", "6"],
settings: {
allowSelfEvaluation: true,
requireManagerEvaluation: true,
minPeerEvaluations: 2,
minSubordinateEvaluations: 0,
allowAnonymousFeedback: true,
sendReminderEmails: true,
reminderIntervalDays: 3,
},
creationTime: new Date("2024-09-15"),
lastModificationTime: new Date("2024-11-30"),
},
];

View file

@ -1,519 +0,0 @@
import {
AssessorTypeEnum,
HrEvaluation360Result,
ResultStatusEnum,
ParticipantStatusEnum,
} from "../types/hr";
// Örnek Sonuçlar
export const mockEvaluation360Results: HrEvaluation360Result[] = [
{
id: "result-001",
campaignId: "campaign-001",
employeeId: "1",
participants: [
// Ali Öztürk'ün kendisi tarafından değerlendirme
{
id: "part-001",
campaignId: "campaign-001",
evaluatedEmployeeId: "1",
evaluatorId: "1", // Kendi değerlendirmesi
evaluatorType: AssessorTypeEnum.Self,
status: ParticipantStatusEnum.Completed,
invitedDate: new Date("2024-11-01"),
startedDate: new Date("2024-11-05"),
completedDate: new Date("2024-11-10"),
responses: [
{
id: "resp-001",
participantId: "part-001",
questionId: "q-001", // İletişim Becerileri - İletişim kurar
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-10"),
},
{
id: "resp-002",
participantId: "part-001",
questionId: "q-002", // İletişim Becerileri - Dinleme
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-10"),
},
{
id: "resp-003",
participantId: "part-001",
questionId: "q-005", // Takım Çalışması
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-10"),
},
{
id: "resp-004",
participantId: "part-001",
questionId: "q-008", // Liderlik - Motivasyon
responseValue: 3,
score: 3,
submittedDate: new Date("2024-11-10"),
},
{
id: "resp-005",
participantId: "part-001",
questionId: "q-010", // Problem Çözme
responseValue: 5,
score: 5,
submittedDate: new Date("2024-11-10"),
},
],
overallScore: 85,
notes: "Genel olarak kendimi başarılı buluyorum",
},
// Yönetici tarafından değerlendirme
{
id: "part-002",
campaignId: "campaign-001",
evaluatedEmployeeId: "1",
evaluatorId: "2", // Yönetici değerlendirmesi
evaluatorType: AssessorTypeEnum.Manager,
status: ParticipantStatusEnum.Completed,
invitedDate: new Date("2024-11-01"),
startedDate: new Date("2024-11-08"),
completedDate: new Date("2024-11-12"),
responses: [
{
id: "resp-006",
participantId: "part-002",
questionId: "q-001",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-11-12"),
},
{
id: "resp-007",
participantId: "part-002",
questionId: "q-002",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-12"),
},
{
id: "resp-008",
participantId: "part-002",
questionId: "q-005",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-11-12"),
},
{
id: "resp-009",
participantId: "part-002",
questionId: "q-008",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-12"),
},
{
id: "resp-010",
participantId: "part-002",
questionId: "q-010",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-11-12"),
},
],
overallScore: 92,
notes: "Çok başarılı bir ekip üyesi",
},
// Meslektaş değerlendirmeleri
{
id: "part-003",
campaignId: "campaign-001",
evaluatedEmployeeId: "1",
evaluatorId: "3", // Meslektaş değerlendirmesi
evaluatorType: AssessorTypeEnum.Peer,
status: ParticipantStatusEnum.Completed,
invitedDate: new Date("2024-11-01"),
startedDate: new Date("2024-11-06"),
completedDate: new Date("2024-11-11"),
responses: [
{
id: "resp-011",
participantId: "part-003",
questionId: "q-001",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-11"),
},
{
id: "resp-012",
participantId: "part-003",
questionId: "q-002",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-11-11"),
},
{
id: "resp-013",
participantId: "part-003",
questionId: "q-005",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-11"),
},
{
id: "resp-014",
participantId: "part-003",
questionId: "q-008",
responseValue: 3,
score: 3,
submittedDate: new Date("2024-11-11"),
},
{
id: "resp-015",
participantId: "part-003",
questionId: "q-010",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-11-11"),
},
],
overallScore: 87,
notes: "İşbirliğinde çok başarılı",
},
],
overallScore: 88.5,
maxPossibleScore: 100,
scorePercentage: 88.5,
groupScores: [
{
groupId: "group-001",
groupName: "İletişim Becerileri",
score: 22,
maxScore: 25,
percentage: 88,
responseCount: 3,
},
{
groupId: "group-002",
groupName: "Takım Çalışması",
score: 23,
maxScore: 25,
percentage: 92,
responseCount: 3,
},
{
groupId: "group-003",
groupName: "Liderlik",
score: 20,
maxScore: 25,
percentage: 80,
responseCount: 3,
},
{
groupId: "group-004",
groupName: "Problem Çözme",
score: 23.5,
maxScore: 25,
percentage: 94,
responseCount: 3,
},
],
assessorTypeScores: [
{
assessorType: AssessorTypeEnum.Self,
assessorCount: 1,
averageScore: 85,
maxScore: 100,
percentage: 85,
},
{
assessorType: AssessorTypeEnum.Manager,
assessorCount: 1,
averageScore: 92,
maxScore: 100,
percentage: 92,
},
{
assessorType: AssessorTypeEnum.Peer,
assessorCount: 2,
averageScore: 87,
maxScore: 100,
percentage: 87,
},
],
strengths: [
"Problem çözme konusunda çok başarılı",
"Takım çalışmasında öne çıkıyor",
"İletişim becerileri güçlü",
],
developmentAreas: [
"Liderlik becerilerini geliştirmeli",
"Zaman yönetimi konusunda iyileştirme yapabilir",
],
actionPlan: [
"Liderlik eğitimi alması öneriliyor",
"Zaman yönetimi workshop'una katılmalı",
"Mentorluk programına dahil edilmeli",
],
managerComments: "Genel olarak çok başarılı. Liderlik potansiyeli yüksek.",
status: ResultStatusEnum.Pending,
generatedDate: new Date("2024-11-20"),
approvedBy: "hr-manager",
approvedDate: new Date("2024-11-22"),
},
{
id: "result-002",
campaignId: "campaign-003",
employeeId: "5",
participants: [
// Fatma Yıldız'ın kendisi tarafından değerlendirme
{
id: "part-101",
campaignId: "campaign-003",
evaluatedEmployeeId: "5",
evaluatorId: "5", // Kendi değerlendirmesi
evaluatorType: AssessorTypeEnum.Self,
status: ParticipantStatusEnum.Declined,
invitedDate: new Date("2024-10-01"),
startedDate: new Date("2024-10-05"),
completedDate: new Date("2024-10-15"),
responses: [
{
id: "resp-101",
participantId: "part-101",
questionId: "q-001",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-15"),
},
{
id: "resp-102",
participantId: "part-101",
questionId: "q-002",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-15"),
},
{
id: "resp-103",
participantId: "part-101",
questionId: "q-005",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-15"),
},
{
id: "resp-104",
participantId: "part-101",
questionId: "q-008",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-15"),
},
{
id: "resp-105",
participantId: "part-101",
questionId: "q-010",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-10-15"),
},
],
overallScore: 88,
notes: "Kalite standartlarına uyum konusunda kendimi başarılı buluyorum",
},
// Yönetici tarafından değerlendirme
{
id: "part-102",
campaignId: "campaign-003",
evaluatedEmployeeId: "5",
evaluatorId: "1", // Yönetici değerlendirmesi
evaluatorType: AssessorTypeEnum.Manager,
status: ParticipantStatusEnum.Invited,
invitedDate: new Date("2024-10-01"),
startedDate: new Date("2024-10-10"),
completedDate: new Date("2024-10-20"),
responses: [
{
id: "resp-106",
participantId: "part-102",
questionId: "q-001",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-10-20"),
},
{
id: "resp-107",
participantId: "part-102",
questionId: "q-002",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-10-20"),
},
{
id: "resp-108",
participantId: "part-102",
questionId: "q-005",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-20"),
},
{
id: "resp-109",
participantId: "part-102",
questionId: "q-008",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-20"),
},
{
id: "resp-110",
participantId: "part-102",
questionId: "q-010",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-10-20"),
},
],
overallScore: 91,
notes: "Kalite kontrol süreçlerinde çok titiz ve başarılı",
},
// Meslektaş değerlendirmesi
{
id: "part-103",
campaignId: "campaign-003",
evaluatedEmployeeId: "5",
evaluatorId: "6", // Meslektaş değerlendirmesi
evaluatorType: AssessorTypeEnum.Peer,
status: ParticipantStatusEnum.Started,
invitedDate: new Date("2024-10-01"),
startedDate: new Date("2024-10-12"),
completedDate: new Date("2024-10-18"),
responses: [
{
id: "resp-111",
participantId: "part-103",
questionId: "q-001",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-10-18"),
},
{
id: "resp-112",
participantId: "part-103",
questionId: "q-002",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-18"),
},
{
id: "resp-113",
participantId: "part-103",
questionId: "q-005",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-18"),
},
{
id: "resp-114",
participantId: "part-103",
questionId: "q-008",
responseValue: 4,
score: 4,
submittedDate: new Date("2024-10-18"),
},
{
id: "resp-115",
participantId: "part-103",
questionId: "q-010",
responseValue: 5,
score: 5,
submittedDate: new Date("2024-10-18"),
},
],
overallScore: 89,
notes: "Detaycı ve kalite odaklı çalışıyor",
},
],
overallScore: 450,
maxPossibleScore: 500,
scorePercentage: 90,
groupScores: [
{
groupId: "group-001",
groupName: "İletişim Becerileri",
score: 115,
maxScore: 125,
percentage: 92,
responseCount: 3,
},
{
groupId: "group-002",
groupName: "Takım Çalışması",
score: 110,
maxScore: 125,
percentage: 88,
responseCount: 3,
},
{
groupId: "group-003",
groupName: "Liderlik",
score: 105,
maxScore: 125,
percentage: 84,
responseCount: 3,
},
{
groupId: "group-004",
groupName: "Problem Çözme",
score: 120,
maxScore: 125,
percentage: 96,
responseCount: 3,
},
],
assessorTypeScores: [
{
assessorType: AssessorTypeEnum.Self,
assessorCount: 1,
averageScore: 88,
maxScore: 100,
percentage: 88,
},
{
assessorType: AssessorTypeEnum.Manager,
assessorCount: 1,
averageScore: 91,
maxScore: 100,
percentage: 91,
},
{
assessorType: AssessorTypeEnum.Peer,
assessorCount: 2,
averageScore: 89,
maxScore: 100,
percentage: 89,
},
],
strengths: [
"Kalite standartlarına titizlikle uyuyor",
"Analitik düşünce becerisi güçlü",
"Detaycı ve organizeli çalışıyor",
],
developmentAreas: [
"Takım motivasyonu konusunda gelişim gösterebilir",
"Yaratıcı çözümler üretme konusunda iyileştirme yapabilir",
],
actionPlan: [
"Takım liderliği eğitimi alması öneriliyor",
"Yaratıcı düşünce workshop'una katılmalı",
"Cross-functional projelerde yer almalı",
],
managerComments: "Kalite kontrol süreçlerinde mükemmel performans gösteriyor.",
hrComments: "Liderlik potansiyeli geliştirilmeli.",
status: ResultStatusEnum.Pending,
generatedDate: new Date("2024-12 -01"),
approvedBy: "quality-manager",
approvedDate: new Date("2024-12-03"),
},
];

View file

@ -1,283 +0,0 @@
import {
HrEvaluation360Template,
QuestionTypeEnum,
AssessorTypeEnum,
} from "../types/hr";
// Örnek Değerlendirme Şablonu
export const mockEvaluation360Templates: HrEvaluation360Template[] = [
{
id: "template-001",
name: "Genel Yetkinlik Değerlendirmesi",
description:
"Tüm pozisyonlar için kullanılabilecek genel 360° derece değerlendirme şablonu",
isActive: true,
assessorTypes: [
AssessorTypeEnum.Self,
AssessorTypeEnum.Manager,
AssessorTypeEnum.Peer,
AssessorTypeEnum.Subordinate,
AssessorTypeEnum.Customer,
AssessorTypeEnum.External,
AssessorTypeEnum.HRUpperManagement,
AssessorTypeEnum.OtherDepartment,
],
questionGroups: [
{
id: "group-001",
templateId: "template-001",
groupName: "İletişim Becerileri",
description: "Sözlü ve yazılı iletişim, dinleme becerileri",
weight: 25,
order: 1,
questions: [
{
id: "q-001",
groupId: "group-001",
questionText:
"Bu kişi açık ve anlaşılır bir şekilde iletişim kurar",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 20,
order: 1,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
{
id: "q-002",
groupId: "group-001",
questionText: "Bu kişi diğerlerini etkin bir şekilde dinler",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 20,
order: 2,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
{
id: "q-003",
groupId: "group-001",
questionText: "Bu kişinin yazılı iletişim becerileri nasıldır?",
questionType: QuestionTypeEnum.MultipleChoice,
isRequired: true,
weight: 15,
order: 3,
options: [
{
id: "opt-001",
questionId: "q-003",
optionText: "Çok Zayıf",
value: 1,
order: 1,
},
{
id: "opt-002",
questionId: "q-003",
optionText: "Zayıf",
value: 2,
order: 2,
},
{
id: "opt-003",
questionId: "q-003",
optionText: "Orta",
value: 3,
order: 3,
},
{
id: "opt-004",
questionId: "q-003",
optionText: "İyi",
value: 4,
order: 4,
},
{
id: "opt-005",
questionId: "q-003",
optionText: "Mükemmel",
value: 5,
order: 5,
},
],
},
{
id: "q-004",
groupId: "group-001",
questionText: "İletişim konusunda özel yorumlarınız:",
questionType: QuestionTypeEnum.Text,
isRequired: false,
weight: 5,
order: 4,
},
],
},
{
id: "group-002",
templateId: "template-001",
groupName: "Takım Çalışması",
description: "İşbirliği, team work, ortak hedeflere odaklanma",
weight: 25,
order: 2,
questions: [
{
id: "q-005",
groupId: "group-002",
questionText: "Bu kişi takım içinde yapıcı bir rol oynar",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 25,
order: 1,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
{
id: "q-006",
groupId: "group-002",
questionText: "Bu kişi çatışma durumlarında yapıcı çözümler önerir",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 25,
order: 2,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
{
id: "q-007",
groupId: "group-002",
questionText:
"Takım çalışması konusundaki gözlemlerinizi paylaşın:",
questionType: QuestionTypeEnum.Text,
isRequired: false,
weight: 10,
order: 3,
},
],
},
{
id: "group-003",
templateId: "template-001",
groupName: "Liderlik",
description: "Vizyon oluşturma, yönlendirme, motivasyon",
weight: 25,
order: 3,
questions: [
{
id: "q-008",
groupId: "group-003",
questionText: "Bu kişi takımı motive etme konusunda başarılıdır",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 30,
order: 1,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
{
id: "q-009",
groupId: "group-003",
questionText: "Bu kişi zor durumlarda liderlik gösterir",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 30,
order: 2,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
],
},
{
id: "group-004",
templateId: "template-001",
groupName: "Problem Çözme",
description: "Analitik düşünme, yaratıcı çözümler üretme",
weight: 25,
order: 4,
questions: [
{
id: "q-010",
groupId: "group-004",
questionText:
"Bu kişi karmaşık problemleri etkili bir şekilde analiz eder",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 30,
order: 1,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
{
id: "q-011",
groupId: "group-004",
questionText: "Bu kişi yaratıcı ve inovatif çözümler üretir",
questionType: QuestionTypeEnum.Rating,
isRequired: true,
weight: 30,
order: 2,
minRating: 1,
maxRating: 5,
ratingLabels: [
"Hiç Katılmıyorum",
"Katılmıyorum",
"Kararsızım",
"Katılıyorum",
"Tamamen Katılıyorum",
],
},
],
},
],
applicablePositions: [],
applicableDepartments: [],
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
];

View file

@ -1,131 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
CriticalityLevelEnum,
PmFaultNotification,
FaultTypeEnum,
NotificationStatusEnum,
} from "../types/pm";
import { mockWorkCenters } from "./mockWorkCenters";
export const mockFaultNotifications: PmFaultNotification[] = [
{
id: "FN001",
notificationCode: "ARZ-2024-001",
workCenterId: "1",
workCenter: mockWorkCenters.find((wc) => wc.id === "1")!,
location: "Atölye A - Hat 1",
faultType: FaultTypeEnum.Mechanical,
priority: PriorityEnum.High,
severity: CriticalityLevelEnum.High,
title: "Motor Aşırı Titreşim",
description:
"CNC torna tezgahında motor aşırı titreşim yapıyor. Ses seviyesi normalden yüksek ve hassas işlemlerde problem yaşanıyor.",
reportedBy: "Operator Mustafa Koç",
reportedAt: new Date("2024-02-08T09:30:00"),
assignedTo: "Mehmet Kaya - Mekanik Ekibi",
status: NotificationStatusEnum.InProgress,
images: ["fault_image_1.jpg", "fault_image_2.jpg"],
estimatedRepairTime: 180,
workOrderId: "WO-2024-045",
followUpRequired: true,
isActive: true,
creationTime: new Date("2024-02-08T09:30:00"),
lastModificationTime: new Date("2024-02-08T14:15:00"),
},
{
id: "FN002",
notificationCode: "ARZ-2024-002",
workCenterId: "2",
workCenter: mockWorkCenters.find((wc) => wc.id === "2")!,
location: "Kompresör Odası",
faultType: FaultTypeEnum.Electrical,
priority: PriorityEnum.Urgent,
severity: CriticalityLevelEnum.Critical,
title: "Elektrik Panosu Arızası",
description:
"Kompresör elektrik panosunda kısa devre meydana geldi. Sistem tamamen durdu.",
reportedBy: "Vardiya Amiri Ali Demir",
reportedAt: new Date("2024-02-07T16:45:00"),
assignedTo: "Ahmet Yılmaz - Elektrik Ekibi",
status: NotificationStatusEnum.Resolved,
estimatedRepairTime: 240,
actualRepairTime: 195,
resolutionNotes:
"Yanık sigorta değiştirildi ve pano kontrolleri yapıldı. Sistem normal çalışıyor.",
closedBy: "Ahmet Yılmaz",
closedAt: new Date("2024-02-07T20:00:00"),
workOrderId: "WO-2024-044",
followUpRequired: false,
isActive: true,
creationTime: new Date("2024-02-07T16:45:00"),
lastModificationTime: new Date("2024-02-07T20:00:00"),
},
{
id: "FN003",
notificationCode: "ARZ-2024-003",
workCenterId: "3",
workCenter: mockWorkCenters.find((wc) => wc.id === "3")!,
location: "Ana Üretim Hattı",
faultType: FaultTypeEnum.Mechanical,
priority: PriorityEnum.Normal,
severity: CriticalityLevelEnum.Medium,
title: "Kayış Gerilimi Azaldı",
description:
"Konveyör kayışında gevşeme tespit edildi. Hız düşüklüğü gözlemleniyor.",
reportedBy: "Hat Sorumlusu Fatma Özkan",
reportedAt: new Date("2024-02-06T11:20:00"),
status: NotificationStatusEnum.Open,
estimatedRepairTime: 60,
followUpRequired: false,
isActive: true,
creationTime: new Date("2024-02-06T11:20:00"),
lastModificationTime: new Date("2024-02-06T11:20:00"),
},
{
id: "FN004",
notificationCode: "ARZ-2024-004",
workCenterId: "3",
workCenter: mockWorkCenters.find((wc) => wc.id === "3")!,
location: "Kaynak Atölyesi",
faultType: FaultTypeEnum.Software,
priority: PriorityEnum.High,
severity: CriticalityLevelEnum.High,
title: "Program Kalibrasyon Hatası",
description:
"Robot kaynak pozisyonlarında sapma var. Kalibrasyon gerekiyor.",
reportedBy: "Kaynak Operatörü Hasan Çelik",
reportedAt: new Date("2024-02-05T14:10:00"),
assignedTo: "Sema Korkmaz - Robot Teknisyeni",
status: NotificationStatusEnum.Assigned,
estimatedRepairTime: 120,
followUpRequired: true,
isActive: true,
creationTime: new Date("2024-02-05T14:10:00"),
lastModificationTime: new Date("2024-02-05T15:30:00"),
},
{
id: "FN005",
notificationCode: "ARZ-2024-005",
workCenterId: "4",
workCenter: mockWorkCenters.find((wc) => wc.id === "4")!,
location: "Pres Atölyesi",
faultType: FaultTypeEnum.Hydraulic,
priority: PriorityEnum.Low,
severity: CriticalityLevelEnum.Low,
title: "Yağ Sızıntısı",
description:
"Hidrolik sistem borularında hafif yağ sızıntısı tespit edildi.",
reportedBy: "Temizlik Personeli Zeynep Aktaş",
reportedAt: new Date("2024-02-04T08:45:00"),
status: NotificationStatusEnum.Closed,
estimatedRepairTime: 45,
actualRepairTime: 30,
resolutionNotes: "Boru bağlantıları sıkılaştırıldı. Sızıntı durduruldu.",
closedBy: "Ali Demir",
closedAt: new Date("2024-02-04T10:15:00"),
followUpRequired: true,
isActive: true,
creationTime: new Date("2024-02-04T08:45:00"),
lastModificationTime: new Date("2024-02-04T10:15:00"),
},
];

View file

@ -1,112 +0,0 @@
import {
CountStatusEnum,
CountTypeEnum,
WmInventoryCount,
WmInventoryCountItem,
} from "../types/wm";
import { mockLocations } from "./mockLocations";
import { mockMaterials } from "./mockMaterials";
import { mockWarehouses } from "./mockWarehouses";
import { mockZones } from "./mockZones";
export const mockInventoryCounts: WmInventoryCount[] = [
{
id: "1",
countNumber: "INV2024001",
warehouseId: "1",
warehouse: mockWarehouses.find((m) => m.id === "1"),
zoneId: "1",
zone: mockZones.find((m) => m.id === "1"),
locationId: "3",
location: mockLocations.find((m) => m.id === "3"),
countType: CountTypeEnum.Full,
status: CountStatusEnum.Completed,
scheduledDate: new Date("2024-11-01"),
startDate: new Date("2024-11-01"),
endDate: new Date("2024-11-03"),
countedBy: ["user1", "user2"],
approvedBy: "manager1",
items: [],
variances: [],
notes: "Aylık tam sayım",
creationTime: new Date("2024-10-25"),
lastModificationTime: new Date("2024-11-03"),
},
{
id: "2",
countNumber: "INV2024002",
warehouseId: "1",
warehouse: mockWarehouses.find((m) => m.id === "1"),
zoneId: "1",
zone: mockZones.find((m) => m.id === "1"),
locationId: "3",
location: mockLocations.find((m) => m.id === "3"),
countType: CountTypeEnum.Cycle,
status: CountStatusEnum.InProgress,
scheduledDate: new Date("2024-11-25"),
startDate: new Date("2024-11-25"),
endDate: undefined,
countedBy: ["user3"],
approvedBy: undefined,
items: [],
variances: [],
notes: "A grubu malzemeler döngüsel sayım",
creationTime: new Date("2024-11-20"),
lastModificationTime: new Date("2024-11-25"),
},
{
id: "3",
countNumber: "INV2024003",
warehouseId: "1",
warehouse: mockWarehouses.find((m) => m.id === "1"),
zoneId: "2",
zone: mockZones.find((m) => m.id === "2"),
locationId: "2",
location: mockLocations.find((m) => m.id === "2"),
countType: CountTypeEnum.Spot,
status: CountStatusEnum.Planned,
scheduledDate: new Date("2024-12-05"),
startDate: undefined,
endDate: undefined,
countedBy: [],
approvedBy: undefined,
items: [],
variances: [],
notes: "Şüpheli stoklar için nokta sayım",
creationTime: new Date("2024-11-30"),
lastModificationTime: new Date("2024-11-30"),
},
];
export const mockCountItems: WmInventoryCountItem[] = [
{
id: "1",
countId: "1",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
locationId: "1",
systemQuantity: 15,
countedQuantity: 14,
variance: -1,
variancePercentage: -6.67,
lotNumber: "LOT2024001",
countedBy: "user1",
countedAt: new Date("2024-11-01"),
notes: "Hasarlı 1 adet tespit edildi",
},
{
id: "2",
countId: "1",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
locationId: "1",
systemQuantity: 8,
countedQuantity: 8,
variance: 0,
variancePercentage: 0,
lotNumber: "LOT2024002",
countedBy: "user2",
countedAt: new Date("2024-11-01"),
notes: "Sayım doğru",
},
];

View file

@ -1,55 +0,0 @@
import {
FiInvoice,
InvoiceStatusEnum,
InvoiceTypeEnum,
PaymentStatusEnum,
} from "../types/fi";
import { mockCurrentAccounts } from "./mockCurrentAccounts";
export const mockInvoices: FiInvoice[] = [
{
id: "1",
invoiceNumber: "SAT-2024-001",
invoiceType: InvoiceTypeEnum.Sales,
currentAccountId: "1",
currentAccount: mockCurrentAccounts.find((acc) => acc.id === "1")!,
invoiceDate: new Date("2024-01-15"),
dueDate: new Date("2024-02-14"),
subtotal: 10000,
taxAmount: 1800,
discountAmount: 0,
totalAmount: 11800,
paidAmount: 5000,
remainingAmount: 6800,
currency: "TRY",
status: InvoiceStatusEnum.Sent,
paymentStatus: PaymentStatusEnum.PartiallyPaid,
items: [],
waybillNumber: "IRS-2024-001",
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-20"),
},
{
id: "2",
invoiceNumber: "AL-2024-001",
invoiceType: InvoiceTypeEnum.Purchase,
currentAccountId: "2",
currentAccount: mockCurrentAccounts.find((acc) => acc.id === "2")!,
invoiceDate: new Date("2024-01-10"),
dueDate: new Date("2024-02-09"),
subtotal: 15000,
taxAmount: 2700,
discountAmount: 0,
totalAmount: 17700,
paidAmount: 17700,
remainingAmount: 0,
currency: "TRY",
status: InvoiceStatusEnum.Approved,
paymentStatus: PaymentStatusEnum.Paid,
items: [],
waybillNumber: "IRS-2024-002",
waybillDate: new Date("2024-01-10"),
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-15"),
},
];

View file

@ -1,10 +1,10 @@
import { JobPositionDto, JobLevelEnum } from "../types/hr";
import { JobPositionDto } from "@/proxy/intranet/models";
import { mockDepartments } from "./mockDepartments";
import { JobLevelEnum } from "@/types/hr";
export const mockJobPositions: JobPositionDto[] = [
{
id: "1",
code: "DEV-001",
name: "Software Developer",
description: "Responsible for developing and maintaining web applications",
departmentId: "1",
@ -32,7 +32,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "2",
code: "MGR-001",
name: "Project Manager",
description: "Lead and manage software development projects",
departmentId: "1",
@ -60,7 +59,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "3",
code: "QA-001",
name: "Quality Assurance Engineer",
description: "Ensure software quality through testing and automation",
departmentId: "1",
@ -88,7 +86,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "4",
code: "UX-001",
name: "UX/UI Designer",
description: "Design user interfaces and improve user experience",
departmentId: "2",
@ -121,7 +118,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "5",
code: "DA-001",
name: "Data Analyst",
description: "Analyze business data and provide insights",
departmentId: "1",
@ -149,7 +145,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "6",
code: "HR-001",
name: "HR Specialist",
description: "Support human resources operations and employee relations",
departmentId: "4",
@ -182,7 +177,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "7",
code: "SA-001",
name: "Sales Associate",
description: "Generate sales leads and maintain customer relationships",
departmentId: "2",
@ -210,7 +204,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "8",
code: "ACC-001",
name: "Accountant",
description: "Manage financial records and ensure compliance",
departmentId: "3",
@ -243,7 +236,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "9",
code: "CS-001",
name: "Customer Support Representative",
description: "Provide excellent customer service and technical support",
departmentId: "2",
@ -276,7 +268,6 @@ export const mockJobPositions: JobPositionDto[] = [
},
{
id: "10",
code: "IT-001",
name: "IT Support Specialist",
description: "Provide technical support and maintain IT infrastructure",
departmentId: "1",

View file

@ -1,110 +0,0 @@
import { LocationTypeEnum } from "../types/wm";
import { WmLocation } from "../types/wm";
export const mockLocations: WmLocation[] = [
{
id: "1",
warehouseId: "1",
zoneId: "2",
locationCode: "A01-01-01",
name: "A Blok 1. Koridor 1. Raf",
description: "Yüksek raf - Ağır malzemeler",
locationType: LocationTypeEnum.Rack,
capacity: 100,
currentStock: 75,
dimensions: {
length: 2.5,
width: 1.2,
height: 3.0,
weight: 1000,
unit: "kg",
},
restrictions: ["Ağır malzemeler", "Palet kullanımı zorunlu"],
stockItems: [],
isActive: true,
},
{
id: "2",
warehouseId: "1",
zoneId: "2",
locationCode: "A01-01-02",
name: "A Blok 1. Koridor 2. Raf",
description: "Orta raf - Orta ağırlık malzemeler",
locationType: LocationTypeEnum.Shelf,
capacity: 50,
currentStock: 30,
dimensions: {
length: 2.0,
width: 0.8,
height: 2.0,
weight: 500,
unit: "kg",
},
restrictions: ["Orta ağırlık malzemeler"],
stockItems: [],
isActive: true,
},
{
id: "3",
warehouseId: "1",
zoneId: "1",
locationCode: "B02-02-01",
name: "B Blok 2. Koridor 1. Raf",
description: "Küçük parçalar rafı",
locationType: LocationTypeEnum.Bin,
capacity: 200,
currentStock: 180,
dimensions: {
length: 1.5,
width: 0.6,
height: 1.5,
weight: 200,
unit: "kg",
},
restrictions: ["Küçük parçalar"],
stockItems: [],
isActive: true,
},
{
id: "4",
warehouseId: "2",
zoneId: "1",
locationCode: "B02-02-01",
name: "B Blok 2. Koridor 1. Raf",
description: "Küçük parçalar rafı",
locationType: LocationTypeEnum.Bin,
capacity: 200,
currentStock: 180,
dimensions: {
length: 1.5,
width: 0.6,
height: 1.5,
weight: 200,
unit: "kg",
},
restrictions: ["Küçük parçalar"],
stockItems: [],
isActive: true,
},
{
id: "4",
warehouseId: "2",
zoneId: "3",
locationCode: "C01-02-01",
name: "C Blok 2. Koridor 1. Raf",
description: "Büyük parçalar rafı",
locationType: LocationTypeEnum.Bin,
capacity: 200,
currentStock: 180,
dimensions: {
length: 1.5,
width: 0.6,
height: 1.5,
weight: 200,
unit: "kg",
},
restrictions: ["Küçük parçalar"],
stockItems: [],
isActive: true,
},
];

View file

@ -1,52 +0,0 @@
import { CrmLostReason, LostReasonCategoryEnum } from "../types/crm";
export const mockLossReasons: CrmLostReason[] = [
{
id: "1",
code: "LR001",
name: "Fiyat Rekabetsizliği",
description: "Müşteri daha uygun fiyatlı alternatif buldu",
category: LostReasonCategoryEnum.Price,
isActive: true,
},
{
id: "2",
code: "LR002",
name: "Ürün Özellik Eksikliği",
description: "Ürünümüzde müşterinin istediği özellik bulunmuyor",
category: LostReasonCategoryEnum.Product,
isActive: true,
},
{
id: "3",
code: "LR003",
name: "Destek Kalitesi",
description: "Müşteri destek kalitemizden memnun değil",
category: LostReasonCategoryEnum.Service,
isActive: true,
},
{
id: "4",
code: "LR004",
name: "Rakip Avantajı",
description: "Rakip daha iyi şartlar sundu",
category: LostReasonCategoryEnum.Competitor,
isActive: true,
},
{
id: "5",
code: "LR005",
name: "Yanlış Zamanlama",
description: "Müşteri zamanlaması uygun değil",
category: LostReasonCategoryEnum.Timing,
isActive: false,
},
{
id: "6",
code: "LR006",
name: "Bütçe Kısıtlaması",
description: "Müşteri bütçesi yetersiz",
category: LostReasonCategoryEnum.Budget,
isActive: true,
},
];

View file

@ -1,42 +0,0 @@
import { MmLotNumber, QualityStatusEnum } from "../types/mm";
import { mockMaterials } from "./mockMaterials";
export const mockLotNumbers: MmLotNumber[] = [
{
id: "1",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
lotNumber: "LOT-2024-001",
productionDate: new Date("2024-01-01"),
expiryDate: new Date("2024-12-31"),
quantity: 100,
unitId: "KG",
supplierId: "SUP-001",
qualityStatus: QualityStatusEnum.Approved,
isActive: true,
},
{
id: "2",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
lotNumber: "LOT-2024-002",
productionDate: new Date("2024-01-15"),
expiryDate: new Date("2025-01-14"),
quantity: 75,
unitId: "KG",
supplierId: "SUP-002",
qualityStatus: QualityStatusEnum.Pending,
isActive: true,
},
{
id: "3",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
lotNumber: "LOT-2024-003",
productionDate: new Date("2024-01-10"),
quantity: 50,
unitId: "ADET",
qualityStatus: QualityStatusEnum.Quarantine,
isActive: true,
},
];

View file

@ -1,168 +0,0 @@
import { PriorityEnum } from "../types/common";
import { mockMaterials } from "./../mocks/mockMaterials";
import {
MrpMaterialRequirement,
MrpProductionSuggestion,
MrpPurchaseSuggestion,
RecommendationStatusEnum,
RecommendationTypeEnum,
RequirementSourceTypeEnum,
} from "./../types/mrp";
export const mockMaterialRequirements: MrpMaterialRequirement[] = [
{
id: "1",
mrpRunId: "mrp-run-123",
materialId: mockMaterials[0].id,
material: mockMaterials[0],
sourceType: RequirementSourceTypeEnum.SalesOrder,
sourceDocumentId: "SO-2024-001",
grossRequirement: 150,
projectedAvailable: 50,
scheduledReceipts: 20,
netRequirement: 80,
plannedOrderReceipt: 80,
plannedOrderRelease: 80,
requirementDate: new Date("2024-08-15"),
plannedReceiptDate: new Date("2024-08-10"),
plannedReleaseDate: new Date("2024-08-01"),
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "2",
mrpRunId: "mrp-run-123",
materialId: mockMaterials[2].id,
material: mockMaterials[2],
sourceType: RequirementSourceTypeEnum.Forecast,
sourceDocumentId: "F-2024-Q3",
grossRequirement: 500,
projectedAvailable: 200,
scheduledReceipts: 100,
netRequirement: 200,
plannedOrderReceipt: 200,
plannedOrderRelease: 200,
requirementDate: new Date("2024-09-01"),
plannedReceiptDate: new Date("2024-08-25"),
plannedReleaseDate: new Date("2024-08-10"),
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "3",
mrpRunId: "mrp-run-123",
materialId: mockMaterials[4].id,
material: mockMaterials[4],
sourceType: RequirementSourceTypeEnum.SafetyStock,
sourceDocumentId: "SS-RULE-1",
grossRequirement: 100,
projectedAvailable: 30,
scheduledReceipts: 0,
netRequirement: 70,
plannedOrderReceipt: 70,
plannedOrderRelease: 70,
requirementDate: new Date("2024-07-30"),
plannedReceiptDate: new Date("2024-07-25"),
plannedReleaseDate: new Date("2024-07-15"),
creationTime: new Date(),
lastModificationTime: new Date(),
},
];
export const mockPurchaseSuggestions: MrpPurchaseSuggestion[] = [
{
id: "rec-pur-1",
mrpRunId: "mrp-run-123",
materialId: mockMaterials[2].id,
material: mockMaterials[2],
recommendationType: RecommendationTypeEnum.PurchaseRequisition,
recommendedAction: "200 adet satın al",
reason: "Tahmin bazlı ihtiyaç",
quantity: 200,
dueDate: new Date("2024-08-25"),
priority: PriorityEnum.Normal,
status: RecommendationStatusEnum.Open,
creationTime: new Date(),
lastModificationTime: new Date(),
supplierId: "1",
supplier: mockMaterials
.find((m) => m.id === mockMaterials[2].id)
?.suppliers?.find((s) => s.id === "1"),
estimatedCost:
200 *
(mockMaterials
.find((m) => m.id === mockMaterials[2].id)
?.suppliers?.find((s) => s.id === "1")?.price || 12.5),
leadTime:
mockMaterials
.find((m) => m.id === mockMaterials[2].id)
?.suppliers?.find((s) => s.id === "1")?.leadTime || 15,
minimumOrderQuantity: 0,
suggestedQuantity: 0,
economicOrderQuantity: 0,
},
{
id: "rec-pur-2",
mrpRunId: "mrp-run-123",
materialId: mockMaterials[4].id,
material: mockMaterials[4],
recommendationType: RecommendationTypeEnum.PurchaseRequisition,
recommendedAction: "70 adet satın al",
reason: "Güvenlik stoku altına düştü",
quantity: 70,
dueDate: new Date("2024-07-25"),
priority: PriorityEnum.High,
status: RecommendationStatusEnum.Open,
creationTime: new Date(),
lastModificationTime: new Date(),
supplier: mockMaterials
.find((m) => m.id === mockMaterials[1].id)
?.suppliers?.find((s) => s.id === "1"),
estimatedCost:
200 *
(mockMaterials
.find((m) => m.id === mockMaterials[2].id)
?.suppliers?.find((s) => s.id === "1")?.price || 5.5),
leadTime:
mockMaterials
.find((m) => m.id === mockMaterials[2].id)
?.suppliers?.find((s) => s.id === "1")?.leadTime || 10,
minimumOrderQuantity: 20,
suggestedQuantity: 70,
economicOrderQuantity: 100,
supplierId: "",
},
];
export const mockProductionSuggestions: MrpProductionSuggestion[] = [
{
id: "rec-prod-1",
mrpRunId: "mrp-run-123",
materialId: mockMaterials[0].id,
material: mockMaterials[0],
recommendationType: RecommendationTypeEnum.PlannedOrder,
recommendedAction: "80 adet üret",
reason: "Satış siparişi ihtiyacı",
quantity: 80,
dueDate: new Date("2024-08-10"),
priority: PriorityEnum.Urgent,
status: RecommendationStatusEnum.Open,
creationTime: new Date(),
lastModificationTime: new Date(),
estimatedDuration: 40, // hours
resourceRequirements: [
{ workCenter: "MONTAJ-01", capacity: 40, efficiency: 95 },
],
bom: {
id: "bom-1",
version: "1.2",
materialCount: 5,
totalCost: 1500,
},
productionCost: 80 * 25.5,
setupTime: 2,
cycleTime: 0.5,
suggestedStartDate: "2024-08-01",
suggestedCompletionDate: "2024-08-05",
},
];

View file

@ -1,86 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
PmCalendarEvent as MaintenanceCalendarEvent,
WorkOrderStatusEnum,
} from "../types/pm";
export const mockCalendarEvents: MaintenanceCalendarEvent[] = [
{
id: "E001",
title: "CNC Torna Rutin Bakım",
type: "plan",
date: new Date("2024-02-12"),
startTime: "09:00",
endTime: "11:00",
status: WorkOrderStatusEnum.Created,
priority: PriorityEnum.High,
assignedTo: "Mehmet Kaya",
workCenterCode: "CNC-001",
duration: 120,
},
{
id: "E002",
title: "Kompresör Aylık Bakım",
type: "plan",
date: new Date("2024-02-15"),
startTime: "08:00",
endTime: "12:00",
status: WorkOrderStatusEnum.Created,
priority: PriorityEnum.Urgent,
assignedTo: "Ali Demir",
workCenterCode: "COMP-001",
duration: 240,
},
{
id: "E003",
title: "Konveyör Arıza Onarım",
type: "workorder",
date: new Date("2024-02-10"),
startTime: "14:00",
endTime: "17:00",
status: WorkOrderStatusEnum.InProgress,
priority: PriorityEnum.High,
assignedTo: "Ahmet Yılmaz",
workCenterCode: "CONV-001",
duration: 180,
},
{
id: "E004",
title: "Robot Kaynak Kalibrasyon",
type: "workorder",
date: new Date("2024-02-08"),
startTime: "10:00",
endTime: "18:00",
status: WorkOrderStatusEnum.Completed,
priority: PriorityEnum.Normal,
assignedTo: "Fatma Özkan",
workCenterCode: "WELD-001",
duration: 480,
},
{
id: "E005",
title: "Hidrolik Sistem Kontrol",
type: "plan",
date: new Date("2024-02-14"),
startTime: "13:00",
endTime: "15:00",
status: WorkOrderStatusEnum.Created,
priority: PriorityEnum.Normal,
assignedTo: "Sema Korkmaz",
workCenterCode: "HYD-001",
duration: 120,
},
{
id: "E006",
title: "Elektrik Panosu Bakım",
type: "plan",
date: new Date("2024-02-16"),
startTime: "16:00",
endTime: "18:00",
status: WorkOrderStatusEnum.Created,
priority: PriorityEnum.Low,
assignedTo: "Hasan Çelik",
workCenterCode: "ELEC-001",
duration: 120,
},
];

View file

@ -1,80 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
FrequencyUnitEnum,
PmMaintenancePlan,
MaintenancePlanTypeEnum,
} from "../types/pm";
export const mockMaintenancePlans: PmMaintenancePlan[] = [
{
id: "MP001",
planCode: "PM-CNC-001",
workCenterId: "EQP001",
planType: MaintenancePlanTypeEnum.Preventive,
description: "CNC torna tezgahı için haftalık rutin bakım planı",
frequency: 1,
frequencyUnit: FrequencyUnitEnum.Weeks,
estimatedDuration: 120,
priority: PriorityEnum.High,
requiredMaterials: [],
requiredSkills: ["Torna Operatörü", "Mekanik"],
lastExecuted: new Date("2024-02-05"),
nextDue: new Date("2024-02-12"),
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-02-01"),
},
{
id: "MP002",
planCode: "PM-COMP-001",
workCenterId: "EQP002",
planType: MaintenancePlanTypeEnum.Preventive,
description: "Hava kompresörü aylık bakım ve kontrol planı",
frequency: 1,
frequencyUnit: FrequencyUnitEnum.Months,
estimatedDuration: 240,
priority: PriorityEnum.Urgent,
requiredMaterials: [],
requiredSkills: ["Kompresör Teknisyeni", "Elektrikçi"],
lastExecuted: new Date("2024-01-15"),
nextDue: new Date("2024-02-15"),
isActive: true,
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-25"),
},
{
id: "MP003",
planCode: "CM-CONV-001",
workCenterId: "EQP003",
planType: MaintenancePlanTypeEnum.Corrective,
description: "Konveyör sistemi arıza durumunda müdahale planı",
frequency: 0,
frequencyUnit: FrequencyUnitEnum.Days,
estimatedDuration: 180,
priority: PriorityEnum.High,
requiredMaterials: [],
requiredSkills: ["Mekanik", "Elektrikçi", "PLC Teknisyeni"],
nextDue: new Date("2024-02-10"),
isActive: false,
creationTime: new Date("2024-02-05"),
lastModificationTime: new Date("2024-02-06"),
},
{
id: "MP004",
planCode: "PM-WELD-001",
workCenterId: "EQP004",
planType: MaintenancePlanTypeEnum.Predictive,
description: "Robot kaynak sistemi 6 aylık periyodik bakımı",
frequency: 6,
frequencyUnit: FrequencyUnitEnum.Months,
estimatedDuration: 480,
priority: PriorityEnum.High,
requiredMaterials: [],
requiredSkills: ["Robot Teknisyeni", "Kaynak Uzmanı", "Elektrikçi"],
lastExecuted: new Date("2023-08-15"),
nextDue: new Date("2024-02-15"),
isActive: true,
creationTime: new Date("2023-08-01"),
lastModificationTime: new Date("2024-01-20"),
},
];

View file

@ -1,144 +0,0 @@
import { Team, TeamRoleEnum } from "../types/common";
import { mockEmployees } from "./mockEmployees";
export const mockMaintenanceTeams: Team[] = [
{
id: "1",
code: "MEC-001",
name: "Mekanik Bakım Ekibi",
description: "Genel mekanik bakım ve onarım işleri",
managerId: "1",
members: [
{
id: "TM001",
teamId: "1",
employeeId: "1",
employee: mockEmployees.find((emp) => emp.id === "1")!,
role: TeamRoleEnum.Lead,
joinDate: new Date("2023-01-15"),
isActive: true,
},
{
id: "TM002",
teamId: "1",
employeeId: "2",
employee: mockEmployees.find((emp) => emp.id === "2")!,
role: TeamRoleEnum.Member,
joinDate: new Date("2023-03-20"),
isActive: true,
},
{
id: "TM003",
teamId: "1",
employeeId: "3",
employee: mockEmployees.find((emp) => emp.id === "3")!,
role: TeamRoleEnum.Specialist,
joinDate: new Date("2023-02-10"),
isActive: true,
},
],
specializations: [
"Torna Tezgahı",
"Freze Makinesi",
"CNC Sistemleri",
"Hidrolik Sistemler",
],
isActive: true,
creationTime: new Date("2023-01-15"),
lastModificationTime: new Date("2024-01-20"),
},
{
id: "2",
code: "ELE-001",
name: "Elektrik Bakım Ekibi",
description: "Elektrik sistemleri ve otomasyon bakımı",
managerId: "4",
members: [
{
id: "TM004",
teamId: "2",
employeeId: "4",
employee: mockEmployees.find((emp) => emp.id === "4")!,
role: TeamRoleEnum.Lead,
joinDate: new Date("2023-01-20"),
isActive: true,
},
{
id: "TM005",
teamId: "2",
employeeId: "5",
employee: mockEmployees.find((emp) => emp.id === "5")!,
role: TeamRoleEnum.Member,
joinDate: new Date("2023-02-15"),
isActive: true,
},
],
specializations: [
"PLC Programlama",
"Motor Kontrolü",
"Pano Montajı",
"Sensör Sistemleri",
],
isActive: true,
creationTime: new Date("2023-01-20"),
lastModificationTime: new Date("2024-01-25"),
},
{
id: "3",
code: "WEL-001",
name: "Kaynak Ekibi",
description: "Kaynak ve metal işleri uzmanları",
managerId: "6",
members: [
{
id: "TM006",
teamId: "3",
employeeId: "6",
employee: mockEmployees.find((emp) => emp.id === "6")!,
role: TeamRoleEnum.Lead,
joinDate: new Date("2023-01-10"),
isActive: true,
},
{
id: "TM007",
teamId: "3",
employeeId: "7",
employee: mockEmployees.find((emp) => emp.id === "7")!,
role: TeamRoleEnum.Member,
joinDate: new Date("2023-04-05"),
isActive: true,
},
],
specializations: [
"Robot Kaynak",
"TIG Kaynak",
"MIG Kaynak",
"Argon Kaynak",
],
isActive: true,
creationTime: new Date("2023-01-10"),
lastModificationTime: new Date("2024-02-01"),
},
{
id: "4",
code: "GEN-001",
name: "Genel Bakım Ekibi",
description: "Genel bakım ve temizlik işleri",
managerId: "8",
members: [
{
id: "TM008",
teamId: "4",
employeeId: "8",
employee: mockEmployees.find((emp) => emp.id === "8")!,
role: TeamRoleEnum.Lead,
joinDate: new Date("2023-01-05"),
isActive: true,
},
],
specializations: ["Genel Temizlik", "Yağlama", "Basit Onarımlar"],
isActive: false,
creationTime: new Date("2023-01-05"),
lastModificationTime: new Date("2024-01-30"),
},
];

View file

@ -1,204 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
PmMaintenanceWorkOrder,
WorkOrderStatusEnum,
WorkOrderTypeEnum,
} from "../types/pm";
export const mockMaintenanceWorkOrders: PmMaintenanceWorkOrder[] = [
{
id: "1",
workOrderNumber: "WO-2024-045",
workCenterId: "1",
orderType: WorkOrderTypeEnum.Corrective,
priority: PriorityEnum.High,
status: WorkOrderStatusEnum.InProgress,
description: "CNC Torna Tezgahı Motor Titreşim Sorunu Giderilmesi",
reportedBy: "Operator Mustafa Koç",
assignedTo: "Mehmet Kaya",
scheduledStart: new Date("2024-02-08T10:00:00"),
scheduledEnd: new Date("2024-02-08T13:00:00"),
actualStart: new Date("2024-02-08T10:15:00"),
estimatedCost: 500,
actualCost: 350,
materials: [
{
id: "WOM001",
workOrderId: "WO001",
materialId: "MAT001",
materialCode: "BEARING-001",
materialName: "Rulman 6205",
plannedQuantity: 2,
actualQuantity: 2,
unitCost: 45.5,
totalCost: 91.0,
},
{
id: "WOM002",
workOrderId: "WO001",
materialId: "MAT002",
materialCode: "OIL-002",
materialName: "Motor Yağı",
plannedQuantity: 3,
actualQuantity: 2,
unitCost: 35.0,
totalCost: 70.0,
},
],
activities: [
{
id: "WOA001",
workOrderId: "WO001",
activityDescription: "Motor sökme ve inceleme",
plannedDuration: 60,
actualDuration: 45,
performedBy: "Mehmet Kaya",
completedAt: new Date("2024-02-08T11:00:00"),
notes: "Motor rulmanlarında aşınma tespit edildi",
},
{
id: "WOA002",
workOrderId: "WO001",
activityDescription: "Rulman değişimi",
plannedDuration: 90,
actualDuration: 75,
performedBy: "Mehmet Kaya",
notes: "Yeni rulmanlar takıldı ve yağlama yapıldı",
},
],
notes: "Motor titreşim sorunu rulman değişimi ile çözüldü.",
creationTime: new Date("2024-02-08T09:30:00"),
lastModificationTime: new Date("2024-02-08T12:00:00"),
},
{
id: "2",
workOrderNumber: "WO-2024-046",
workCenterId: "2",
planId: "MP002",
orderType: WorkOrderTypeEnum.Preventive,
priority: PriorityEnum.Normal,
status: WorkOrderStatusEnum.Planned,
description: "Hava Kompresörü Aylık Rutin Bakım",
reportedBy: "Sistem (Otomatik)",
assignedTo: "Ali Demir",
scheduledStart: new Date("2024-02-15T08:00:00"),
scheduledEnd: new Date("2024-02-15T12:00:00"),
estimatedCost: 200,
actualCost: 0,
materials: [
{
id: "WOM003",
workOrderId: "WO002",
materialId: "MAT003",
materialCode: "FILTER-001",
materialName: "Hava Filtresi",
plannedQuantity: 2,
actualQuantity: 0,
unitCost: 25.0,
totalCost: 50.0,
},
],
activities: [
{
id: "WOA003",
workOrderId: "WO002",
activityDescription: "Hava filtresi değişimi",
plannedDuration: 30,
actualDuration: 0,
performedBy: "Ali Demir",
},
{
id: "WOA004",
workOrderId: "WO002",
activityDescription: "Basınç kontrolü ve kalibrasyon",
plannedDuration: 60,
actualDuration: 0,
performedBy: "Ali Demir",
},
],
creationTime: new Date("2024-02-01T09:00:00"),
lastModificationTime: new Date("2024-02-01T09:00:00"),
},
{
id: "3",
workOrderNumber: "WO-2024-047",
workCenterId: "3",
orderType: WorkOrderTypeEnum.Emergency,
priority: PriorityEnum.Urgent,
status: WorkOrderStatusEnum.Completed,
description: "Konveyör Sistemi Acil Onarım - Üretim Durduruldu",
reportedBy: "Vardiya Amiri",
assignedTo: "Fatma Özkan",
scheduledStart: new Date("2024-02-06T14:00:00"),
scheduledEnd: new Date("2024-02-06T17:00:00"),
actualStart: new Date("2024-02-06T14:10:00"),
actualEnd: new Date("2024-02-06T16:45:00"),
estimatedCost: 800,
actualCost: 750,
materials: [
{
id: "WOM004",
workOrderId: "WO003",
materialId: "MAT004",
materialCode: "MOTOR-001",
materialName: "Konveyör Motoru 3kW",
plannedQuantity: 1,
actualQuantity: 1,
unitCost: 650.0,
totalCost: 650.0,
},
],
activities: [
{
id: "WOA005",
workOrderId: "WO003",
activityDescription: "Arızalı motor sökme",
plannedDuration: 45,
actualDuration: 40,
performedBy: "Fatma Özkan",
completedAt: new Date("2024-02-06T14:50:00"),
notes: "Motor sargıları yanmış",
},
{
id: "WOA006",
workOrderId: "WO003",
activityDescription: "Yeni motor montajı",
plannedDuration: 90,
actualDuration: 85,
performedBy: "Fatma Özkan",
completedAt: new Date("2024-02-06T16:15:00"),
notes: "Motor takıldı ve test edildi",
},
],
notes: "Acil onarım başarıyla tamamlandı. Üretim normale döndü.",
completionNotes:
"Motor arızası nedeniyle değişim yapıldı. Sistem test edildi ve normal çalışıyor.",
creationTime: new Date("2024-02-06T13:45:00"),
lastModificationTime: new Date("2024-02-06T16:45:00"),
},
{
id: "4",
workOrderNumber: "WO-2024-048",
workCenterId: "4",
orderType: WorkOrderTypeEnum.Calibration,
priority: PriorityEnum.Normal,
status: WorkOrderStatusEnum.Created,
description: "Robot Kaynak Makinesi Kalibrasyon",
reportedBy: "Kalite Kontrol",
estimatedCost: 300,
actualCost: 0,
materials: [],
activities: [
{
id: "WOA007",
workOrderId: "WO004",
activityDescription: "Robot pozisyon kalibrasyonu",
plannedDuration: 120,
actualDuration: 0,
performedBy: "Sema Korkmaz",
},
],
creationTime: new Date("2024-02-05T11:20:00"),
lastModificationTime: new Date("2024-02-05T11:20:00"),
},
];

View file

@ -1,68 +0,0 @@
import { MmMaterialGroup } from "../types/mm";
// Define your mock data
export const mockMaterialGroups: MmMaterialGroup[] = [
{
id: "1",
code: "METAL",
name: "Metal Malzemeler",
description: "Çelik, alüminyum gibi metal ürün grupları.",
isActive: true,
},
{
id: "2",
code: "MOTOR",
name: "Elektrik Motorları",
description: "AC, DC ve servo motor grupları.",
isActive: true,
},
{
id: "3",
code: "PLASTIK",
name: "Plastik Malzemeler",
isActive: true,
},
{
id: "4",
code: "KIMYA",
name: "Kimyasal Maddeler",
description: "Yağlar, solventler ve diğer kimyasallar.",
isActive: true,
},
{
id: "5",
code: "YARI-MAMUL",
name: "Yarı Mamuller",
parentGroupId: "1",
isActive: false,
},
{
id: "6",
code: "MAMUL",
name: "Mamuller",
parentGroupId: "1",
isActive: false,
},
];
// Function to populate the parentGroup field
export function populateParentGroups(groups: MmMaterialGroup[]): MmMaterialGroup[] {
const groupMap = new Map<string, MmMaterialGroup>();
// First, map each group by their id for quick lookup
groups.forEach((group) => {
groupMap.set(group.id, group);
});
// Then, for each group, set the parentGroup if it has a parentGroupId
groups.forEach((group) => {
if (group.parentGroupId) {
group.parentGroup = groupMap.get(group.parentGroupId);
}
});
return groups;
}
// Now you can use the function to populate parentGroup
populateParentGroups(mockMaterialGroups);

View file

@ -1,52 +0,0 @@
import { MmMaterialType, MaterialTypeEnum } from "../types/mm";
export const mockMaterialTypes: MmMaterialType[] = [
{
id: "1",
code: MaterialTypeEnum.RawMaterial,
name: "Hammadde",
description: "Üretimde kullanılan temel malzemeler",
isActive: true,
className: "bg-blue-100 text-blue-800",
},
{
id: "2",
code: MaterialTypeEnum.SemiFinished,
name: "Yarı Mamul",
description: "Kısmen işlenmiş ürünler",
isActive: true,
className: "bg-yellow-100 text-yellow-800",
},
{
id: "3",
code: MaterialTypeEnum.Finished,
name: "Mamul",
description: "Satışa hazır nihai ürünler",
isActive: true,
className: "bg-green-100 text-green-800",
},
{
id: "4",
code: MaterialTypeEnum.Consumable,
name: "Sarf Malzemesi",
description: "Tüketilen yardımcı malzemeler",
isActive: true,
className: "bg-gray-100 text-gray-800",
},
{
id: "5",
code: MaterialTypeEnum.Service,
name: "Hizmet",
description: "Hizmet türü kalemler",
isActive: true,
className: "bg-purple-100 text-purple-800",
},
{
id: "6",
code: MaterialTypeEnum.Spare,
name: "Yedek Parça",
description: "Bakım ve onarım parçaları",
isActive: true,
className: "bg-orange-100 text-orange-800",
},
];

View file

@ -1,429 +0,0 @@
import { MmMaterial } from "../types/mm";
import { mockBusinessParties } from "./mockBusinessParties";
import { mockLocations } from "./mockLocations";
import { mockMaterialGroups } from "./mockMaterialGroups";
import { mockMaterialTypes } from "./mockMaterialTypes";
import { mockUnits } from "./mockUnits";
import { mockWarehouses } from "./mockWarehouses";
import { mockZones } from "./mockZones";
export const mockMaterials: MmMaterial[] = [
{
id: "1",
code: "MT001",
name: "Yüksek Kaliteli Çelik Levha 10mm",
description: "Çelik Levha 2mm",
baseUnitId: "KG",
baseUnit: mockUnits.find((u) => u.id === "KG"),
costPrice: 15.5,
salesPrice: 18.75,
currency: "TRY",
isActive: true,
totalStock: 2500.0,
materialTypeId: "1",
materialType: mockMaterialTypes.find((mt) => mt.id === "1"),
materialGroupId: "1",
materialGroup: mockMaterialGroups.find((mg) => mg.id === "1"),
barcode: "1234567890123",
trackingType: "Quantity",
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-20"),
alternativeUnits: [
{
id: "1",
materialId: "1",
unitId: "KOLI",
unit: mockUnits.find((u) => u.id === "KOLI"),
conversionFactor: 1,
isDefault: true,
},
{
id: "1",
materialId: "1",
unitId: "PAKET",
unit: mockUnits.find((u) => u.id === "PAKET"),
conversionFactor: 1,
isDefault: false,
},
],
stockLevels: [
{
id: "1",
materialId: "1",
warehouseId: "1",
warehouse: mockWarehouses.find((w) => w.id === "1"),
zoneId: "2",
zone: mockZones.find((z) => z.id === "2"),
locationId: "1",
location: mockLocations.find((l) => l.id === "1"),
availableQuantity: 1250,
reservedQuantity: 200,
inTransitQuantity: 500,
minimumStock: 100,
maximumStock: 2000,
reorderPoint: 300,
lastUpdated: new Date(),
},
],
specifications: [
{
id: "1",
materialId: "1",
specificationName: "Kalınlık",
specificationValue: "2",
unitId: "mm",
isRequired: true,
},
{
id: "2",
materialId: "1",
specificationName: "Genişlik",
specificationValue: "1000",
unitId: "mm",
isRequired: true,
},
{
id: "3",
materialId: "1",
specificationName: "Uzunluk",
specificationValue: "2000",
unitId: "mm",
isRequired: true,
},
],
suppliers: [
{
id: "1",
materialId: "1",
supplierId: "1",
supplier: mockBusinessParties.find((bp) => bp.id === "1"),
supplierMaterialCode: "S-MAT-001",
leadTime: 7,
minimumOrderQuantity: 100,
price: 24.0,
currency: "TRY",
isPreferred: true,
},
],
},
{
id: "2",
code: "MT002",
name: "Alüminyum Profil 40x40",
description: "Alüminyum Profil 40x40",
materialTypeId: "2",
materialType: mockMaterialTypes.find((mt) => mt.id === "2"),
baseUnitId: "MT",
baseUnit: mockUnits.find((u) => u.id === "MT"),
costPrice: 45.0,
salesPrice: 55.0,
currency: "TRY",
isActive: true,
totalStock: 1200.0,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-20"),
materialGroupId: "1",
materialGroup: mockMaterialGroups.find((mg) => mg.id === "1"),
trackingType: "Lot",
barcode: "1234567890124",
stockLevels: [
{
id: "2",
materialId: "2",
warehouseId: "1",
warehouse: mockWarehouses.find((w) => w.id === "1"),
zoneId: "2",
zone: mockZones.find((z) => z.id === "2"),
locationId: "2",
location: mockLocations.find((l) => l.id === "2"),
availableQuantity: 800,
reservedQuantity: 150,
inTransitQuantity: 200,
minimumStock: 50,
maximumStock: 1500,
reorderPoint: 200,
lastUpdated: new Date(),
},
],
specifications: [
{
id: "4",
materialId: "2",
specificationName: "Genişlik",
specificationValue: "40",
unitId: "mm",
isRequired: true,
},
{
id: "5",
materialId: "2",
specificationName: "Yükseklik",
specificationValue: "40",
unitId: "mm",
isRequired: true,
},
{
id: "6",
materialId: "2",
specificationName: "Alaşım",
specificationValue: "6061",
unitId: "",
isRequired: true,
},
],
suppliers: [
{
id: "2",
materialId: "2",
supplierId: "2",
supplier: mockBusinessParties.find((bp) => bp.id === "2"),
supplierMaterialCode: "S-ALU-002",
leadTime: 10,
minimumOrderQuantity: 50,
price: 42.0,
currency: "TRY",
isPreferred: true,
},
],
},
{
id: "3",
code: "PR001",
name: "Montajlı Motor Grubu A-Type",
description: "Motor Grubu A-Type",
materialTypeId: "1",
materialType: mockMaterialTypes.find((mt) => mt.id === "1"),
baseUnitId: "AD",
baseUnit: mockUnits.find((u) => u.id === "AD"),
costPrice: 850.0,
salesPrice: 1200.0,
currency: "TRY",
isActive: true,
totalStock: 45.0,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-20"),
materialGroupId: "2",
materialGroup: mockMaterialGroups.find((mg) => mg.id === "2"),
trackingType: "Lot",
barcode: "1234567890125",
stockLevels: [
{
id: "3",
materialId: "3",
warehouseId: "1",
warehouse: mockWarehouses.find((w) => w.id === "1"),
zoneId: "1",
zone: mockZones.find((z) => z.id === "1"),
locationId: "3",
location: mockLocations.find((l) => l.id === "3"),
availableQuantity: 30,
reservedQuantity: 10,
inTransitQuantity: 5,
minimumStock: 5,
maximumStock: 100,
reorderPoint: 15,
lastUpdated: new Date(),
},
],
specifications: [
{
id: "7",
materialId: "3",
specificationName: "Güç",
specificationValue: "5.5",
unitId: "kW",
isRequired: true,
},
{
id: "8",
materialId: "3",
specificationName: "Devir",
specificationValue: "1450",
unitId: "rpm",
isRequired: true,
},
{
id: "9",
materialId: "3",
specificationName: "Voltaj",
specificationValue: "380",
unitId: "V",
isRequired: true,
},
],
suppliers: [
{
id: "3",
materialId: "3",
supplierId: "3",
supplier: mockBusinessParties.find((bp) => bp.id === "3"),
supplierMaterialCode: "S-MOT-003",
leadTime: 21,
minimumOrderQuantity: 1,
price: 800.0,
currency: "TRY",
isPreferred: true,
},
],
},
{
id: "4",
code: "SF001",
name: "Kesme Yağı Premium",
description: "Kesme Yağı Premium",
materialTypeId: "1",
materialType: mockMaterialTypes.find((mt) => mt.id === "1"),
baseUnitId: "LT",
baseUnit: mockUnits.find((u) => u.id === "LT"),
costPrice: 25.0,
salesPrice: 35.0,
currency: "TRY",
isActive: true,
totalStock: 150.0,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-20"),
materialGroupId: "4",
materialGroup: mockMaterialGroups.find((mg) => mg.id === "4"),
trackingType: "Quantity",
barcode: "1234567890126",
stockLevels: [
{
id: "4",
materialId: "4",
warehouseId: "2",
warehouse: mockWarehouses.find((w) => w.id === "2"),
zoneId: "1",
zone: mockZones.find((z) => z.id === "1"),
locationId: "4",
location: mockLocations.find((l) => l.id === "4"),
availableQuantity: 120,
reservedQuantity: 20,
inTransitQuantity: 10,
minimumStock: 25,
maximumStock: 300,
reorderPoint: 50,
lastUpdated: new Date(),
},
],
specifications: [
{
id: "10",
materialId: "4",
specificationName: "Viskozite",
specificationValue: "32",
unitId: "cSt",
isRequired: true,
},
{
id: "11",
materialId: "4",
specificationName: "Yoğunluk",
specificationValue: "0.85",
unitId: "g/cm³",
isRequired: true,
},
{
id: "12",
materialId: "4",
specificationName: "Parlama Noktası",
specificationValue: "210",
unitId: "°C",
isRequired: true,
},
],
suppliers: [
{
id: "4",
materialId: "4",
supplierId: "3",
supplier: mockBusinessParties.find((bp) => bp.id === "3"),
supplierMaterialCode: "S-OIL-004",
leadTime: 5,
minimumOrderQuantity: 20,
price: 22.0,
currency: "TRY",
isPreferred: true,
},
],
},
{
id: "5",
code: "PK001",
name: "Plastik Kapak Komponenti",
description: "Plastik Kapak",
materialTypeId: "1",
materialType: mockMaterialTypes.find((mt) => mt.id === "1"),
materialGroupId: "5",
materialGroup: mockMaterialGroups.find((mg) => mg.id === "5"),
baseUnitId: "AD",
baseUnit: mockUnits.find((u) => u.id === "AD"),
costPrice: 8.5,
salesPrice: 15.0,
currency: "TRY",
isActive: true,
totalStock: 850.0,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-20"),
trackingType: "Serial",
barcode: "1234567890127",
stockLevels: [
{
id: "5",
materialId: "5",
warehouseId: "2",
warehouse: mockWarehouses.find((w) => w.id === "2"),
zoneId: "3",
zone: mockZones.find((z) => z.id === "3"),
locationId: "4",
location: mockLocations.find((l) => l.id === "4"),
availableQuantity: 750,
reservedQuantity: 50,
inTransitQuantity: 50,
minimumStock: 100,
maximumStock: 1000,
reorderPoint: 200,
lastUpdated: new Date(),
},
],
specifications: [
{
id: "13",
materialId: "5",
specificationName: "Malzeme",
specificationValue: "PP Polypropylene",
unitId: "",
isRequired: true,
},
{
id: "14",
materialId: "5",
specificationName: "Ağırlık",
specificationValue: "5.2",
unitId: "kg",
isRequired: true,
},
{
id: "15",
materialId: "5",
specificationName: "Boyut",
specificationValue: "300x200x50",
unitId: "mm",
isRequired: true,
},
],
suppliers: [
{
id: "5",
materialId: "5",
supplierId: "2",
supplier: mockBusinessParties.find((bp) => bp.id === "2"),
supplierMaterialCode: "S-SEM-005",
leadTime: 14,
minimumOrderQuantity: 5,
price: 110.0,
currency: "TRY",
isPreferred: true,
},
],
},
];

View file

@ -1,79 +0,0 @@
import { OperationCategoryEnum, MrpOperationTypeDefinition } from "../types/mrp";
export const mockOperationTypes: MrpOperationTypeDefinition[] = [
{
id: "1",
code: "CUT001",
name: "Kesme İşlemi",
description: "Malzeme kesme operasyonu",
category: OperationCategoryEnum.Production,
defaultDuration: 30,
requiresSetup: true,
allowsParallelOperation: false,
qualityCheckRequired: true,
skillLevelRequired: 3,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "2",
code: "WELD001",
name: "Kaynak İşlemi",
description: "Metal kaynak operasyonu",
category: OperationCategoryEnum.Maintenance,
defaultDuration: 45,
requiresSetup: true,
allowsParallelOperation: false,
qualityCheckRequired: true,
skillLevelRequired: 4,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "3",
code: "ASSY001",
name: "Montaj İşlemi",
description: "Parça montaj operasyonu",
category: OperationCategoryEnum.Production,
defaultDuration: 20,
requiresSetup: false,
allowsParallelOperation: true,
qualityCheckRequired: false,
skillLevelRequired: 2,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "4",
code: "QC001",
name: "Kalite Kontrolü",
description: "Ürün kalite kontrol işlemi",
category: OperationCategoryEnum.Quality,
defaultDuration: 15,
requiresSetup: false,
allowsParallelOperation: false,
qualityCheckRequired: true,
skillLevelRequired: 3,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "5",
code: "PACK001",
name: "Paketleme",
description: "Ürün paketleme işlemi",
category: OperationCategoryEnum.Setup,
defaultDuration: 10,
requiresSetup: false,
allowsParallelOperation: true,
qualityCheckRequired: false,
skillLevelRequired: 1,
isActive: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
];

View file

@ -1,106 +0,0 @@
import { MrpOperation } from "../types/mrp";
import { mockWorkCenters } from "./mockWorkCenters";
import { mockOperationTypes } from "./mockOperationTypes";
export const mockOperations: MrpOperation[] = [
{
id: "1",
code: "OP001",
name: "CNC Torna Tezgahı İşlemi",
description: "Metal parçaların CNC torna tezgahında işlenmesi",
operationTypeId: "1",
operationType: mockOperationTypes.find((ot) => ot.code === "1"),
workCenterId: "1",
workCenter: mockWorkCenters.find((wc) => wc.id === "1"),
standardTime: 45,
setupTime: 30,
laborCost: 50,
machineCost: 100,
overheadCost: 25,
isActive: true,
instructions: "Torna tezgahında hassas işleme yapılacak",
qualityCheckRequired: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "2",
code: "OP002",
name: "Kaynak İşlemi",
description: "Argon kaynak ile metal birleştirme",
operationTypeId: "2",
operationType: mockOperationTypes.find((ot) => ot.code === "2"),
workCenterId: "2",
workCenter: mockWorkCenters.find((wc) => wc.id === "2"),
standardTime: 60,
setupTime: 15,
laborCost: 80,
machineCost: 40,
overheadCost: 20,
isActive: true,
instructions: "Argon gazı ile koruyucu atmosferde kaynak yapılacak",
qualityCheckRequired: true,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "3",
code: "OP003",
name: "Kalite Kontrolü",
description: "Boyutsal ve görsel kalite kontrolü",
operationTypeId: "3",
operationType: mockOperationTypes.find((ot) => ot.code === "3"),
workCenterId: "3",
workCenter: mockWorkCenters.find((wc) => wc.id === "3"),
standardTime: 20,
setupTime: 5,
laborCost: 60,
machineCost: 20,
overheadCost: 10,
isActive: true,
instructions: "Teknik çizimlere göre boyutsal kontrol yapılacak",
qualityCheckRequired: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "4",
code: "OP004",
name: "Paketleme İşlemi",
description: "Ürünlerin paketlenmesi",
operationTypeId: "4",
operationType: mockOperationTypes.find((ot) => ot.code === "4"),
workCenterId: "4",
workCenter: mockWorkCenters.find((wc) => wc.id === "4"),
standardTime: 20,
setupTime: 5,
laborCost: 60,
machineCost: 20,
overheadCost: 10,
isActive: true,
instructions: "Teknik çizimlere göre boyutsal kontrol yapılacak",
qualityCheckRequired: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "5",
code: "OP005",
name: "Bakım İşlemi",
description: "Preventif bakım işlemleri",
operationTypeId: "5",
operationType: mockOperationTypes.find((ot) => ot.code === "5"),
workCenterId: "3",
workCenter: mockWorkCenters.find((wc) => wc.id === "3"),
standardTime: 120,
setupTime: 20,
laborCost: 70,
machineCost: 30,
overheadCost: 20,
isActive: true,
instructions: "Periyodik bakım planına göre işlem yapılacak",
qualityCheckRequired: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
];

View file

@ -1,54 +0,0 @@
import {
LeadSourceEnum,
CrmOpportunity,
OpportunityStageEnum,
OpportunityStatusEnum,
} from "../types/crm";
import { mockBusinessParties } from "./mockBusinessParties";
import { mockEmployees } from "./mockEmployees";
import { mockLossReasons } from "./mockLossReasons";
export const mockOpportunities: CrmOpportunity[] = [
{
id: "opp1",
opportunityNumber: "OPP-2024-001",
title: "ABC Şirketi Yazılım Projesi",
customerId: "5",
customer: mockBusinessParties.find((c) => c.id === "5"),
stage: OpportunityStageEnum.ClosedLost,
probability: 0,
estimatedValue: 150000,
currency: "TRY",
expectedCloseDate: new Date("2024-03-15"),
assignedTo: "1",
assigned: mockEmployees.find((e) => e.id === "1"),
leadSource: LeadSourceEnum.Website,
status: OpportunityStatusEnum.Lost,
lostReason: mockLossReasons[0],
activities: [],
competitors: [],
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-03-15"),
},
{
id: "opp2",
opportunityNumber: "OPP-2024-002",
title: "XYZ Kurumu Erp Sistemi",
customerId: "6",
customer: mockBusinessParties.find((c) => c.id === "6"),
stage: OpportunityStageEnum.ClosedLost,
probability: 0,
estimatedValue: 300000,
currency: "TRY",
expectedCloseDate: new Date("2024-04-20"),
assignedTo: "2",
assigned: mockEmployees.find((e) => e.id === "2"),
leadSource: LeadSourceEnum.Referral,
status: OpportunityStatusEnum.Lost,
lostReason: mockLossReasons[1],
activities: [],
competitors: [],
creationTime: new Date("2024-02-05"),
lastModificationTime: new Date("2024-04-20"),
},
];

View file

@ -1,95 +0,0 @@
import { HrPayroll, PayrollStatusEnum } from "../types/hr";
import { mockEmployees } from "./mockEmployees";
export const mockPayrolls: HrPayroll[] = [
{
id: "1",
employeeId: "1",
employee: mockEmployees.find((emp) => emp.id === "1"),
period: "2023-01",
baseSalary: 3000,
allowances: [],
deductions: [],
overtime: 0,
bonus: 0,
grossSalary: 0,
netSalary: 0,
tax: 0,
socialSecurity: 0,
status: PayrollStatusEnum.Cancelled,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "2",
employeeId: "2",
employee: mockEmployees.find((emp) => emp.id === "2"),
period: "2023-01",
baseSalary: 3200,
allowances: [],
deductions: [],
overtime: 0,
bonus: 0,
grossSalary: 0,
netSalary: 0,
tax: 0,
socialSecurity: 0,
status: PayrollStatusEnum.Paid,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "3",
employeeId: "3",
employee: mockEmployees.find((emp) => emp.id === "3"),
period: "2023-01",
baseSalary: 2800,
allowances: [],
deductions: [],
overtime: 0,
bonus: 0,
grossSalary: 0,
netSalary: 0,
tax: 0,
socialSecurity: 0,
status: PayrollStatusEnum.Approved,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "4",
employeeId: "4",
employee: mockEmployees.find((emp) => emp.id === "4"),
period: "2023-01",
baseSalary: 3500,
allowances: [],
deductions: [],
overtime: 0,
bonus: 0,
grossSalary: 0,
netSalary: 0,
tax: 0,
socialSecurity: 0,
status: PayrollStatusEnum.Calculated,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "5",
employeeId: "4",
employee: mockEmployees.find((emp) => emp.id === "4"),
period: "2023-01",
baseSalary: 4000,
allowances: [],
deductions: [],
overtime: 0,
bonus: 0,
grossSalary: 0,
netSalary: 0,
tax: 0,
socialSecurity: 0,
status: PayrollStatusEnum.Draft,
creationTime: new Date(),
lastModificationTime: new Date(),
},
];

View file

@ -1,84 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
MrpProductionOrder,
ProductionOrderStatusEnum,
ProductionOrderTypeEnum,
} from "../types/mrp";
import { mockMaterials } from "./mockMaterials";
import { mockSalesOrders } from "./mockSalesOrders";
export const mockProductionOrders: MrpProductionOrder[] = [
{
id: "1",
orderNumber: "PO-2024-001",
orderType: ProductionOrderTypeEnum.Standard,
plannedStartDate: new Date("2024-01-15"),
plannedEndDate: new Date("2024-01-30"),
actualStartDate: new Date("2024-01-16"),
status: ProductionOrderStatusEnum.InProgress,
priority: PriorityEnum.High,
plannedQuantity: 100,
confirmedQuantity: 65,
requiredQuantity: 100,
scrapQuantity: 2,
unitId: "ADET",
plannedCost: 125000,
actualCost: 82000,
currency: "TRY",
materials: [
{
id: "1",
productionOrderId: "1",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2")!,
salesOrderId: "1",
salesOrder: mockSalesOrders.find((so) => so.id === "1"),
customerRequirement: "Acil teslimat gerekli",
plannedQuantity: 100,
confirmedQuantity: 65,
requiredQuantity: 100,
scrapQuantity: 2,
unitId: "ADET",
},
],
workOrders: [],
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-20"),
},
{
id: "2",
orderNumber: "PO-2024-002",
orderType: ProductionOrderTypeEnum.Standard,
plannedStartDate: new Date("2024-02-01"),
plannedEndDate: new Date("2024-02-15"),
status: ProductionOrderStatusEnum.Created,
priority: PriorityEnum.Normal,
plannedQuantity: 50,
confirmedQuantity: 0,
requiredQuantity: 50,
scrapQuantity: 1,
unitId: "ADET",
plannedCost: 75000,
actualCost: 0,
currency: "TRY",
materials: [
{
id: "1",
productionOrderId: "1",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3")!,
salesOrderId: "1",
salesOrder: mockSalesOrders.find((so) => so.id === "1"),
customerRequirement: "Acil teslimat gerekli",
plannedQuantity: 50,
confirmedQuantity: 0,
requiredQuantity: 0,
scrapQuantity: 2,
unitId: "ADET",
},
],
workOrders: [],
creationTime: new Date("2024-01-25"),
lastModificationTime: new Date("2024-01-25"),
},
];

View file

@ -1,80 +0,0 @@
import { ProjectCostTrackingStatus, PsProjectCostTracking } from '../types/ps'
export const mockProjectCostTracking: PsProjectCostTracking[] = [
{
id: '1',
projectId: '1',
projectName: 'Erp Sistemi Geliştirme',
projectCode: 'PRJ-2024-001',
plannedBudget: 500000,
actualCost: 325000,
remainingBudget: 175000,
plannedStartDate: new Date('2024-01-15'),
plannedEndDate: new Date('2024-12-31'),
actualStartDate: new Date('2024-01-20'),
actualEndDate: undefined,
plannedDuration: 351,
actualDuration: 300,
progress: 65,
status: ProjectCostTrackingStatus.OnTrack,
currency: 'TRY',
lastUpdated: new Date('2024-11-25'),
},
{
id: '2',
projectId: '2',
projectName: 'Mobil Uygulama Geliştirme',
projectCode: 'PRJ-2024-002',
plannedBudget: 250000,
actualCost: 200000,
remainingBudget: 50000,
plannedStartDate: new Date('2024-03-01'),
plannedEndDate: new Date('2024-08-31'),
actualStartDate: new Date('2024-03-15'),
actualEndDate: undefined,
plannedDuration: 184,
actualDuration: 200,
progress: 80,
status: ProjectCostTrackingStatus.AtRisk,
currency: 'TRY',
lastUpdated: new Date('2024-11-20'),
},
{
id: '3',
projectId: '3',
projectName: 'Web Sitesi Yenileme',
projectCode: 'PRJ-2024-003',
plannedBudget: 150000,
actualCost: 180000,
remainingBudget: -30000,
plannedStartDate: new Date('2024-02-01'),
plannedEndDate: new Date('2024-06-30'),
actualStartDate: new Date('2024-02-10'),
actualEndDate: new Date('2024-07-15'),
plannedDuration: 150,
actualDuration: 156,
progress: 100,
status: ProjectCostTrackingStatus.Completed,
currency: 'TRY',
lastUpdated: new Date('2024-07-15'),
},
{
id: '4',
projectId: '4',
projectName: 'Veri Analizi Platformu',
projectCode: 'PRJ-2024-004',
plannedBudget: 400000,
actualCost: 120000,
remainingBudget: 280000,
plannedStartDate: new Date('2024-06-01'),
plannedEndDate: new Date('2024-12-31'),
actualStartDate: new Date('2024-06-15'),
actualEndDate: undefined,
plannedDuration: 214,
actualDuration: 163,
progress: 30,
status: ProjectCostTrackingStatus.Delayed,
currency: 'TRY',
lastUpdated: new Date('2024-11-22'),
},
]

View file

@ -1,164 +0,0 @@
import { PhaseCategoryEnum, PhaseStatusEnum, PsProjectPhase } from '../types/ps'
import { mockMaintenanceTeams } from './mockMaintenanceTeams'
import { mockProjects } from './mockProjects'
export const mockProjectPhases: PsProjectPhase[] = [
{
id: '1',
code: 'PH-001',
name: 'Analiz ve Tasarım',
description: 'Sistem analizi ve tasarım dokümantasyonu hazırlanması',
projectId: '1',
project: mockProjects.find((p) => p.id === '1')!,
status: PhaseStatusEnum.Completed,
startDate: new Date('2024-01-15'),
endDate: new Date('2024-02-28'),
actualStartDate: new Date('2024-01-15'),
actualEndDate: new Date('2024-02-25'),
budget: 150000,
actualCost: 145000,
progress: 100,
milestones: 4,
completedMilestones: 4,
assignedTeams: [
mockMaintenanceTeams.find((t) => t.id === '1')!.name,
mockMaintenanceTeams.find((t) => t.id === '2')!.name,
],
deliverables: ['Sistem Analiz Raporu', 'Teknik Tasarım Dokümanı', 'UI/UX Tasarımları'],
risks: ['Gereksinim değişiklikleri'],
category: PhaseCategoryEnum.Planning,
sequence: 0,
tasks: [],
isActive: false,
},
{
id: '2',
code: 'PH-002',
name: 'Geliştirme - Faz 1',
description: 'Backend altyapısı ve temel modüllerin geliştirilmesi',
projectId: '1',
project: mockProjects.find((p) => p.id === '1')!,
status: PhaseStatusEnum.Cancelled,
startDate: new Date('2024-03-01'),
endDate: new Date('2024-05-15'),
actualStartDate: new Date('2024-03-01'),
actualEndDate: new Date('2024-05-10'),
budget: 400000,
actualCost: 280000,
progress: 70,
milestones: 6,
completedMilestones: 4,
assignedTeams: [
mockMaintenanceTeams.find((t) => t.id === '1')!.name,
mockMaintenanceTeams.find((t) => t.id === '2')!.name,
],
deliverables: ['API Framework', 'Veritabanı Şeması', 'Güvenlik Modülü'],
risks: ['Performans sorunları', 'Üçüncü parti entegrasyon gecikmeleri'],
category: PhaseCategoryEnum.Development,
sequence: 0,
tasks: [],
isActive: false,
},
{
id: '3',
code: 'PH-003',
name: 'Geliştirme - Faz 2',
description: 'Frontend geliştirme ve kullanıcı arayüzleri',
projectId: '1',
project: mockProjects.find((p) => p.id === '1')!,
status: PhaseStatusEnum.NotStarted,
startDate: new Date('2024-04-15'),
endDate: new Date('2024-07-30'),
budget: 350000,
actualCost: 0,
progress: 0,
milestones: 5,
completedMilestones: 0,
assignedTeams: [
mockMaintenanceTeams.find((t) => t.id === '1')!.name,
mockMaintenanceTeams.find((t) => t.id === '2')!.name,
],
deliverables: ['React Bileşenleri', 'Responsive Tasarım', 'Mobil Uyumluluk'],
risks: ['Tarayıcı uyumluluk sorunları', 'Performans optimizasyonu'],
category: PhaseCategoryEnum.Development,
sequence: 0,
tasks: [],
isActive: false,
},
{
id: '4',
code: 'PH-004',
name: 'Test ve Kalite Güvence',
description: 'Kapsamlı test süreçleri ve kalite kontrolleri',
projectId: '2',
project: mockProjects.find((p) => p.id === '2')!,
status: PhaseStatusEnum.NotStarted,
startDate: new Date('2024-07-01'),
endDate: new Date('2024-09-15'),
budget: 120000,
actualCost: 0,
progress: 0,
milestones: 3,
completedMilestones: 0,
assignedTeams: [
mockMaintenanceTeams.find((t) => t.id === '3')!.name,
mockMaintenanceTeams.find((t) => t.id === '4')!.name,
],
deliverables: ['Test Senaryoları', 'Otomatik Test Süitleri', 'Kalite Raporu'],
risks: ['Kritik hataların geç tespit edilmesi'],
category: PhaseCategoryEnum.Testing,
sequence: 0,
tasks: [],
isActive: false,
},
{
id: '5',
code: 'PH-005',
name: 'Deployment ve Go-Live',
description: 'Üretime alma ve kullanıcı eğitimleri',
projectId: '2',
project: mockProjects.find((p) => p.id === '2')!,
status: PhaseStatusEnum.NotStarted,
startDate: new Date('2024-09-15'),
endDate: new Date('2024-10-31'),
budget: 80000,
actualCost: 0,
progress: 0,
milestones: 2,
completedMilestones: 0,
assignedTeams: [
mockMaintenanceTeams.find((t) => t.id === '2')!.name,
mockMaintenanceTeams.find((t) => t.id === '4')!.name,
],
deliverables: ['Prodüksiyon Ortamı', 'Kullanıcı Eğitimleri', 'Dokümentasyon'],
risks: ['Sistem kesintileri', 'Kullanıcı adaptasyon sorunları'],
category: PhaseCategoryEnum.Deployment,
sequence: 0,
tasks: [],
isActive: false,
},
{
id: '6',
code: 'PH-006',
name: 'Mobil UI Tasarımı',
description: 'Mobil uygulama kullanıcı arayüzü tasarımı',
projectId: '2',
project: mockProjects.find((p) => p.id === '2')!,
status: PhaseStatusEnum.OnHold,
startDate: new Date('2024-03-01'),
endDate: new Date('2024-04-15'),
actualStartDate: new Date('2024-03-05'),
budget: 75000,
actualCost: 25000,
progress: 35,
milestones: 3,
completedMilestones: 1,
assignedTeams: [mockMaintenanceTeams.find((t) => t.id === '1')!.name],
deliverables: ["Wireframe'ler", 'Mobil Tasarım Kılavuzu', 'Prototype'],
risks: ['Platformlar arası tutarlılık sorunları'],
category: PhaseCategoryEnum.Design,
sequence: 0,
tasks: [],
isActive: false,
},
]

View file

@ -1,158 +0,0 @@
import {
PsTaskDailyUpdate,
WorkTypeEnum,
DailyUpdateStatusEnum,
} from "../types/ps";
import { mockEmployees } from "./mockEmployees";
import { mockProjectTasks } from "./mockProjectTasks";
export const mockProjectTaskDailyUpdates: PsTaskDailyUpdate[] = [
{
id: "1",
taskId: "1",
task: mockProjectTasks.find((t) => t.id === "1"),
employeeId: "1",
employee: mockEmployees.find((e) => e.id === "1"),
date: new Date("2024-12-05"),
hoursWorked: 6,
description:
"Backend API geliştirme işleri tamamlandı. User authentication servisleri oluşturuldu.",
workType: WorkTypeEnum.Development,
progress: 75,
challenges: "OAuth2 entegrasyonunda bazı sorunlar yaşandı",
nextSteps: "Token yenileme mekanizması geliştirilecek",
status: DailyUpdateStatusEnum.Submitted,
attachments: [],
creationTime: new Date("2024-12-05T17:30:00"),
lastModificationTime: new Date("2024-12-05T17:30:00"),
},
{
id: "2",
taskId: "1",
task: mockProjectTasks.find((t) => t.id === "1"),
employeeId: "1",
employee: mockEmployees.find((e) => e.id === "1"),
date: new Date("2024-12-04"),
hoursWorked: 7,
description: "Database şema tasarımı ve migration scriptleri hazırlandı.",
workType: WorkTypeEnum.Development,
progress: 60,
challenges: "Performans optimizasyonu için index stratejileri belirlendi",
nextSteps: "API endpoint'leri geliştirilmeye başlanacak",
status: DailyUpdateStatusEnum.Approved,
attachments: [],
creationTime: new Date("2024-12-04T18:00:00"),
lastModificationTime: new Date("2024-12-04T18:00:00"),
},
{
id: "3",
taskId: "2",
task: mockProjectTasks.find((t) => t.id === "2"),
employeeId: "2",
employee: mockEmployees.find((e) => e.id === "2"),
date: new Date("2024-12-05"),
hoursWorked: 4,
description: "API dokümantasyonu için swagger entegrasyonu yapıldı.",
workType: WorkTypeEnum.Documentation,
progress: 40,
challenges: "Mevcut API endpoint'lerinin belirlenmesi zaman aldı",
nextSteps: "Detaylı endpoint dokümantasyonu yazılacak",
status: DailyUpdateStatusEnum.Draft,
attachments: [],
creationTime: new Date("2024-12-05T16:45:00"),
lastModificationTime: new Date("2024-12-05T16:45:00"),
},
{
id: "4",
taskId: "3",
task: mockProjectTasks.find((t) => t.id === "3"),
employeeId: "3",
employee: mockEmployees.find((e) => e.id === "3"),
date: new Date("2024-12-05"),
hoursWorked: 5.5,
description:
"Frontend arayüz tasarımında kullanıcı deneyimi optimizasyonu yapıldı.",
workType: WorkTypeEnum.Design,
progress: 65,
challenges: "Responsive tasarım gereksinimlerinin belirlenmesi",
nextSteps: "Mobile uyumlu tasarım geliştirilecek",
status: DailyUpdateStatusEnum.Submitted,
attachments: [],
creationTime: new Date("2024-12-05T17:00:00"),
lastModificationTime: new Date("2024-12-05T17:00:00"),
},
{
id: "5",
taskId: "4",
task: mockProjectTasks.find((t) => t.id === "4"),
employeeId: "4",
employee: mockEmployees.find((e) => e.id === "4"),
date: new Date("2024-12-05"),
hoursWorked: 3,
description:
"Unit test scenarioları oluşturuldu ve test coverage analizi yapıldı.",
workType: WorkTypeEnum.Testing,
progress: 30,
challenges: "Complex business logic için test senaryoları karmaşık",
nextSteps: "Integration testlere başlanacak",
status: DailyUpdateStatusEnum.Draft,
attachments: [],
creationTime: new Date("2024-12-05T15:20:00"),
lastModificationTime: new Date("2024-12-05T15:20:00"),
},
{
id: "6",
taskId: "1",
task: mockProjectTasks.find((t) => t.id === "1"),
employeeId: "1",
employee: mockEmployees.find((e) => e.id === "1"),
date: new Date("2024-12-03"),
hoursWorked: 8,
description:
"Veritabanı tablolarının oluşturulması ve ilişkilerin kurulması tamamlandı.",
workType: WorkTypeEnum.Development,
progress: 45,
challenges: "Foreign key constraints'lerin optimize edilmesi gerekti",
nextSteps: "Stored procedure'lar yazılacak",
status: DailyUpdateStatusEnum.Approved,
attachments: [],
creationTime: new Date("2024-12-03T18:30:00"),
lastModificationTime: new Date("2024-12-03T18:30:00"),
},
{
id: "7",
taskId: "2",
task: mockProjectTasks.find((t) => t.id === "2"),
employeeId: "2",
employee: mockEmployees.find((e) => e.id === "2"),
date: new Date("2024-12-04"),
hoursWorked: 6,
description: "REST API endpoint'lerinin dokümantasyonuna başlandı.",
workType: WorkTypeEnum.Documentation,
progress: 20,
challenges: "API specification'ların güncel olmama durumu",
nextSteps: "Developer'larla koordinasyon kurulacak",
status: DailyUpdateStatusEnum.Submitted,
attachments: [],
creationTime: new Date("2024-12-04T17:15:00"),
lastModificationTime: new Date("2024-12-04T17:15:00"),
},
{
id: "8",
taskId: "5",
task: mockProjectTasks.find((t) => t.id === "5"),
employeeId: "5",
employee: mockEmployees.find((e) => e.id === "5"),
date: new Date("2024-12-05"),
hoursWorked: 7,
description: "Mobil uygulama için React Native setup'ı tamamlandı.",
workType: WorkTypeEnum.Development,
progress: 55,
challenges: "iOS ve Android build configuration farklılıkları",
nextSteps: "Navigation structure implementasyonu",
status: DailyUpdateStatusEnum.Approved,
attachments: [],
creationTime: new Date("2024-12-05T18:00:00"),
lastModificationTime: new Date("2024-12-05T18:00:00"),
},
];

View file

@ -1,137 +0,0 @@
import { PriorityEnum } from "../types/common";
import { PsProjectTask, TaskStatusEnum, TaskTypeEnum } from "../types/ps";
import { mockEmployees } from "./mockEmployees";
import { mockProjectPhases } from "./mockProjectPhases";
export const mockProjectTasks: PsProjectTask[] = [
{
id: "1",
projectId: "1",
phaseId: "1",
phase: mockProjectPhases.find((phase) => phase.id === "1"),
taskCode: "TSK-001",
name: "Veritabanı Tasarımı",
description: "Erp sistemi için veritabanı şemasının tasarlanması",
taskType: TaskTypeEnum.Development,
status: TaskStatusEnum.InProgress,
priority: PriorityEnum.High,
assignedTo: "1",
assignee: mockEmployees.find((emp) => emp.id === "1"),
startDate: new Date("2024-01-15"),
endDate: new Date("2024-02-15"),
actualStartDate: new Date("2024-01-16"),
actualEndDate: undefined,
estimatedHours: 80,
actualHours: 45,
progress: 60,
activities: [],
comments: [],
isActive: true,
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-20"),
},
{
id: "2",
projectId: "1",
phaseId: "1",
phase: mockProjectPhases.find((phase) => phase.id === "1"),
taskCode: "TSK-002",
name: "API Dokümantasyonu",
description: "REST API endpoints dokümantasyonunun hazırlanması",
taskType: TaskTypeEnum.Documentation,
status: TaskStatusEnum.NotStarted,
priority: PriorityEnum.Normal,
assignedTo: "2",
assignee: mockEmployees.find((emp) => emp.id === "2"),
startDate: new Date("2024-02-01"),
endDate: new Date("2024-02-20"),
actualStartDate: undefined,
actualEndDate: undefined,
estimatedHours: 40,
actualHours: 0,
progress: 0,
activities: [],
comments: [],
isActive: true,
creationTime: new Date("2024-01-25"),
lastModificationTime: new Date("2024-01-25"),
},
{
id: "3",
projectId: "2",
phaseId: "2",
phase: mockProjectPhases.find((phase) => phase.id === "2"),
taskCode: "TSK-003",
name: "Unit Test Yazımı",
description: "Backend servisler için unit testlerin yazılması",
taskType: TaskTypeEnum.Testing,
status: TaskStatusEnum.Completed,
priority: PriorityEnum.High,
assignedTo: "3",
assignee: mockEmployees.find((emp) => emp.id === "3"),
startDate: new Date("2024-01-20"),
endDate: new Date("2024-02-10"),
actualStartDate: new Date("2024-01-20"),
actualEndDate: new Date("2024-02-08"),
estimatedHours: 60,
actualHours: 58,
progress: 100,
activities: [],
comments: [],
isActive: true,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-02-08"),
},
{
id: "4",
projectId: "1",
phaseId: "1",
phase: mockProjectPhases.find((phase) => phase.id === "1"),
taskCode: "TSK-004",
name: "Güvenlik Açığı Düzeltme",
description: "Kritik güvenlik açığının acil olarak düzeltilmesi gerekiyor",
taskType: TaskTypeEnum.Development,
status: TaskStatusEnum.InProgress,
priority: PriorityEnum.Urgent,
assignedTo: "1",
assignee: mockEmployees.find((emp) => emp.id === "1"),
startDate: new Date("2024-10-20"),
endDate: new Date("2024-10-25"),
actualStartDate: new Date("2024-10-20"),
actualEndDate: undefined,
estimatedHours: 20,
actualHours: 8,
progress: 40,
activities: [],
comments: [],
isActive: true,
creationTime: new Date("2024-10-20"),
lastModificationTime: new Date("2024-10-20"),
},
{
id: "5",
projectId: "2",
phaseId: "2",
phase: mockProjectPhases.find((phase) => phase.id === "2"),
taskCode: "TSK-005",
name: "Performans Optimizasyonu",
description: "Uygulama performansının iyileştirilmesi",
taskType: TaskTypeEnum.Development,
status: TaskStatusEnum.NotStarted,
priority: PriorityEnum.High,
assignedTo: "2",
assignee: mockEmployees.find((emp) => emp.id === "2"),
startDate: new Date("2024-10-28"),
endDate: new Date("2024-11-15"),
actualStartDate: undefined,
actualEndDate: undefined,
estimatedHours: 100,
actualHours: 0,
progress: 0,
activities: [],
comments: [],
isActive: true,
creationTime: new Date("2024-10-15"),
lastModificationTime: new Date("2024-10-15"),
},
];

View file

@ -1,233 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
PsDocumentTypeEnum,
PsProject,
ProjectStatusEnum,
ProjectTypeEnum,
RiskCategoryEnum,
RiskImpactEnum,
RiskLevelEnum,
RiskProbabilityEnum,
RiskStatusEnum,
} from "../types/ps";
import { mockBusinessParties } from "./mockBusinessParties";
import { mockEmployees } from "./mockEmployees";
export const mockProjects: PsProject[] = [
{
id: "1",
code: "PRJ-2024-001",
name: "Erp Sistemi Geliştirme",
description: "Kurumsal kaynak planlama sistemi geliştirilmesi",
projectType: ProjectTypeEnum.Internal,
status: ProjectStatusEnum.Active,
priority: PriorityEnum.High,
customerId: "6",
customer: mockBusinessParties.find((c) => c.id === "6"),
projectManagerId: "1",
projectManager: mockEmployees.find((e) => e.id === "1"),
startDate: new Date("2024-01-15"),
endDate: new Date("2024-12-31"),
actualStartDate: new Date("2024-01-20"),
actualEndDate: undefined,
budget: 500000,
actualCost: 250000,
currency: "TRY",
progress: 65,
phases: [],
tasks: [],
risks: [
{
id: "1",
title: "Teknik Ekip Yetersizliği",
description:
"Projenin gerektirdiği teknik uzmanlığa sahip personel eksikliği",
probability: RiskProbabilityEnum.Medium,
status: RiskStatusEnum.Analyzing,
ownerId: "1",
identifiedDate: new Date("2024-01-20"),
mitigationPlan: "Eksternal danışman alımı planlanıyor",
projectId: "1",
riskCode: "005-TEKN",
category: RiskCategoryEnum.Technical,
impact: RiskImpactEnum.VeryLow,
riskLevel: RiskLevelEnum.Low,
identifiedBy: "",
isActive: false,
},
{
id: "2",
title: "Bütçe Aşımı",
description:
"Beklenenden fazla kaynak kullanımı nedeniyle bütçe aşımı riski",
probability: RiskProbabilityEnum.Medium,
status: RiskStatusEnum.Analyzing,
ownerId: "2",
identifiedDate: new Date("2024-01-20"),
mitigationPlan: "Eksternal danışman alımı planlanıyor",
projectId: "1",
riskCode: "009-BUTC",
category: RiskCategoryEnum.Resource,
impact: RiskImpactEnum.Low,
riskLevel: RiskLevelEnum.Critical,
identifiedBy: "",
isActive: false,
},
],
documents: [
{
id: "1",
documentName: "Proje Teklifi.pdf",
documentType: PsDocumentTypeEnum.Design,
fileSize: 2.3,
uploadedAt: new Date("2024-01-15"),
uploadedBy: "Ali Öztürk",
filePath: "pdf",
projectId: "",
version: "",
isActive: false,
},
{
id: "2",
documentName: "Gereksinim Analizi.docx",
documentType: PsDocumentTypeEnum.Report,
fileSize: 1.8,
uploadedAt: new Date("2024-01-15"),
uploadedBy: "Ayşe Kaya",
filePath: "docx",
projectId: "",
version: "",
isActive: false,
},
],
isActive: true,
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-11-20"),
},
{
id: "2",
code: "PRJ-2024-002",
name: "Mobil Uygulama Geliştirme",
description: "iOS ve Android mobil uygulama geliştirilmesi",
projectType: ProjectTypeEnum.Customer,
status: ProjectStatusEnum.Planning,
priority: PriorityEnum.Normal,
customerId: "5",
customer: mockBusinessParties.find((c) => c.id === "5"),
projectManagerId: "2",
projectManager: mockEmployees.find((e) => e.id === "2"),
startDate: new Date("2024-03-01"),
endDate: new Date("2024-08-31"),
actualStartDate: undefined,
actualEndDate: undefined,
budget: 300000,
actualCost: 50000,
currency: "TRY",
progress: 15,
phases: [],
tasks: [],
risks: [
{
id: "r1",
description: "Teknoloji değişiklikleri",
impact: RiskImpactEnum.High,
probability: RiskProbabilityEnum.Medium,
mitigationPlan: "Düzenli eğitim ve güncellemeler",
projectId: "",
riskCode: "",
title: "",
category: RiskCategoryEnum.Technical,
riskLevel: RiskLevelEnum.Low,
status: RiskStatusEnum.Identified,
identifiedBy: "",
identifiedDate: new Date(),
isActive: false,
},
],
documents: [
{
id: "3",
documentName: "UI Mockup.fig",
documentType: PsDocumentTypeEnum.Manual,
fileSize: 5.2,
uploadedAt: new Date("2024-02-20"),
uploadedBy: "Mehmet Demir",
filePath: "fig",
projectId: "",
version: "",
isActive: false,
},
{
id: "4",
documentName: "Veritabanı Şeması.sql",
documentType: PsDocumentTypeEnum.Design,
fileSize: 1.2,
uploadedAt: new Date("2024-02-20"),
uploadedBy: "Mehmet Demir",
filePath: "fig",
projectId: "",
version: "",
isActive: false,
},
],
isActive: true,
creationTime: new Date("2024-02-15"),
lastModificationTime: new Date("2024-11-18"),
},
{
id: "3",
code: "PRJ-2024-003",
name: "Veri Merkezi Kurulumu",
description: "Yeni veri merkezi altyapısının kurulması",
projectType: ProjectTypeEnum.Development,
status: ProjectStatusEnum.Completed,
priority: PriorityEnum.High,
customerId: "6",
customer: mockBusinessParties.find((c) => c.id === "6"),
projectManagerId: "3",
projectManager: mockEmployees.find((e) => e.id === "3"),
startDate: new Date("2024-06-01"),
endDate: new Date("2024-10-31"),
actualStartDate: new Date("2024-06-05"),
actualEndDate: new Date("2024-10-28"),
budget: 800000,
actualCost: 750000,
currency: "TRY",
progress: 100,
phases: [],
tasks: [],
risks: [],
documents: [],
isActive: true,
creationTime: new Date("2024-05-20"),
lastModificationTime: new Date("2024-10-28"),
},
{
id: "4",
code: "PRJ-2024-004",
name: "E-ticaret Platform Entegrasyonu",
description: "Mevcut sisteme e-ticaret platformu entegrasyonu",
projectType: ProjectTypeEnum.Customer,
status: ProjectStatusEnum.OnHold,
priority: PriorityEnum.Low,
customerId: "5",
customer: mockBusinessParties.find((c) => c.id === "5"),
projectManagerId: "4",
projectManager: mockEmployees.find((e) => e.id === "4"),
startDate: new Date("2024-09-01"),
endDate: new Date("2024-12-15"),
actualStartDate: undefined,
actualEndDate: undefined,
budget: 200000,
actualCost: 25000,
currency: "TRY",
progress: 10,
phases: [],
tasks: [],
risks: [],
documents: [],
isActive: true,
creationTime: new Date("2024-08-15"),
lastModificationTime: new Date("2024-11-15"),
},
];

View file

@ -1,40 +0,0 @@
import { NoteStatusEnum, PromissoryNote, TypeEnum } from '../types/fi'
import { mockCurrentAccounts } from './mockCurrentAccounts'
export const mockPromissoryNotes: PromissoryNote[] = [
{
id: '1',
noteNumber: 'NOT-001',
type: TypeEnum.Received,
drawerName: 'Müşteri A.Ş.',
payeeName: 'ABC Şirket',
issueDate: new Date('2024-01-20'),
dueDate: new Date('2024-03-20'),
amount: 50000,
currency: 'TRY',
status: NoteStatusEnum.InHand,
location: 'Ana Kasa',
currentAccountId: '1',
currentAccount: mockCurrentAccounts.find((acc) => acc.id === '1'),
creationTime: new Date('2024-01-20'),
lastModificationTime: new Date('2024-01-20'),
},
{
id: '2',
noteNumber: 'NOT-002',
type: TypeEnum.Issued,
drawerName: 'ABC Şirket',
payeeName: 'Kefil A.Ş.',
issueDate: new Date('2024-01-05'),
dueDate: new Date('2024-03-05'),
amount: 30000,
currency: 'TRY',
status: NoteStatusEnum.Collected,
location: 'Banka',
collectionDate: new Date('2024-01-25'),
currentAccountId: '2',
currentAccount: mockCurrentAccounts.find((acc) => acc.id === '2'),
creationTime: new Date('2024-01-05'),
lastModificationTime: new Date('2024-01-25'),
},
]

View file

@ -1,214 +0,0 @@
import { PaymentTerms } from "../types/common";
import { OrderStatusEnum, MmPurchaseOrder, RequestTypeEnum } from "../types/mm";
import { mockMaterials } from "./mockMaterials";
import { mockBusinessParties } from "./mockBusinessParties";
export const mockPurchaseOrders: MmPurchaseOrder[] = [
{
id: "ORD001",
orderNumber: "SIP-2024-001",
supplierId: "1",
supplier: mockBusinessParties.find((s) => s.id === "1"),
orderDate: new Date("2024-01-20"),
deliveryDate: new Date("2024-02-03"),
status: OrderStatusEnum.Delivered,
paymentTerms: PaymentTerms.Net30,
currency: "TRY",
exchangeRate: 1,
subtotal: 125000,
taxAmount: 22500,
totalAmount: 147500,
deliveryAddress: {
street: "Atatürk Cad. No:10",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
terms: "30 gün içinde ödeme yapılacaktır.",
notes: "Öncelikli sipariş - hızlı teslimat talep edildi.",
items: [
{
id: "1",
orderId: "ORD001",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
description: "Galvanizli çelik profil",
quantity: 100,
unit: "adet",
unitPrice: 850,
totalPrice: 85000,
deliveryDate: new Date("2024-02-03"),
receivedQuantity: 100,
deliveredQuantity: 100,
remainingQuantity: 0,
},
{
id: "2",
orderId: "ORD001",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
description: "3.25mm kaynak elektrodu",
quantity: 200,
unit: "kg",
unitPrice: 200,
totalPrice: 40000,
deliveryDate: new Date("2024-02-03"),
receivedQuantity: 200,
deliveredQuantity: 200,
remainingQuantity: 0,
},
],
receipts: [],
creationTime: new Date("2024-01-20"),
lastModificationTime: new Date("2024-02-03"),
requestId: "REQ001",
requestTitle: "Üretim Malzemesi Talebi",
requestType: RequestTypeEnum.Material,
quotationId: "QUO001",
expectedDeliveryDate: new Date("2024-02-05"),
actualDeliveryDate: new Date("2024-02-03"),
deliveryTerms: "Fabrika teslimi",
attachments: ["siparis_formu.pdf", "teknik_sartname.pdf"],
approvedBy: "Ayşe Demir",
approvedAt: new Date("2024-01-20"),
},
{
id: "ORD002",
orderNumber: "SIP-2024-002",
supplierId: "2",
supplier: mockBusinessParties.find((s) => s.id === "2"),
orderDate: new Date("2024-01-22"),
deliveryDate: new Date("2024-02-10"),
status: OrderStatusEnum.PartiallyDelivered,
paymentTerms: PaymentTerms.Net45,
currency: "TRY",
exchangeRate: 0,
subtotal: 0,
taxAmount: 0,
totalAmount: 280000,
deliveryAddress: {
street: "İnönü Mah. No:5",
city: "Ankara",
state: "Ankara",
postalCode: "06000",
country: "Türkiye",
},
terms: "45 gün içinde ödeme yapılacaktır.",
notes: "Kademeli teslimat yapılacak.",
items: [
{
id: "3",
orderId: "ORD002",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
description: "i7 işlemci, 16GB RAM, 512GB SSD",
quantity: 10,
unit: "adet",
unitPrice: 25000,
totalPrice: 250000,
deliveryDate: new Date("2024-02-08"),
receivedQuantity: 7,
deliveredQuantity: 7,
remainingQuantity: 3,
},
{
id: "4",
orderId: "ORD002",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
description: '24" LED monitör',
quantity: 10,
unit: "adet",
unitPrice: 3000,
totalPrice: 30000,
deliveryDate: new Date("2024-02-10"),
receivedQuantity: 10,
deliveredQuantity: 10,
remainingQuantity: 0,
},
],
receipts: [],
creationTime: new Date("2024-01-22"),
lastModificationTime: new Date("2024-02-08"),
requestId: "REQ002",
requestTitle: "Bilgisayar Ekipmanları",
requestType: RequestTypeEnum.WorkCenter,
quotationId: "QUO002",
expectedDeliveryDate: new Date("2024-02-12"),
actualDeliveryDate: new Date("2024-02-08"),
deliveryTerms: "Ofis teslimi",
attachments: ["siparis_detay.pdf"],
approvedBy: "Murat Şen",
approvedAt: new Date("2024-01-22"),
},
{
id: "ORD003",
orderNumber: "SIP-2024-003",
supplierId: "3",
supplier: mockBusinessParties.find((s) => s.id === "3"),
orderDate: new Date("2024-01-25"),
deliveryDate: new Date("2024-02-01"),
status: OrderStatusEnum.Confirmed,
paymentTerms: PaymentTerms.Prepaid,
currency: "TRY",
exchangeRate: 0,
subtotal: 0,
taxAmount: 0,
totalAmount: 85000,
deliveryAddress: {
street: "Hürriyet Cad. No:20",
city: "İzmir",
state: "İzmir",
postalCode: "35000",
country: "Türkiye",
},
terms: "Hizmet başlamadan önce ödeme yapılacaktır.",
notes: "6 aylık hizmet anlaşması.",
items: [
{
id: "5",
orderId: "ORD003",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
description: "Aylık makine bakım hizmeti",
quantity: 6,
unit: "ay",
unitPrice: 12000,
totalPrice: 72000,
deliveryDate: new Date("2024-02-01"),
receivedQuantity: 0,
deliveredQuantity: 0,
remainingQuantity: 6,
},
{
id: "6",
orderId: "ORD003",
materialId: "5",
material: mockMaterials.find((m) => m.id === "5"),
description: "Acil durum müdahale paketi",
quantity: 1,
unit: "paket",
unitPrice: 13000,
totalPrice: 13000,
deliveryDate: new Date("2024-02-01"),
receivedQuantity: 0,
deliveredQuantity: 0,
remainingQuantity: 1,
},
],
receipts: [],
creationTime: new Date("2024-01-25"),
lastModificationTime: new Date("2024-01-26"),
requestId: "REQ003",
requestTitle: "Makine Bakım Hizmeti",
requestType: RequestTypeEnum.Service,
quotationId: "QUO003",
expectedDeliveryDate: new Date("2024-02-01"),
actualDeliveryDate: new Date("2024-02-01"),
deliveryTerms: "Yerinde hizmet",
attachments: ["hizmet_sozlesmesi.pdf"],
approvedBy: "Can Demirtaş",
approvedAt: new Date("2024-01-25"),
},
];

View file

@ -1,190 +0,0 @@
import { PriorityEnum } from "../types/common";
import {
ApprovalLevelEnum,
ApprovalStatusEnum,
MmPurchaseRequest,
RequestStatusEnum,
RequestTypeEnum,
} from "../types/mm";
export const mockPurchaseRequests: MmPurchaseRequest[] = [
{
id: "REQ001",
requestNumber: "PR-2024-001",
requestType: RequestTypeEnum.Material,
description: "Üretim için hammadde talebi",
department: "Üretim",
requestedBy: "Ali Veli",
requestDate: new Date("2024-08-01"),
requiredDate: new Date("2024-08-15"),
priority: PriorityEnum.High,
status: RequestStatusEnum.Approved,
totalAmount: 75000,
currency: "TRY",
items: [
{
id: "ITEM001",
requestId: "1",
materialId: "1",
quantity: 100,
unit: "KG",
estimatedPrice: 750,
specification: "Yüksek kalite çelik",
justification: "Üretim planı için gerekli",
isUrgent: true,
},
],
approvals: [
{
id: "APP001",
requestId: "1",
approvalLevel: ApprovalLevelEnum.Supervisor,
approverUserId: "USR001",
approverName: "Mehmet Yılmaz",
approvalDate: new Date("2024-08-02"),
status: ApprovalStatusEnum.Approved,
comments: "Onaylandı",
sequence: 1,
isRequired: true,
},
{
id: "APP002",
requestId: "1",
approvalLevel: ApprovalLevelEnum.Manager,
approverUserId: "USR002",
approverName: "Ayşe Demir",
approvalDate: new Date("2024-08-03"),
status: ApprovalStatusEnum.Approved,
sequence: 2,
isRequired: true,
},
],
attachments: [],
comments: [],
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "REQ002",
requestNumber: "PR-2024-002",
requestType: RequestTypeEnum.Service,
description: "Bakım hizmeti talebi",
department: "Bakım",
requestedBy: "Fatma Özkan",
requestDate: new Date("2024-08-05"),
requiredDate: new Date("2024-08-12"),
priority: PriorityEnum.Urgent,
status: RequestStatusEnum.InReview,
totalAmount: 25000,
currency: "TRY",
items: [
{
id: "ITEM002",
requestId: "2",
materialId: "2",
serviceDescription: "Kompresör bakım hizmeti",
quantity: 1,
unit: "ADET",
estimatedPrice: 25000,
specification: "Periyodik bakım",
justification: "Arıza önleme",
isUrgent: true,
},
],
approvals: [
{
id: "APP003",
requestId: "2",
approvalLevel: ApprovalLevelEnum.Supervisor,
approverUserId: "USR003",
approverName: "Hasan Kaya",
status: ApprovalStatusEnum.Pending,
sequence: 1,
isRequired: true,
},
],
attachments: [],
comments: [],
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "REQ003",
requestNumber: "PR-2024-003",
requestType: RequestTypeEnum.WorkCenter,
description: "Yeni ekipman talebi",
department: "IT",
requestedBy: "Murat Şen",
requestDate: new Date("2024-08-10"),
requiredDate: new Date("2024-08-25"),
priority: PriorityEnum.Normal,
status: RequestStatusEnum.Draft,
totalAmount: 150000,
currency: "TRY",
items: [
{
id: "ITEM003",
requestId: "3",
materialId: "3",
serviceDescription: "Sunucu donanımı",
quantity: 2,
unit: "ADET",
estimatedPrice: 75000,
specification: "Dell PowerEdge R750",
justification: "Sistem kapasitesi artırımı",
isUrgent: false,
},
],
approvals: [],
attachments: [],
comments: [],
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "4",
requestNumber: "PR-2024-004",
requestType: RequestTypeEnum.Material,
description: "Ofis malzemeleri talebi",
department: "İdari İşler",
requestedBy: "Zeynep Akın",
requestDate: new Date("2024-08-12"),
requiredDate: new Date("2024-08-20"),
priority: PriorityEnum.Low,
status: RequestStatusEnum.Rejected,
totalAmount: 5000,
currency: "TRY",
items: [
{
id: "ITEM004",
requestId: "4",
materialId: "4",
serviceDescription: "Kırtasiye malzemeleri",
quantity: 1,
unit: "LOT",
estimatedPrice: 5000,
specification: "Çeşitli ofis malzemeleri",
justification: "Stok yenileme",
isUrgent: false,
},
],
approvals: [
{
id: "APP004",
requestId: "4",
approvalLevel: ApprovalLevelEnum.Manager,
approverUserId: "USR004",
approverName: "Ahmet Yıldız",
approvalDate: new Date("2024-08-13"),
status: ApprovalStatusEnum.Rejected,
comments: "Bütçe yetersizliği",
sequence: 1,
isRequired: true,
},
],
attachments: [],
comments: [],
creationTime: new Date(),
lastModificationTime: new Date(),
},
];

View file

@ -1,50 +0,0 @@
import { PriorityEnum } from '@/types/common'
import { ApprovalStatusEnum, MmPurchaseRequisition, RequisitionStatusEnum } from '../types/mm'
export const mockPurchaseRequisitions: MmPurchaseRequisition[] = [
{
id: '1',
requisitionNumber: 'PR-2024-001',
requestedBy: 'Mehmet Özkan',
departmentId: 'PROD',
requestDate: new Date('2024-01-20'),
requiredDate: new Date('2024-02-15'),
priority: PriorityEnum.Normal,
status: RequisitionStatusEnum.InApproval,
description: 'Üretim hattı için çelik malzeme talebi',
justification: 'Mevcut stok seviyesi kritik seviyeye düştü',
totalAmount: 125000,
currency: 'TRY',
items: [
{
id: '1',
requisitionId: '1',
materialId: 'MAT-001',
description: 'Çelik Levha 2mm',
quantity: 500,
unitId: '1',
estimatedPrice: 250,
totalAmount: 125000,
requiredDate: new Date('2024-02-15'),
specifications: 'Kalınlık: 2mm, Genişlik: 1000mm',
budgetCode: 'PROD-2024-Q1',
},
],
approvals: [
{
id: '1',
documentId: '1',
documentType: 'PurchaseRequisition',
approverUserId: 'manager1',
approverName: 'Ali Yılmaz',
approvalLevel: 1,
status: ApprovalStatusEnum.Approved,
comments: 'Onaylandı',
approvedAt: new Date('2024-01-21'),
creationTime: new Date('2024-01-21'),
},
],
creationTime: new Date('2024-01-20'),
lastModificationTime: new Date('2024-01-21'),
},
]

View file

@ -1,124 +0,0 @@
import {
ConditionOperatorEnum,
ConditionTypeEnum,
WmPutawayRule,
PutawayStrategyEnum,
} from "../types/wm";
export const mockPutawayRules: WmPutawayRule[] = [
{
id: "1",
code: "RULE001",
name: "Ağır Malzemeler",
description: "Ağır malzemeler için zemin seviye yerleştirme kuralı",
warehouseId: "1",
materialTypeId: "1",
materialGroupId: "2",
priority: 1,
conditions: [
{
id: "1",
ruleId: "1",
conditionType: ConditionTypeEnum.Weight,
operator: ConditionOperatorEnum.GreaterThan,
value: "50",
},
],
targetZoneId: "1",
targetLocationId: undefined,
strategy: PutawayStrategyEnum.NearestLocation,
isActive: true,
},
{
id: "2",
code: "RULE002",
name: "Hızlı Hareket Eden Malzemeler",
description: "A sınıfı malzemeler için kolay erişim bölgesi",
warehouseId: "1",
materialTypeId: "2",
materialGroupId: "2",
priority: 2,
conditions: [
{
id: "2",
ruleId: "2",
conditionType: ConditionTypeEnum.MaterialGroup,
operator: ConditionOperatorEnum.Equals,
value: "A-Class",
},
],
targetZoneId: "2",
targetLocationId: undefined,
strategy: PutawayStrategyEnum.NearestLocation,
isActive: true,
},
{
id: "3",
code: "RULE003",
name: "FIFO Kuralı",
description: "Son kullanma tarihi olan malzemeler için FIFO",
warehouseId: "1",
materialTypeId: "3",
materialGroupId: "2",
priority: 3,
conditions: [
{
id: "3",
ruleId: "3",
conditionType: ConditionTypeEnum.MaterialType,
operator: ConditionOperatorEnum.Equals,
value: "Perishable",
},
],
targetZoneId: "3",
targetLocationId: undefined,
strategy: PutawayStrategyEnum.FIFO,
isActive: true,
},
{
id: "4",
code: "RULE004",
name: "Büyük Hacimli Malzemeler",
description: "Büyük hacimli malzemeler için özel alan",
warehouseId: "1",
materialTypeId: "2",
materialGroupId: "4",
priority: 4,
conditions: [
{
id: "4",
ruleId: "4",
conditionType: ConditionTypeEnum.Volume,
operator: ConditionOperatorEnum.GreaterThan,
value: "2",
},
],
targetZoneId: "4",
targetLocationId: undefined,
strategy: PutawayStrategyEnum.EmptyLocation,
isActive: true,
},
{
id: "5",
code: "RULE005",
name: "Aynı Ürün Gruplaması",
description: "Aynı malzeme tiplerini birlikte yerleştirme",
warehouseId: "1",
materialTypeId: "2",
materialGroupId: "3",
priority: 5,
conditions: [
{
id: "5",
ruleId: "5",
conditionType: ConditionTypeEnum.MaterialType,
operator: ConditionOperatorEnum.Equals,
value: "Electronics",
},
],
targetZoneId: "5",
targetLocationId: undefined,
strategy: PutawayStrategyEnum.SameProduct,
isActive: false,
},
];

View file

@ -1,198 +0,0 @@
import { MmQuotation, QuotationStatusEnum, RequestTypeEnum } from "../types/mm";
import { mockBusinessParties } from "./mockBusinessParties";
export const mockQuotations: MmQuotation[] = [
{
id: "1",
quotationNumber: "TEK-2024-001",
supplierId: "1",
supplier: mockBusinessParties.find((s) => s.id === "1"),
requestId: "REQ001",
requestTitle: "Üretim Malzemesi Talebi",
requestType: RequestTypeEnum.Material,
quotationDate: new Date("2024-01-15"),
validUntil: new Date("2024-02-15"),
totalAmount: 125000,
currency: "TRY",
status: QuotationStatusEnum.Pending,
items: [
{
id: "ITM001",
materialCode: "MAL001",
materialName: "Çelik Profil 40x40",
description: "Galvanizli çelik profil",
quantity: 100,
unit: "adet",
unitPrice: 850,
totalPrice: 85000,
leadTime: 15,
specifications: ["Galvanizli", "EN 10025 standardında"],
},
{
id: "ITM002",
materialCode: "MAL002",
materialName: "Kaynak Elektrodu",
description: "3.25mm kaynak elektrodu",
quantity: 200,
unit: "kg",
unitPrice: 200,
totalPrice: 40000,
leadTime: 7,
specifications: ["AWS E6013", "Rutubet dirençli"],
},
],
deliveryTerms: "15 gün içinde teslim",
paymentTerms: "30 gün vadeli",
notes: "Toplu sipariş indirimi uygulanmıştır.",
attachments: [
{
id: "ATT001",
fileName: "teknik_sartname.pdf",
fileSize: 1024,
fileType: "application/pdf",
uploadedBy: "Mehmet Yılmaz",
uploadedAt: new Date("2024-01-15"),
},
{
id: "ATT002",
fileName: "urun_katalogu.pdf",
fileSize: 2048,
fileType: "application/pdf",
uploadedBy: "Mehmet Yılmaz",
uploadedAt: new Date("2024-01-15"),
},
],
submittedBy: "Mehmet Yılmaz",
submittedAt: new Date("2024-01-15"),
evaluatedBy: undefined,
evaluatedAt: undefined,
evaluationNotes: undefined,
creationTime: new Date("2024-01-15"),
lastModificationTime: new Date("2024-01-15"),
},
{
id: "2",
quotationNumber: "TEK-2024-002",
supplierId: "2",
supplier: mockBusinessParties.find((s) => s.id === "2"),
requestId: "REQ002",
requestTitle: "Bilgisayar Ekipmanları",
requestType: RequestTypeEnum.WorkCenter,
quotationDate: new Date("2024-01-16"),
validUntil: new Date("2024-02-16"),
totalAmount: 280000,
currency: "TRY",
status: QuotationStatusEnum.Approved,
items: [
{
id: "ITM003",
materialCode: "EQP001",
materialName: "Masaüstü Bilgisayar",
description: "i7 işlemci, 16GB RAM, 512GB SSD",
quantity: 10,
unit: "adet",
unitPrice: 25000,
totalPrice: 250000,
leadTime: 21,
specifications: [
"Intel i7-12700",
"16GB DDR4",
"512GB NVMe SSD",
"Windows 11 Pro",
],
},
{
id: "ITM004",
materialCode: "EQP002",
materialName: "Monitör",
description: '24" LED monitör',
quantity: 10,
unit: "adet",
unitPrice: 3000,
totalPrice: 30000,
leadTime: 14,
specifications: ['24" Full HD', "IPS panel", "HDMI/DP girişi"],
},
],
deliveryTerms: "21 gün içinde teslim",
paymentTerms: "45 gün vadeli",
notes: "2 yıl garanti dahil.",
attachments: [
{
id: "ATT003",
fileName: "teknik_ozellikler.pdf",
fileSize: 1536,
fileType: "application/pdf",
uploadedBy: "Ali Kaya",
uploadedAt: new Date("2024-01-16"),
},
],
submittedBy: "Ali Kaya",
submittedAt: new Date("2024-01-16"),
evaluatedBy: "Ayşe Demir",
evaluatedAt: new Date("2024-01-18"),
evaluationNotes: "Teknik özellikler uygun, fiyat makul.",
creationTime: new Date("2024-01-16"),
lastModificationTime: new Date("2024-01-18"),
},
{
id: "3",
quotationNumber: "TEK-2024-003",
supplierId: "3",
supplier: mockBusinessParties.find((s) => s.id === "3"),
requestId: "REQ003",
requestTitle: "Bakım Hizmetleri",
requestType: RequestTypeEnum.Service,
quotationDate: new Date("2024-01-17"),
validUntil: new Date("2024-02-17"),
totalAmount: 95000,
currency: "TRY",
status: QuotationStatusEnum.Rejected,
items: [
{
id: "ITM005",
materialCode: "SRV001",
materialName: "Preventif Bakım",
description: "Aylık preventif bakım hizmeti",
quantity: 12,
unit: "ay",
unitPrice: 7500,
totalPrice: 90000,
leadTime: 0,
specifications: ["24/7 destek", "Aylık rapor", "Yedek parça dahil"],
},
{
id: "ITM006",
materialCode: "SRV002",
materialName: "Acil Müdahale",
description: "Acil durum müdahale hizmeti",
quantity: 1,
unit: "paket",
unitPrice: 5000,
totalPrice: 5000,
leadTime: 0,
specifications: ["2 saat içinde müdahale", "Hafta sonu dahil"],
},
],
deliveryTerms: "Hemen başlanabilir",
paymentTerms: "Aylık ödeme",
notes: "Yıllık anlaşma için %10 indirim.",
attachments: [
{
id: "ATT004",
fileName: "hizmet_detaylari.pdf",
fileSize: 768,
fileType: "application/pdf",
uploadedBy: "Fatma Özkan",
uploadedAt: new Date("2024-01-17"),
},
],
submittedBy: "Fatma Özkan",
submittedAt: new Date("2024-01-17"),
evaluatedBy: "Murat Şen",
evaluatedAt: new Date("2024-01-20"),
evaluationNotes: "Fiyat yüksek, alternatif teklif aranacak.",
creationTime: new Date("2024-01-17"),
lastModificationTime: new Date("2024-01-20"),
},
];

View file

@ -1,29 +0,0 @@
export const mockRecentActivities = [
{
id: "1",
type: "material_received",
title: "Malzeme Girişi",
description: "MAT-001 - Çelik Levha 500 KG alındı",
timestamp: new Date("2024-01-20T10:30:00"),
user: "Mehmet Özkan",
status: "completed",
},
{
id: "2",
type: "maintenance_scheduled",
title: "Bakım Planlandı",
description: "EQP-005 - Tornezgah için periyodik bakım",
timestamp: new Date("2024-01-20T09:15:00"),
user: "Ali Yılmaz",
status: "pending",
},
{
id: "3",
type: "order_created",
title: "Sipariş Oluşturuldu",
description: "PO-2024-025 - Motor satınalma siparişi",
timestamp: new Date("2024-01-20T08:45:00"),
user: "Ayşe Kaya",
status: "processing",
},
];

View file

@ -1,665 +0,0 @@
import { PaymentTerms } from "../types/common";
import {
CrmSalesOrder,
SaleOrderStatusEnum,
SaleOrderItemStatusEnum,
} from "../types/crm";
import { mockBusinessParties } from "./mockBusinessParties";
import { mockMaterials } from "./mockMaterials";
export const mockSalesOrders: CrmSalesOrder[] = [
{
id: "1",
orderNumber: "ORD-2024-001",
customerId: "6", // Teknoloji A.Ş.
customer: mockBusinessParties.find((c) => c.id === "6"),
orderDate: new Date("2024-08-15"),
requestedDeliveryDate: new Date("2024-09-15"),
confirmedDeliveryDate: new Date("2024-09-14"),
status: SaleOrderStatusEnum.Delivered,
subtotal: 125000,
taxAmount: 22500,
discountAmount: 6250,
totalAmount: 141250,
currency: "TRY",
paymentTerms: PaymentTerms.Net30,
deliveryAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
billingAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
items: [
{
id: "soi_1",
orderId: "so_1",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
description: "Yüksek Kaliteli Çelik Levha 10mm",
quantity: 500,
deliveredQuantity: 500,
unitId: "LT",
unit: mockMaterials.find((m) => m.id === "LT"),
unitPrice: 18.75,
totalAmount: 9375,
requestedDate: new Date("2024-09-15"),
confirmedDate: new Date("2024-09-14"),
status: SaleOrderItemStatusEnum.Delivered,
},
{
id: "soi_2",
orderId: "so_1",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
description: "Alüminyum Profil 40x40mm",
quantity: 1000,
deliveredQuantity: 1000,
unitId: "pcs",
unit: mockMaterials.find((m) => m.id === "pcs"),
unitPrice: 12.5,
totalAmount: 12500,
requestedDate: new Date("2024-09-15"),
confirmedDate: new Date("2024-09-14"),
status: SaleOrderItemStatusEnum.Delivered,
},
],
deliveries: [],
creationTime: new Date("2024-08-15"),
lastModificationTime: new Date("2024-08-16"),
},
{
id: "2",
orderNumber: "ORD-2024-002",
customerId: "5", // Üretim Sanayi Ltd.
customer: mockBusinessParties.find((c) => c.id === "5"),
orderDate: new Date("2024-08-20"),
requestedDeliveryDate: new Date("2024-09-20"),
confirmedDeliveryDate: new Date("2024-09-18"),
status: SaleOrderStatusEnum.Shipped,
subtotal: 85000,
taxAmount: 15300,
discountAmount: 4250,
totalAmount: 96050,
currency: "TRY",
paymentTerms: PaymentTerms.Net60,
deliveryAddress: {
street: "Sanayi Sitesi 5. Cadde No:23",
city: "Bursa",
state: "Bursa",
postalCode: "16000",
country: "Türkiye",
},
billingAddress: {
street: "Sanayi Sitesi 5. Cadde No:23",
city: "Bursa",
state: "Bursa",
postalCode: "16000",
country: "Türkiye",
},
items: [
{
id: "soi_3",
orderId: "so_2",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
description: "Plastik Granül PVC",
quantity: 2000,
deliveredQuantity: 2000,
unitId: "ADET",
unit: mockMaterials.find((m) => m.id === "ADET"),
unitPrice: 8.5,
totalAmount: 17000,
requestedDate: new Date("2024-09-20"),
confirmedDate: new Date("2024-09-18"),
status: SaleOrderItemStatusEnum.Shipped,
},
{
id: "soi_4",
orderId: "so_2",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
description: "Endüstriyel Yapıştırıcı",
quantity: 50,
deliveredQuantity: 50,
unitId: "ADET",
unit: mockMaterials.find((m) => m.id === "ADET"),
unitPrice: 125.0,
totalAmount: 6250,
requestedDate: new Date("2024-09-20"),
confirmedDate: new Date("2024-09-18"),
status: SaleOrderItemStatusEnum.Shipped,
},
],
deliveries: [],
creationTime: new Date("2024-08-20"),
lastModificationTime: new Date("2024-08-21"),
},
{
id: "3",
orderNumber: "ORD-2024-003",
customerId: "6", // Otomotiv Parça A.Ş.
customer: mockBusinessParties.find((c) => c.id === "6"),
orderDate: new Date("2024-08-25"),
requestedDeliveryDate: new Date("2024-09-25"),
confirmedDeliveryDate: new Date("2024-09-25"),
status: SaleOrderStatusEnum.InProduction,
subtotal: 175000,
taxAmount: 31500,
discountAmount: 8750,
totalAmount: 197750,
currency: "TRY",
paymentTerms: PaymentTerms.Net30,
deliveryAddress: {
street: "OSB 1. Cadde No:45",
city: "Kocaeli",
state: "Kocaeli",
postalCode: "41000",
country: "Türkiye",
},
billingAddress: {
street: "OSB 1. Cadde No:45",
city: "Kocaeli",
state: "Kocaeli",
postalCode: "41000",
country: "Türkiye",
},
items: [
{
id: "soi_5",
orderId: "so_3",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
description: "Motor Yağı 10W-40",
quantity: 500,
deliveredQuantity: 0,
unitId: "ADET",
unit: mockMaterials.find((m) => m.id === "ADET"),
unitPrice: 45.0,
totalAmount: 22500,
requestedDate: new Date("2024-09-25"),
confirmedDate: new Date("2024-09-25"),
status: SaleOrderItemStatusEnum.InProduction,
},
{
id: "soi_6",
orderId: "so_3",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
description: "Fren Balata Seti",
quantity: 200,
deliveredQuantity: 0,
unitId: "ADET",
unit: mockMaterials.find((m) => m.id === "ADET"),
unitPrice: 85.0,
totalAmount: 17000,
requestedDate: new Date("2024-09-25"),
confirmedDate: new Date("2024-09-25"),
status: SaleOrderItemStatusEnum.InProduction,
},
],
deliveries: [],
creationTime: new Date("2024-08-25"),
lastModificationTime: new Date("2024-08-26"),
},
{
id: "4",
orderNumber: "ORD-2024-004",
customerId: "6", // Teknoloji A.Ş.
customer: mockBusinessParties.find((c) => c.id === "6"),
orderDate: new Date("2024-09-01"),
requestedDeliveryDate: new Date("2024-10-01"),
confirmedDeliveryDate: new Date("2024-09-30"),
status: SaleOrderStatusEnum.Confirmed,
subtotal: 95000,
taxAmount: 17100,
discountAmount: 4750,
totalAmount: 107350,
currency: "TRY",
paymentTerms: PaymentTerms.Net30,
deliveryAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
billingAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
items: [
{
id: "soi_7",
orderId: "so_4",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
description: "Elektronik Kart",
quantity: 100,
deliveredQuantity: 0,
unitId: "PAKET",
unit: mockMaterials.find((m) => m.id === "PAKET"),
unitPrice: 150.0,
totalAmount: 15000,
requestedDate: new Date("2024-10-01"),
confirmedDate: new Date("2024-09-30"),
status: SaleOrderItemStatusEnum.Confirmed,
},
{
id: "soi_8",
orderId: "so_4",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
description: "Kablo Demeti",
quantity: 250,
deliveredQuantity: 0,
unitId: "PAKET",
unit: mockMaterials.find((m) => m.id === "PAKET"),
unitPrice: 25.0,
totalAmount: 6250,
requestedDate: new Date("2024-10-01"),
confirmedDate: new Date("2024-09-30"),
status: SaleOrderItemStatusEnum.Confirmed,
},
],
deliveries: [],
creationTime: new Date("2024-09-01"),
lastModificationTime: new Date("2024-09-02"),
},
{
id: "5",
orderNumber: "ORD-2024-005",
customerId: "6", // Üretim Sanayi Ltd.
customer: mockBusinessParties.find((c) => c.id === "6"),
orderDate: new Date("2024-09-05"),
requestedDeliveryDate: new Date("2024-10-05"),
confirmedDeliveryDate: new Date("2024-10-03"),
status: SaleOrderStatusEnum.Ready,
subtotal: 65000,
taxAmount: 11700,
discountAmount: 3250,
totalAmount: 73450,
currency: "TRY",
paymentTerms: PaymentTerms.Net60,
deliveryAddress: {
street: "Sanayi Sitesi 5. Cadde No:23",
city: "Bursa",
state: "Bursa",
postalCode: "16000",
country: "Türkiye",
},
billingAddress: {
street: "Sanayi Sitesi 5. Cadde No:23",
city: "Bursa",
state: "Bursa",
postalCode: "16000",
country: "Türkiye",
},
items: [
{
id: "soi_9",
orderId: "so_5",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
description: "Rulman 6205",
quantity: 100,
deliveredQuantity: 100,
unitId: "KOLI",
unit: mockMaterials.find((m) => m.id === "KOLI"),
unitPrice: 35.0,
totalAmount: 3500,
requestedDate: new Date("2024-10-05"),
confirmedDate: new Date("2024-10-03"),
status: SaleOrderItemStatusEnum.Ready,
},
{
id: "soi_10",
orderId: "so_5",
materialId: "5",
material: mockMaterials.find((m) => m.id === "5"),
description: "Kayış V-Tipi",
quantity: 50,
deliveredQuantity: 50,
unitId: "KOLI",
unit: mockMaterials.find((m) => m.id === "KOLI"),
unitPrice: 45.0,
totalAmount: 2250,
requestedDate: new Date("2024-10-05"),
confirmedDate: new Date("2024-10-03"),
status: SaleOrderItemStatusEnum.Ready,
},
],
deliveries: [],
creationTime: new Date("2024-09-05"),
lastModificationTime: new Date("2024-09-06"),
},
{
id: "6",
orderNumber: "ORD-2024-006",
customerId: "5", // Otomotiv Parça A.Ş.
customer: mockBusinessParties.find((c) => c.id === "5"),
orderDate: new Date("2024-09-10"),
requestedDeliveryDate: new Date("2024-10-10"),
confirmedDeliveryDate: undefined,
status: SaleOrderStatusEnum.Draft,
subtotal: 45000,
taxAmount: 8100,
discountAmount: 2250,
totalAmount: 50850,
currency: "TRY",
paymentTerms: PaymentTerms.Net30,
deliveryAddress: {
street: "OSB 1. Cadde No:45",
city: "Kocaeli",
state: "Kocaeli",
postalCode: "41000",
country: "Türkiye",
},
billingAddress: {
street: "OSB 1. Cadde No:45",
city: "Kocaeli",
state: "Kocaeli",
postalCode: "41000",
country: "Türkiye",
},
items: [
{
id: "soi_11",
orderId: "so_6",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
description: "Lastik 205/55R16",
quantity: 20,
deliveredQuantity: 0,
unitId: "MT",
unit: mockMaterials.find((m) => m.id === "MT"),
unitPrice: 450.0,
totalAmount: 9000,
requestedDate: new Date("2024-10-10"),
confirmedDate: undefined,
status: SaleOrderItemStatusEnum.Pending,
},
],
deliveries: [],
creationTime: new Date("2024-09-10"),
lastModificationTime: new Date("2024-09-10"),
},
{
id: "7",
orderNumber: "ORD-2024-007",
customerId: "5", // Teknoloji A.Ş.
customer: mockBusinessParties.find((c) => c.id === "5"),
orderDate: new Date("2024-08-10"),
requestedDeliveryDate: new Date("2024-09-10"),
confirmedDeliveryDate: new Date("2024-09-05"),
status: SaleOrderStatusEnum.Cancelled,
subtotal: 25000,
taxAmount: 4500,
discountAmount: 1250,
totalAmount: 28250,
currency: "TRY",
paymentTerms: PaymentTerms.Net30,
deliveryAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
billingAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
items: [
{
id: "soi_12",
orderId: "so_7",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
description: "Güç Kaynağı 500W",
quantity: 25,
deliveredQuantity: 0,
unitId: "MT",
unit: mockMaterials.find((m) => m.id === "MT"),
unitPrice: 200.0,
totalAmount: 5000,
requestedDate: new Date("2024-09-10"),
confirmedDate: new Date("2024-09-05"),
status: SaleOrderItemStatusEnum.Pending,
},
],
deliveries: [],
creationTime: new Date("2024-08-10"),
lastModificationTime: new Date("2024-08-15"),
},
{
id: "8",
orderNumber: "ORD-2024-008",
customerId: "5", // Üretim Sanayi Ltd.
customer: mockBusinessParties.find((c) => c.id === "5"),
orderDate: new Date("2024-09-12"),
requestedDeliveryDate: new Date("2024-10-12"),
confirmedDeliveryDate: new Date("2024-10-10"),
status: SaleOrderStatusEnum.InProduction,
subtotal: 135000,
taxAmount: 24300,
discountAmount: 6750,
totalAmount: 152550,
currency: "TRY",
paymentTerms: PaymentTerms.Net60,
deliveryAddress: {
street: "Sanayi Sitesi 5. Cadde No:23",
city: "Bursa",
state: "Bursa",
postalCode: "16000",
country: "Türkiye",
},
billingAddress: {
street: "Sanayi Sitesi 5. Cadde No:23",
city: "Bursa",
state: "Bursa",
postalCode: "16000",
country: "Türkiye",
},
items: [
{
id: "soi_13",
orderId: "so_8",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
description: "Hidrolik Silindir",
quantity: 10,
deliveredQuantity: 0,
unitId: "MT",
unit: mockMaterials.find((m) => m.id === "MT"),
unitPrice: 850.0,
totalAmount: 8500,
requestedDate: new Date("2024-10-12"),
confirmedDate: new Date("2024-10-10"),
status: SaleOrderItemStatusEnum.InProduction,
},
{
id: "soi_14",
orderId: "so_8",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
description: "Hidrolik Hortum 2m",
quantity: 50,
deliveredQuantity: 0,
unitId: "M3",
unit: mockMaterials.find((m) => m.id === "M3"),
unitPrice: 75.0,
totalAmount: 3750,
requestedDate: new Date("2024-10-12"),
confirmedDate: new Date("2024-10-10"),
status: SaleOrderItemStatusEnum.InProduction,
},
],
deliveries: [],
creationTime: new Date("2024-09-12"),
lastModificationTime: new Date("2024-09-13"),
},
{
id: "9",
orderNumber: "ORD-2024-009",
customerId: "6", // Otomotiv Parça A.Ş.
customer: mockBusinessParties.find((c) => c.id === "6"),
orderDate: new Date("2024-09-15"),
requestedDeliveryDate: new Date("2024-10-15"),
confirmedDeliveryDate: new Date("2024-10-12"),
status: SaleOrderStatusEnum.Confirmed,
subtotal: 185000,
taxAmount: 33300,
discountAmount: 9250,
totalAmount: 209050,
currency: "TRY",
paymentTerms: PaymentTerms.Net30,
deliveryAddress: {
street: "OSB 1. Cadde No:45",
city: "Kocaeli",
state: "Kocaeli",
postalCode: "41000",
country: "Türkiye",
},
billingAddress: {
street: "OSB 1. Cadde No:45",
city: "Kocaeli",
state: "Kocaeli",
postalCode: "41000",
country: "Türkiye",
},
items: [
{
id: "soi_15",
orderId: "so_9",
materialId: "5",
material: mockMaterials.find((m) => m.id === "5"),
description: "Amortisör Ön Sol",
quantity: 100,
deliveredQuantity: 0,
unitId: "M3",
unit: mockMaterials.find((m) => m.id === "M3"),
unitPrice: 320.0,
totalAmount: 32000,
requestedDate: new Date("2024-10-15"),
confirmedDate: new Date("2024-10-12"),
status: SaleOrderItemStatusEnum.Confirmed,
},
{
id: "soi_16",
orderId: "so_9",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
description: "Amortisör Ön Sağ",
quantity: 100,
deliveredQuantity: 0,
unitId: "M2",
unit: mockMaterials.find((m) => m.id === "M2"),
unitPrice: 320.0,
totalAmount: 32000,
requestedDate: new Date("2024-10-15"),
confirmedDate: new Date("2024-10-12"),
status: SaleOrderItemStatusEnum.Confirmed,
},
],
deliveries: [],
creationTime: new Date("2024-09-15"),
lastModificationTime: new Date("2024-09-16"),
},
{
id: "10",
orderNumber: "ORD-2024-010",
customerId: "6", // Teknoloji A.Ş.
customer: mockBusinessParties.find((c) => c.id === "6"),
orderDate: new Date("2024-09-18"),
requestedDeliveryDate: new Date("2024-10-18"),
confirmedDeliveryDate: new Date("2024-10-15"),
status: SaleOrderStatusEnum.Confirmed,
subtotal: 275000,
taxAmount: 49500,
discountAmount: 13750,
totalAmount: 310750,
currency: "TRY",
paymentTerms: PaymentTerms.Net30,
deliveryAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
billingAddress: {
street: "Teknoloji Caddesi No:100",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
items: [
{
id: "soi_17",
orderId: "so_10",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
description: "Server Bilgisayar",
quantity: 5,
deliveredQuantity: 0,
unitId: "M2",
unit: mockMaterials.find((m) => m.id === "M2"),
unitPrice: 12500.0,
totalAmount: 62500,
requestedDate: new Date("2024-10-18"),
confirmedDate: new Date("2024-10-15"),
status: SaleOrderItemStatusEnum.Confirmed,
},
{
id: "soi_18",
orderId: "so_10",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
description: "Network Switch 48 Port",
quantity: 10,
deliveredQuantity: 0,
unitId: "M2",
unit: mockMaterials.find((m) => m.id === "M2"),
unitPrice: 2500.0,
totalAmount: 25000,
requestedDate: new Date("2024-10-18"),
confirmedDate: new Date("2024-10-15"),
status: SaleOrderItemStatusEnum.Confirmed,
},
{
id: "soi_19",
orderId: "so_10",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
description: "UPS 5KVA",
quantity: 3,
deliveredQuantity: 0,
unitId: "M2",
unit: mockMaterials.find((m) => m.id === "M2"),
unitPrice: 4500.0,
totalAmount: 13500,
requestedDate: new Date("2024-10-18"),
confirmedDate: new Date("2024-10-15"),
status: SaleOrderItemStatusEnum.Confirmed,
},
],
deliveries: [],
creationTime: new Date("2024-09-18"),
lastModificationTime: new Date("2024-09-19"),
},
];

View file

@ -1,241 +0,0 @@
import { Team, TeamRoleEnum } from "../types/common";
import { TargetTypeEnum, TargetStatusEnum } from "../types/crm";
import { mockEmployees } from "./mockEmployees";
export const mockSalesTeams: Team[] = [
{
id: "team-001",
code: "ST-001",
name: "Kurumsal Satış Ekibi",
description:
"Büyük kurumsal müşteriler ve enterprise çözümler için satış ekibi",
managerId: "1",
manager: mockEmployees.find((emp) => emp.id === "1"),
members: [
{
id: "member-001",
teamId: "team-001",
employeeId: "2",
employee: mockEmployees.find((emp) => emp.id === "2"),
role: TeamRoleEnum.Lead,
joinDate: new Date("2024-01-15"),
isActive: true,
},
{
id: "member-002",
teamId: "team-001",
employeeId: "3",
employee: mockEmployees.find((emp) => emp.id === "3"),
role: TeamRoleEnum.Member,
joinDate: new Date("2024-02-01"),
isActive: true,
},
{
id: "member-003",
teamId: "team-001",
employeeId: "4",
employee: mockEmployees.find((emp) => emp.id === "4"),
role: TeamRoleEnum.Member,
joinDate: new Date("2024-03-10"),
isActive: true,
},
],
territories: [
{
id: "territory-001",
territoryCode: "TR-IST",
name: "İstanbul Anadolu",
description: "İstanbul Anadolu yakası kurumsal müşteriler",
region: "Marmara",
countries: ["Türkiye"],
cities: ["İstanbul"],
assignedTeamId: "team-001",
isActive: true,
},
{
id: "territory-002",
territoryCode: "TR-ANK",
name: "Ankara",
description: "Ankara bölgesi kurumsal müşteriler",
region: "İç Anadolu",
countries: ["Türkiye"],
cities: ["Ankara"],
assignedTeamId: "team-001",
isActive: true,
},
],
targets: [
{
id: "target-001",
teamId: "team-001",
targetPeriod: "2024-Q4",
targetType: TargetTypeEnum.Revenue,
targetValue: 5000000,
actualValue: 4200000,
currency: "TRY",
startDate: new Date("2024-10-01"),
endDate: new Date("2024-12-31"),
status: TargetStatusEnum.Active,
},
],
isActive: true,
creationTime: new Date("2024-01-01"),
lastModificationTime: new Date("2024-11-01"),
},
{
id: "team-002",
code: "ST-002",
name: "KOBİ Satış Ekibi",
description: "Küçük ve orta boy işletmeler için satış ekibi",
managerId: "5",
manager: mockEmployees.find((emp) => emp.id === "5"),
members: [
{
id: "member-004",
teamId: "team-002",
employeeId: "6",
employee: mockEmployees.find((emp) => emp.id === "6"),
role: TeamRoleEnum.Lead,
joinDate: new Date("2024-01-20"),
isActive: true,
},
{
id: "member-005",
teamId: "team-002",
employeeId: "7",
employee: mockEmployees.find((emp) => emp.id === "7"),
role: TeamRoleEnum.Member,
joinDate: new Date("2024-02-15"),
isActive: true,
},
{
id: "member-006",
teamId: "team-002",
employeeId: "8",
employee: mockEmployees.find((emp) => emp.id === "8"),
role: TeamRoleEnum.Member,
joinDate: new Date("2024-04-01"),
isActive: true,
},
{
id: "member-007",
teamId: "team-002",
employeeId: "9",
employee: mockEmployees.find((emp) => emp.id === "9"),
role: TeamRoleEnum.Member,
joinDate: new Date("2024-05-15"),
isActive: true,
},
],
territories: [
{
id: "territory-003",
territoryCode: "TR-IZM",
name: "İzmir",
description: "İzmir bölgesi KOBİ müşteriler",
region: "Ege",
countries: ["Türkiye"],
cities: ["İzmir", "Manisa", "Balıkesir"],
assignedTeamId: "team-002",
isActive: true,
},
{
id: "territory-004",
territoryCode: "TR-BUR",
name: "Bursa",
description: "Bursa ve çevre iller KOBİ müşteriler",
region: "Marmara",
countries: ["Türkiye"],
cities: ["Bursa", "Kocaeli", "Sakarya"],
assignedTeamId: "team-002",
isActive: true,
},
],
targets: [
{
id: "target-002",
teamId: "team-002",
targetPeriod: "2024-Q4",
targetType: TargetTypeEnum.Revenue,
targetValue: 3000000,
actualValue: 3150000,
currency: "TRY",
startDate: new Date("2024-10-01"),
endDate: new Date("2024-12-31"),
status: TargetStatusEnum.Active,
},
],
isActive: true,
creationTime: new Date("2024-01-05"),
lastModificationTime: new Date("2024-10-15"),
},
{
id: "team-003",
code: "ST-003",
name: "E-ticaret Satış Ekibi",
description: "Online satış kanalları ve e-ticaret platformları yönetimi",
managerId: "10",
manager: mockEmployees.find((emp) => emp.id === "10"),
members: [
{
id: "member-008",
teamId: "team-003",
employeeId: "1",
employee: mockEmployees.find((emp) => emp.id === "1"),
role: TeamRoleEnum.Lead,
joinDate: new Date("2024-03-01"),
isActive: true,
},
{
id: "member-009",
teamId: "team-003",
employeeId: "2",
employee: mockEmployees.find((emp) => emp.id === "2"),
role: TeamRoleEnum.Member,
joinDate: new Date("2024-03-15"),
isActive: true,
},
{
id: "member-010",
teamId: "team-003",
employeeId: "3",
employee: mockEmployees.find((emp) => emp.id === "3"),
role: TeamRoleEnum.Member,
joinDate: new Date("2024-04-10"),
isActive: true,
},
],
territories: [
{
id: "territory-005",
territoryCode: "TR-ONL",
name: "Online Türkiye",
description: "Türkiye geneli online satış kanalları",
region: "Online",
countries: ["Türkiye"],
cities: [],
assignedTeamId: "team-003",
isActive: true,
},
],
targets: [
{
id: "target-003",
teamId: "team-003",
targetPeriod: "2024-Q4",
targetType: TargetTypeEnum.Revenue,
targetValue: 2000000,
actualValue: 1800000,
currency: "TRY",
startDate: new Date("2024-10-01"),
endDate: new Date("2024-12-31"),
status: TargetStatusEnum.Active,
},
],
isActive: true,
creationTime: new Date("2024-02-15"),
lastModificationTime: new Date("2024-11-05"),
},
];
export default mockSalesTeams;

View file

@ -1,40 +0,0 @@
import { SerialStatusEnum } from "../types/mm";
import { mockMaterials } from "./mockMaterials";
export const mockSerialNumbers = [
{
id: "1",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
serialNumber: "SN2024001",
lotId: "1",
productionDate: new Date("2024-01-01"),
warrantyExpiryDate: new Date("2026-01-01"),
currentLocationId: "LOC-A01",
status: SerialStatusEnum.Available,
isActive: true,
},
{
id: "2",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
serialNumber: "SN2024002",
lotId: "1",
productionDate: new Date("2024-01-02"),
warrantyExpiryDate: new Date("2026-01-02"),
currentLocationId: "LOC-A02",
status: SerialStatusEnum.InUse,
isActive: true,
},
{
id: "3",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
serialNumber: "SN2024003",
productionDate: new Date("2024-01-03"),
warrantyExpiryDate: new Date("2025-01-03"),
currentLocationId: "LOC-B01",
status: SerialStatusEnum.Maintenance,
isActive: true,
},
];

View file

@ -1,95 +0,0 @@
import { WmStockItem, StockStatusEnum } from "../types/wm";
import { mockMaterials } from "./mockMaterials";
export const mockStockItems: WmStockItem[] = [
{
id: "1",
materialId: "1",
material: mockMaterials.find((mat) => mat.id === "1"),
warehouseId: "1",
zoneId: "1",
locationId: "3",
quantity: 50,
reservedQuantity: 10,
availableQuantity: 40,
unitId: "adet",
lotNumber: "LOT2024001",
serialNumber: undefined,
expiryDate: undefined,
receivedDate: new Date("2024-10-15"),
lastMovementDate: new Date("2024-11-15"),
status: StockStatusEnum.Available,
},
{
id: "2",
materialId: "2",
material: mockMaterials.find((mat) => mat.id === "2"),
warehouseId: "1",
zoneId: "2",
locationId: "4",
quantity: 25,
reservedQuantity: 5,
availableQuantity: 20,
unitId: "metre",
lotNumber: "LOT2024002",
serialNumber: undefined,
expiryDate: undefined,
receivedDate: new Date("2024-11-01"),
lastMovementDate: new Date("2024-11-20"),
status: StockStatusEnum.Available,
},
{
id: "3",
materialId: "3",
material: mockMaterials.find((mat) => mat.id === "3"),
warehouseId: "1",
zoneId: "2",
locationId: "1",
quantity: 150,
reservedQuantity: 0,
availableQuantity: 150,
unitId: "adet",
lotNumber: "LOT2024003",
serialNumber: undefined,
expiryDate: undefined,
receivedDate: new Date("2024-09-20"),
lastMovementDate: new Date("2024-10-25"),
status: StockStatusEnum.Available,
},
{
id: "4",
materialId: "4",
material: mockMaterials.find((mat) => mat.id === "4"),
warehouseId: "1",
zoneId: "2",
locationId: "2",
quantity: 30,
reservedQuantity: 8,
availableQuantity: 22,
unitId: "adet",
lotNumber: "LOT2024004",
serialNumber: undefined,
expiryDate: undefined,
receivedDate: new Date("2024-08-10"),
lastMovementDate: new Date("2024-11-18"),
status: StockStatusEnum.Available,
},
{
id: "5",
materialId: "5",
material: mockMaterials.find((mat) => mat.id === "5"),
warehouseId: "1",
zoneId: "1",
locationId: "2",
quantity: 5,
reservedQuantity: 0,
availableQuantity: 0,
unitId: "adet",
lotNumber: "LOT2024005",
serialNumber: undefined,
expiryDate: undefined,
receivedDate: new Date("2024-11-25"),
lastMovementDate: new Date("2024-11-25"),
status: StockStatusEnum.Quarantine,
},
];

View file

@ -1,303 +0,0 @@
import {
MmStockMovement,
MovementTypeEnum,
MovementStatusEnum,
} from "../types/mm";
import { mockLocations } from "./mockLocations";
import { mockMaterials } from "./mockMaterials";
import { mockUnits } from "./mockUnits";
import { mockWarehouses } from "./mockWarehouses";
import { mockZones } from "./mockZones";
// Unified mock data for all material movements - combines previous mockMovements and mockStockMovements
export const mockStockMovements: MmStockMovement[] = [
{
id: "1",
movementNumber: "GR-2024-001",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1")!,
movementType: MovementTypeEnum.GoodsReceipt,
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "2",
toZone: mockZones.find((z) => z.id === "2"),
toLocationId: "2",
toLocation: mockLocations.find((l) => l.id === "2"),
quantity: 100,
unitId: "KG",
unit: mockUnits.find((u) => u.id === "KG"),
lotNumber: "LOT-2024-001",
referenceDocument: "PO-2024-001",
referenceDocumentType: "Purchase Order",
referenceType: "Purchase Order",
movementDate: new Date("2024-01-15T10:30:00"),
description: "Satın alma girişi",
reason: "Satın alma girişi",
performedBy: "Mehmet Özkan",
approvedBy: "manager1",
status: MovementStatusEnum.Completed,
creationTime: new Date("2024-01-15T10:30:00"),
},
{
id: "5",
movementNumber: "GR-2024-001",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2")!,
movementType: MovementTypeEnum.GoodsReceipt,
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "1",
toZone: mockZones.find((z) => z.id === "1"),
toLocationId: "3",
toLocation: mockLocations.find((l) => l.id === "3"),
quantity: 200,
unitId: "MT",
unit: mockUnits.find((u) => u.id === "metre"),
lotNumber: "LOT-2024-005",
referenceDocument: "PO-2024-002",
referenceDocumentType: "Purchase Order",
referenceType: "Purchase Order",
movementDate: new Date("2024-11-20T08:30:00"),
description: "Hammadde girişi",
reason: "Hammadde girişi",
performedBy: "Ali Veli",
approvedBy: "manager2",
status: MovementStatusEnum.Completed,
creationTime: new Date("2024-11-20T08:30:00"),
},
{
id: "10",
movementNumber: "GR-2024-007",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1")!,
movementType: MovementTypeEnum.GoodsReceipt,
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "1",
toZone: mockZones.find((z) => z.id === "1"),
toLocationId: "1",
toLocation: mockLocations.find((l) => l.id === "1"),
quantity: 10,
unitId: "KG",
unit: mockUnits.find((u) => u.id === "KG"),
lotNumber: "LOT-2024-001",
referenceDocument: "RET-2024-001",
referenceDocumentType: "Return Order",
referenceType: "Return Order",
movementDate: new Date("2024-11-30T10:30:00"),
description: "Müşteri iadesi",
reason: "Müşteri iadesi",
performedBy: "İade Operatörü",
status: MovementStatusEnum.Planned,
creationTime: new Date("2024-11-30T09:00:00"),
},
{
id: "4",
movementNumber: "GR-2024-005",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2")!,
movementType: MovementTypeEnum.GoodsReceipt,
toWarehouseId: "2",
toWarehouse: mockWarehouses.find((w) => w.id === "2"),
toZoneId: "3",
toZone: mockZones.find((z) => z.id === "3"),
toLocationId: "LOC004",
toLocation: mockLocations.find((l) => l.id === "4"),
quantity: 5,
unitId: "M2",
unit: mockUnits.find((u) => u.id === "M2"),
referenceDocument: "ADJ-2024-001",
referenceDocumentType: "Stock Adjustment",
referenceType: "Stock Adjustment",
movementDate: new Date("2024-01-18T16:45:00"),
description: "Sayım farkı düzeltmesi",
reason: "Sayım farkı düzeltmesi",
performedBy: "Stok Kontrol",
approvedBy: "manager2",
status: MovementStatusEnum.Completed,
creationTime: new Date("2024-01-18T16:45:00"),
},
// Goods Issues
{
id: "2",
movementNumber: "GI-2024-001",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1")!,
movementType: MovementTypeEnum.GoodsIssue,
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "1",
toZone: mockZones.find((z) => z.id === "1"),
toLocationId: "1",
toLocation: mockLocations.find((l) => l.id === "1"),
quantity: 50,
unitId: "KG",
unit: mockUnits.find((u) => u.id === "KG"),
lotNumber: "LOT-2024-001",
referenceDocument: "SO-2024-001",
referenceDocumentType: "Sales Order",
referenceType: "Sales Order",
movementDate: new Date("2024-01-16T14:15:00"),
description: "Satış çıkışı",
reason: "Satış çıkışı",
performedBy: "Ayşe Yılmaz",
approvedBy: "manager1",
status: MovementStatusEnum.Completed,
creationTime: new Date("2024-01-16T14:15:00"),
},
{
id: "6",
movementNumber: "GI-2024-001",
materialId: "2",
material: mockMaterials.find((m) => m.id === "2")!,
movementType: MovementTypeEnum.GoodsIssue,
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "1",
toZone: mockZones.find((z) => z.id === "1"),
toLocationId: "3",
toLocation: mockLocations.find((l) => l.id === "3"),
quantity: 50,
unitId: "MT",
unit: mockUnits.find((u) => u.id === "KG"),
lotNumber: "LOT-2024-005",
referenceDocument: "WO-2024-001",
referenceDocumentType: "Work Order",
referenceType: "Work Order",
movementDate: new Date("2024-11-26T10:15:00"),
description: "Üretim için malzeme çıkışı",
reason: "Üretim için malzeme çıkışı",
performedBy: "Mehmet Üretici",
status: MovementStatusEnum.InProgress,
creationTime: new Date("2024-11-26T10:15:00"),
},
{
id: "9",
movementNumber: "GI-2024-009",
materialId: "4",
material: mockMaterials.find((m) => m.id === "4") || mockMaterials[0],
movementType: MovementTypeEnum.GoodsIssue,
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "1",
toZone: mockZones.find((z) => z.id === "1"),
toLocationId: "3",
toLocation: mockLocations.find((l) => l.id === "3"),
quantity: 100,
unitId: "ADET",
unit: mockUnits.find((u) => u.id === "ADET"),
referenceDocument: "WO-2024-002",
referenceDocumentType: "Work Order",
referenceType: "Work Order",
movementDate: new Date("2024-11-29T14:00:00"),
description: "Üretim tamamlama girişi",
reason: "Üretim tamamlama girişi",
performedBy: "Üretim Operatörü",
status: MovementStatusEnum.Completed,
creationTime: new Date("2024-11-29T14:00:00"),
},
{
id: "7",
movementNumber: "GI-2024-003",
materialId: "3",
material: mockMaterials.find((m) => m.id === "3")!,
movementType: MovementTypeEnum.GoodsIssue,
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "1",
toZone: mockZones.find((z) => z.id === "1"),
toLocationId: "3",
toLocation: mockLocations.find((l) => l.id === "3"),
quantity: 500,
unitId: "ADET",
unit: mockUnits.find((u) => u.id === "ADET"),
lotNumber: "LOT-2024-006",
referenceDocument: "MR-2024-001",
referenceDocumentType: "Material Request",
referenceType: "Material Request",
movementDate: new Date("2024-11-27T15:30:00"),
description: "Bakım için malzeme talebi",
reason: "Bakım için malzeme talebi",
performedBy: "Bakım Ekibi",
status: MovementStatusEnum.Planned,
creationTime: new Date("2024-11-25T09:00:00"),
},
// Transfers
{
id: "3",
movementNumber: "TR-2024-001",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1")!,
movementType: MovementTypeEnum.Transfer,
fromWarehouseId: "2",
fromWarehouse: mockWarehouses.find((w) => w.id === "2"),
fromZoneId: "3",
fromZone: mockZones.find((z) => z.id === "3"),
fromLocationId: "4",
fromLocation: mockLocations.find((l) => l.id === "4"),
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "2",
toZone: mockZones.find((z) => z.id === "2"),
toLocationId: "1",
toLocation: mockLocations.find((l) => l.id === "1"),
quantity: 25,
unitId: "KG",
unit: mockUnits.find((u) => u.id === "KG"),
lotNumber: "LOT-2024-001",
referenceDocument: "TR-2024-001",
referenceDocumentType: "Transfer Order",
referenceType: "Transfer Order",
movementDate: new Date("2024-01-17T09:00:00"),
description: "Depo transferi",
reason: "Depo transferi",
performedBy: "Fatma Demir",
approvedBy: "manager1",
status: MovementStatusEnum.Completed,
creationTime: new Date("2024-01-17T09:00:00"),
},
{
id: "8",
movementNumber: "TR-2024-002",
materialId: "1",
material: mockMaterials.find((m) => m.id === "1")!,
movementType: MovementTypeEnum.Transfer,
fromWarehouseId: "1",
fromWarehouse: mockWarehouses.find((w) => w.id === "1"),
fromZoneId: "1",
fromZone: mockZones.find((z) => z.id === "1"),
fromLocationId: "1",
fromLocation: mockLocations.find((l) => l.id === "1"),
toWarehouseId: "1",
toWarehouse: mockWarehouses.find((w) => w.id === "1"),
toZoneId: "1",
toZone: mockZones.find((z) => z.id === "1"),
toLocationId: "1",
toLocation: mockLocations.find((l) => l.id === "1"),
quantity: 15,
unitId: "KG",
unit: mockUnits.find((u) => u.id === "KG"),
lotNumber: "LOT-2024-001",
referenceDocument: "TR-2024-002",
referenceDocumentType: "Transfer Order",
referenceType: "Transfer Order",
movementDate: new Date("2024-11-28T11:00:00"),
description: "Şube deposuna transfer",
reason: "Şube deposuna transfer",
performedBy: "Transfer Operatörü",
status: MovementStatusEnum.InProgress,
creationTime: new Date("2024-11-28T10:00:00"),
},
];

View file

@ -1,12 +0,0 @@
import { MmUnit } from "../types/mm";
export const mockUnits: MmUnit[] = [
{ id: "KG", code: "KG", name: "Kilogram", isActive: true },
{ id: "ADET", code: "ADET", name: "Adet", isActive: true },
{ id: "LT", code: "LT", name: "Litre", isActive: true },
{ id: "MT", code: "MT", name: "Metre", isActive: true },
{ id: "M2", code: "M²", name: "Metrekare", isActive: true },
{ id: "M3", code: "M³", name: "Metreküp", isActive: true },
{ id: "PAKET", code: "PAKET", name: "Paket", isActive: true },
{ id: "KOLI", code: "KOLI", name: "Koli", isActive: true },
];

View file

@ -1,132 +0,0 @@
import { SecurityLevelEnum } from "../types/mrp";
import { WmWarehouse, WarehouseTypeEnum } from "../types/wm";
import { mockLocations } from "./mockLocations";
import { mockZones } from "./mockZones";
export const mockWarehouses: WmWarehouse[] = [
{
id: "1",
code: "WH001",
name: "Ana Hammadde Deposu",
description: "Üretim için gerekli hammaddelerin depolandığı ana depo",
address: {
street: "Organize Sanayi Bölgesi 1. Cadde No: 15",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
warehouseType: WarehouseTypeEnum.RawMaterials,
zones: mockZones.filter((zone) => zone.warehouseId === "1"),
locations: mockLocations.filter((location) => location.warehouseId === "1"),
isMainWarehouse: true,
capacity: 5000,
currentUtilization: 0,
isActive: true,
temperatureControlled: false,
managerId: 1,
securityLevel: SecurityLevelEnum.Medium,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "2",
code: "WH002",
name: "Mamul Deposu",
description: "Üretimi tamamlanmış mamullerin depolandığı alan",
address: {
street: "Organize Sanayi Bölgesi 1. Cadde No: 15",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
warehouseType: WarehouseTypeEnum.FinishedGoods,
zones: mockZones.filter((zone) => zone.warehouseId === "2"),
locations: mockLocations.filter((location) => location.warehouseId === "2"),
isMainWarehouse: false,
capacity: 3000,
isActive: true,
currentUtilization: 0,
temperatureControlled: false,
managerId: 1,
securityLevel: SecurityLevelEnum.Medium,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "3",
code: "WH003",
name: "Ara Ürün Deposu",
description: "İşlenmiş ara ürünlerin geçici depolandığı alan",
address: {
street: "Organize Sanayi Bölgesi 1. Cadde No: 15",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
warehouseType: WarehouseTypeEnum.WorkInProgress,
zones: mockZones.filter((zone) => zone.warehouseId === "3"),
locations: mockLocations.filter((location) => location.warehouseId === "3"),
isMainWarehouse: false,
capacity: 1500,
isActive: true,
currentUtilization: 0,
managerId: 2,
securityLevel: SecurityLevelEnum.High,
temperatureControlled: false,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "4",
code: "WH004",
name: "Karantina Deposu",
description: "Kalite kontrolü bekleyen ürünlerin depolandığı alan",
address: {
street: "Organize Sanayi Bölgesi 1. Cadde No: 15",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
warehouseType: WarehouseTypeEnum.Quarantine,
zones: mockZones.filter((zone) => zone.warehouseId === "4"),
locations: mockLocations.filter((location) => location.warehouseId === "4"),
isMainWarehouse: true,
capacity: 500,
isActive: true,
temperatureControlled: false,
currentUtilization: 0,
managerId: 3,
securityLevel: SecurityLevelEnum.Low,
creationTime: new Date(),
lastModificationTime: new Date(),
},
{
id: "5",
code: "WH005",
name: "İade Deposu",
description: "Müşterilerden dönen ürünlerin depolandığı alan",
address: {
street: "Organize Sanayi Bölgesi 1. Cadde No: 15",
city: "İstanbul",
state: "İstanbul",
postalCode: "34000",
country: "Türkiye",
},
warehouseType: WarehouseTypeEnum.Returns,
zones: mockZones.filter((zone) => zone.warehouseId === "5"),
locations: mockLocations.filter((location) => location.warehouseId === "5"),
isMainWarehouse: true,
capacity: 800,
isActive: true,
temperatureControlled: false,
currentUtilization: 0,
managerId: 4,
securityLevel: SecurityLevelEnum.Restricted,
creationTime: new Date(),
lastModificationTime: new Date(),
},
];

View file

@ -1,220 +0,0 @@
import { FiWaybill, WaybillTypeEnum, WaybillStatusEnum } from "../types/fi";
import { mockCurrentAccounts } from "./mockCurrentAccounts";
export const mockWaybills: FiWaybill[] = [
{
id: "1",
waybillNumber: "IRS2024001",
waybillType: WaybillTypeEnum.Outgoing,
currentAccountId: "1",
currentAccount: mockCurrentAccounts.find((acc) => acc.id === "1"),
waybillDate: new Date("2024-01-15"),
deliveryDate: new Date("2024-01-16"),
subtotal: 50300,
taxAmount: 9054,
discountAmount: 0,
totalAmount: 59354,
currency: "TRY",
status: WaybillStatusEnum.Delivered,
isInvoiced: false,
items: [
{
id: "1",
waybillId: "1",
description: "Laptop Dell Inspiron 15",
quantity: 2,
unit: "Adet",
unitPrice: 25000,
lineTotal: 59000,
discountRate: 0,
discountAmount: 0,
taxRate: 18,
taxAmount: 9000,
netAmount: 50000,
},
{
id: "2",
waybillId: "1",
description: "Wireless Mouse",
quantity: 2,
unit: "Adet",
unitPrice: 150,
lineTotal: 354,
discountRate: 0,
discountAmount: 0,
taxRate: 18,
taxAmount: 54,
netAmount: 300,
},
],
deliveryAddress: "Ataşehir Mah. Barbaros Cad. No:15 Ataşehir/İstanbul",
receiverName: "Ahmet Yılmaz",
receiverPhone: "+90 212 555 0101",
carrierCompany: "MNG Kargo",
trackingNumber: "MNG123456789",
notes: "Dikkatli taşınması gerekiyor.",
creationTime: new Date("2024-01-15T08:00:00"),
lastModificationTime: new Date("2024-01-16T14:30:00"),
},
{
id: "2",
waybillNumber: "IRS2024002",
waybillType: WaybillTypeEnum.Outgoing,
currentAccountId: "2",
currentAccount: mockCurrentAccounts.find((acc) => acc.id === "2"),
waybillDate: new Date("2024-01-16"),
deliveryDate: new Date("2024-01-17"),
subtotal: 15000,
taxAmount: 2700,
discountAmount: 0,
totalAmount: 17700,
currency: "TRY",
status: WaybillStatusEnum.Delivered,
isInvoiced: false,
items: [
{
id: "3",
waybillId: "2",
description: "Yazılım Lisansı - Erp Modülü",
quantity: 1,
unit: "Adet",
unitPrice: 15000,
lineTotal: 17700,
discountRate: 0,
discountAmount: 0,
taxRate: 18,
taxAmount: 2700,
netAmount: 15000,
},
],
deliveryAddress: "Kadıköy Mah. Bağdat Cad. No:45 Kadıköy/İstanbul",
receiverName: "Mehmet Demir",
receiverPhone: "+90 216 444 0202",
carrierCompany: "Yurtiçi Kargo",
trackingNumber: "YK987654321",
notes: "Dijital teslimat yapılacak.",
creationTime: new Date("2024-01-16T09:30:00"),
lastModificationTime: new Date("2024-01-17T16:00:00"),
},
{
id: "3",
waybillNumber: "IRS2024003",
waybillType: WaybillTypeEnum.Outgoing,
currentAccountId: "1",
currentAccount: mockCurrentAccounts.find((acc) => acc.id === "1"),
waybillDate: new Date("2024-01-17"),
deliveryDate: new Date("2024-01-18"),
subtotal: 10500,
taxAmount: 1890,
discountAmount: 0,
totalAmount: 12390,
currency: "TRY",
status: WaybillStatusEnum.Delivered,
isInvoiced: true,
invoiceId: "1",
items: [
{
id: "4",
waybillId: "3",
description: "Monitor 24 inch LED",
quantity: 3,
unit: "Adet",
unitPrice: 3500,
lineTotal: 12390,
discountRate: 0,
discountAmount: 0,
taxRate: 18,
taxAmount: 1890,
netAmount: 10500,
},
],
deliveryAddress: "Ataşehir Mah. Barbaros Cad. No:15 Ataşehir/İstanbul",
receiverName: "Ahmet Yılmaz",
receiverPhone: "+90 212 555 0101",
carrierCompany: "PTT Kargo",
trackingNumber: "PTT555666777",
notes: "Fatura kesilmiş, faturalandırıldı.",
creationTime: new Date("2024-01-17T10:00:00"),
lastModificationTime: new Date("2024-01-18T11:30:00"),
},
{
id: "4",
waybillNumber: "IRS2024004",
waybillType: WaybillTypeEnum.Outgoing,
currentAccountId: "2",
currentAccount: mockCurrentAccounts.find((acc) => acc.id === "2"),
waybillDate: new Date("2024-01-18"),
deliveryDate: new Date("2024-01-19"),
subtotal: 35000,
taxAmount: 6300,
discountAmount: 1750,
totalAmount: 39550,
currency: "TRY",
status: WaybillStatusEnum.Delivered,
isInvoiced: false,
items: [
{
id: "5",
waybillId: "4",
description: "Tablet Samsung Galaxy Tab",
quantity: 10,
unit: "Adet",
unitPrice: 3500,
lineTotal: 39550,
discountRate: 5,
discountAmount: 1750,
taxRate: 18,
taxAmount: 6300,
netAmount: 33250,
},
],
deliveryAddress: "Şişli Mah. Mecidiyeköy Cad. No:100 Şişli/İstanbul",
receiverName: "Fatma Kaya",
receiverPhone: "+90 212 777 0303",
carrierCompany: "Aras Kargo",
trackingNumber: "ARS111222333",
notes: "Toplu teslimat, %5 indirim uygulandı.",
creationTime: new Date("2024-01-18T14:00:00"),
lastModificationTime: new Date("2024-01-19T10:15:00"),
},
{
id: "5",
waybillNumber: "IRS2024005",
waybillType: WaybillTypeEnum.Incoming,
currentAccountId: "4",
currentAccount: mockCurrentAccounts.find((acc) => acc.id === "4"),
waybillDate: new Date("2024-01-19"),
deliveryDate: new Date("2024-01-20"),
subtotal: 20000,
taxAmount: 3600,
discountAmount: 0,
totalAmount: 23600,
currency: "TRY",
status: WaybillStatusEnum.Delivered,
isInvoiced: false,
items: [
{
id: "6",
waybillId: "5",
description: "Klavye Mekanik Gaming",
quantity: 20,
unit: "Adet",
unitPrice: 1000,
lineTotal: 23600,
discountRate: 0,
discountAmount: 0,
taxRate: 18,
taxAmount: 3600,
netAmount: 20000,
},
],
deliveryAddress: "Merkez Depo - Ümraniye Sanayi Sitesi",
receiverName: "Depo Sorumlusu",
receiverPhone: "+90 216 555 0505",
carrierCompany: "Horoz Lojistik",
trackingNumber: "HRZ777888999",
notes: "Stok girişi yapıldı.",
creationTime: new Date("2024-01-19T11:00:00"),
lastModificationTime: new Date("2024-01-20T09:00:00"),
},
];

View file

@ -1,28 +0,0 @@
import { PmMachineType } from '../types/pm'
export const mockWorkCenterMachineTypes: PmMachineType[] = [
{
id: '1',
code: 'CNC',
name: 'CNC Makineleri',
isActive: true,
},
{
id: '2',
code: 'COMP',
name: 'Kompresörler',
isActive: true,
},
{
id: '3',
code: 'CONV',
name: 'Konveyörler',
isActive: true,
},
{
id: '4',
code: 'WELD',
name: 'Kaynak Makineleri',
isActive: true,
},
]

View file

@ -1,356 +0,0 @@
import { CriticalityLevelEnum, PmWorkCenter, WorkCenterStatusEnum } from '../types/pm'
import { mockWorkCenterMachineTypes } from './mockWorkCenterMachineTypes'
export const mockWorkCenters: PmWorkCenter[] = [
{
id: '1',
code: 'CNC-001',
name: 'CNC Torna Tezgahı',
description: 'Yüksek hassasiyetli CNC torna tezgahı',
manufacturer: 'HAAS Automation',
model: 'ST-30',
serialNumber: 'SN123456789',
installationDate: new Date('2022-03-15'),
warrantyExpiry: new Date('2025-03-15'),
location: 'Atölye A - Hat 1',
departmentId: '1',
status: WorkCenterStatusEnum.Operational,
criticality: CriticalityLevelEnum.High,
specifications: [
{
id: 'SPEC001',
workCenterId: 'EQP001',
specificationName: 'Max Çap',
specificationValue: '300',
unit: 'mm',
isRequired: true,
},
{
id: 'SPEC002',
workCenterId: 'EQP001',
specificationName: 'Motor Gücü',
specificationValue: '15',
unit: 'kW',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2022-03-15'),
lastModificationTime: new Date('2024-01-15'),
capacity: 8,
costPerHour: 75,
setupTime: 15,
machineTypeId: '1',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '1')!,
},
{
id: '2',
code: 'COMP-001',
name: 'Hava Kompresörü',
description: 'Endüstriyel hava kompresörü sistemi',
manufacturer: 'Atlas Copco',
model: 'GA55VSD+',
serialNumber: 'AC987654321',
installationDate: new Date('2021-08-20'),
warrantyExpiry: new Date('2024-08-20'),
location: 'Kompresör Odası',
departmentId: '2',
status: WorkCenterStatusEnum.UnderMaintenance,
criticality: CriticalityLevelEnum.Critical,
specifications: [
{
id: 'SPEC003',
workCenterId: 'EQP002',
specificationName: 'Basınç',
specificationValue: '8.5',
unit: 'bar',
isRequired: true,
},
{
id: 'SPEC004',
workCenterId: 'EQP002',
specificationName: 'Kapasite',
specificationValue: '55',
unit: 'kW',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2021-08-20'),
lastModificationTime: new Date('2024-02-01'),
costPerHour: 85,
setupTime: 20,
machineTypeId: '2',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '2')!,
capacity: 8,
},
{
id: '3',
code: 'CONV-001',
name: 'Konveyör Sistemi',
description: 'Ana hat konveyör sistemi',
manufacturer: 'Siemens',
model: 'SIMATIC S7-1500',
serialNumber: 'SM112233445',
installationDate: new Date('2020-11-10'),
location: 'Ana Üretim Hattı',
departmentId: '3',
status: WorkCenterStatusEnum.OutOfOrder,
criticality: CriticalityLevelEnum.Medium,
specifications: [
{
id: 'SPEC005',
workCenterId: 'EQP003',
specificationName: 'Hız',
specificationValue: '2.5',
unit: 'm/s',
isRequired: true,
},
{
id: 'SPEC006',
workCenterId: 'EQP003',
specificationName: 'Yük Kapasitesi',
specificationValue: '500',
unit: 'kg',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2020-11-10'),
lastModificationTime: new Date('2024-02-05'),
costPerHour: 85,
setupTime: 20,
machineTypeId: '3',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '3')!,
capacity: 8,
},
{
id: '4',
code: 'KELD-001',
name: 'Kaynak Makinesi',
description: 'Otomatik robot kaynak sistemi',
manufacturer: 'KUKA',
model: 'KR 60-3',
serialNumber: 'KU556677889',
installationDate: new Date('2023-01-15'),
warrantyExpiry: new Date('2026-01-15'),
location: 'Kaynak Atölyesi',
departmentId: '4',
status: WorkCenterStatusEnum.Operational,
criticality: CriticalityLevelEnum.High,
specifications: [
{
id: 'SPEC007',
workCenterId: 'EQP004',
specificationName: 'Erişim Mesafesi',
specificationValue: '2033',
unit: 'mm',
isRequired: true,
},
{
id: 'SPEC008',
workCenterId: 'EQP004',
specificationName: 'Taşıma Kapasitesi',
specificationValue: '60',
unit: 'kg',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2023-01-15'),
lastModificationTime: new Date('2024-01-20'),
costPerHour: 85,
setupTime: 20,
machineTypeId: '3',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '3')!,
capacity: 8,
},
{
id: '5',
code: 'WELL-001',
name: 'Yıkama Makinesi',
description: 'Otomatik robot kaynak sistemi',
manufacturer: 'KUKA',
model: 'KR 60-3',
serialNumber: 'KU556677889',
installationDate: new Date('2023-01-15'),
warrantyExpiry: new Date('2026-01-15'),
location: 'Kaynak Atölyesi',
departmentId: '4',
status: WorkCenterStatusEnum.Operational,
criticality: CriticalityLevelEnum.High,
specifications: [
{
id: 'SPEC007',
workCenterId: 'EQP004',
specificationName: 'Erişim Mesafesi',
specificationValue: '2033',
unit: 'mm',
isRequired: true,
},
{
id: 'SPEC008',
workCenterId: 'EQP004',
specificationName: 'Taşıma Kapasitesi',
specificationValue: '60',
unit: 'kg',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2023-01-15'),
lastModificationTime: new Date('2024-01-20'),
costPerHour: 85,
setupTime: 20,
machineTypeId: '4',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '4')!,
capacity: 8,
},
{
id: '6',
code: 'KELD-001',
name: 'Ram Makinesi',
description: 'Otomatik robot kaynak sistemi',
manufacturer: 'KUKA',
model: 'KR 60-3',
serialNumber: 'KU556677889',
installationDate: new Date('2023-01-15'),
warrantyExpiry: new Date('2026-01-15'),
location: 'Kaynak Atölyesi',
departmentId: '4',
status: WorkCenterStatusEnum.Operational,
criticality: CriticalityLevelEnum.High,
specifications: [
{
id: 'SPEC007',
workCenterId: 'EQP004',
specificationName: 'Erişim Mesafesi',
specificationValue: '2033',
unit: 'mm',
isRequired: true,
},
{
id: 'SPEC008',
workCenterId: 'EQP004',
specificationName: 'Taşıma Kapasitesi',
specificationValue: '60',
unit: 'kg',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2023-01-15'),
lastModificationTime: new Date('2024-01-20'),
costPerHour: 85,
setupTime: 20,
machineTypeId: '4',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '4')!,
capacity: 8,
},
{
id: '7',
code: 'WEID-001',
name: 'Sarma Makinesi',
description: 'Otomatik robot kaynak sistemi',
manufacturer: 'KUKA',
model: 'KR 60-3',
serialNumber: 'KU556677889',
installationDate: new Date('2023-01-15'),
warrantyExpiry: new Date('2026-01-15'),
location: 'Kaynak Atölyesi',
departmentId: '4',
status: WorkCenterStatusEnum.Operational,
criticality: CriticalityLevelEnum.High,
specifications: [
{
id: 'SPEC007',
workCenterId: 'EQP004',
specificationName: 'Erişim Mesafesi',
specificationValue: '2033',
unit: 'mm',
isRequired: true,
},
{
id: 'SPEC008',
workCenterId: 'EQP004',
specificationName: 'Taşıma Kapasitesi',
specificationValue: '60',
unit: 'kg',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2023-01-15'),
lastModificationTime: new Date('2024-01-20'),
costPerHour: 85,
setupTime: 20,
machineTypeId: '1',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '1')!,
capacity: 8,
},
{
id: '8',
code: 'KEL-001',
name: 'Robot Kaynak Makinesi',
description: 'Otomatik robot kaynak sistemi',
manufacturer: 'KUKA',
model: 'KR 60-3',
serialNumber: 'KU556677889',
installationDate: new Date('2023-01-15'),
warrantyExpiry: new Date('2026-01-15'),
location: 'Kaynak Atölyesi',
departmentId: '4',
status: WorkCenterStatusEnum.Operational,
criticality: CriticalityLevelEnum.High,
specifications: [
{
id: 'SPEC007',
workCenterId: 'EQP004',
specificationName: 'Erişim Mesafesi',
specificationValue: '2033',
unit: 'mm',
isRequired: true,
},
{
id: 'SPEC008',
workCenterId: 'EQP004',
specificationName: 'Taşıma Kapasitesi',
specificationValue: '60',
unit: 'kg',
isRequired: true,
},
],
maintenancePlans: [],
workOrders: [],
downTimeHistory: [],
isActive: true,
creationTime: new Date('2023-01-15'),
lastModificationTime: new Date('2024-01-20'),
costPerHour: 85,
setupTime: 20,
machineTypeId: '1',
machineType: mockWorkCenterMachineTypes.find((mt) => mt.id === '1')!,
capacity: 8,
},
]

View file

@ -1,217 +0,0 @@
import { MrpWorkOrder } from "../types/mrp";
import { WorkOrderStatusEnum } from "../types/pm";
import { mockMaterials } from "./mockMaterials";
import { mockOperations } from "./mockOperations";
import { mockProductionOrders } from "./mockProductionOrders";
import { mockWorkCenters } from "./mockWorkCenters";
export const mockWorkOrders: MrpWorkOrder[] = [
{
id: "WO-2024-001",
workOrderNumber: "WO-2024-001",
productionOrderId: mockProductionOrders[0].id,
productionOrder: mockProductionOrders[0],
operationId: "1",
operation: mockOperations.find((op) => op.id === "1"),
materialId: "1",
material: mockMaterials.find((m) => m.id === "1"),
sequence: 1,
plannedStartDate: new Date("2024-01-16"),
plannedEndDate: new Date("2024-01-18"),
plannedQuantity: 50,
confirmedQuantity: 30,
scrapQuantity: 1,
workCenterId: "1",
workCenter: mockWorkCenters.find((wc) => wc.id === "1"),
assignedOperators: ["1", "2"],
setupTime: 60,
processTime: 240,
status: WorkOrderStatusEnum.InProgress,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-16"),
},
{
id: "WO-2024-002",
workOrderNumber: "WO-2024-002",
productionOrderId: mockProductionOrders[0].id,
productionOrder: mockProductionOrders[0],
operationId: "2",
operation: mockOperations.find((op) => op.id === "2"),
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
sequence: 2,
plannedStartDate: new Date("2024-01-18"),
plannedEndDate: new Date("2024-01-20"),
plannedQuantity: 50,
confirmedQuantity: 35,
scrapQuantity: 1,
workCenterId: "2",
workCenter: mockWorkCenters.find((wc) => wc.id === "2"),
assignedOperators: ["3"],
setupTime: 45,
processTime: 180,
status: WorkOrderStatusEnum.Completed,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-20"),
},
{
id: "WO-2024-003",
workOrderNumber: "WO-2024-003",
productionOrderId: mockProductionOrders[1].id,
productionOrder: mockProductionOrders[1],
operationId: "3",
operation: mockOperations.find((op) => op.id === "3"),
materialId: "3",
material: mockMaterials.find((m) => m.id === "3"),
sequence: 1,
plannedStartDate: new Date("2024-02-01"),
plannedEndDate: new Date("2024-02-05"),
plannedQuantity: 25,
confirmedQuantity: 0,
scrapQuantity: 0,
workCenterId: "3",
workCenter: mockWorkCenters.find((wc) => wc.id === "3"),
assignedOperators: ["4"],
setupTime: 30,
processTime: 120,
status: WorkOrderStatusEnum.Created,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-25"),
lastModificationTime: new Date("2024-02-01"),
},
{
id: "WO-2024-004",
workOrderNumber: "WO-2024-004",
productionOrderId: mockProductionOrders[1].id,
productionOrder: mockProductionOrders[1],
operationId: "4",
operation: mockOperations.find((op) => op.id === "4"),
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
sequence: 2,
plannedStartDate: new Date("2024-02-05"),
plannedEndDate: new Date("2024-02-10"),
plannedQuantity: 25,
confirmedQuantity: 0,
scrapQuantity: 0,
workCenterId: "1",
workCenter: mockWorkCenters.find((wc) => wc.id === "1"),
assignedOperators: ["5", "6"],
setupTime: 40,
processTime: 150,
status: WorkOrderStatusEnum.Released,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-25"),
lastModificationTime: new Date("2024-02-05"),
},
{
id: "WO-2024-005",
workOrderNumber: "WO-2024-005",
productionOrderId: mockProductionOrders[0].id,
productionOrder: mockProductionOrders[0],
operationId: "5",
operation: mockOperations.find((op) => op.id === "5"),
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
sequence: 3,
plannedStartDate: new Date("2024-01-20"),
plannedEndDate: new Date("2024-01-25"),
plannedQuantity: 20,
confirmedQuantity: 0,
scrapQuantity: 0,
workCenterId: "4",
workCenter: mockWorkCenters.find((wc) => wc.id === "4"),
assignedOperators: ["7"],
setupTime: 20,
processTime: 60,
status: WorkOrderStatusEnum.Created,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-20"),
},
{
id: "WO-2024-006",
workOrderNumber: "WO-2024-006",
productionOrderId: mockProductionOrders[1].id,
productionOrder: mockProductionOrders[1],
operationId: "1",
operation: mockOperations.find((op) => op.id === "1"),
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
sequence: 3,
plannedStartDate: new Date("2024-02-10"),
plannedEndDate: new Date("2024-02-15"),
plannedQuantity: 10,
confirmedQuantity: 0,
scrapQuantity: 0,
workCenterId: "5",
workCenter: mockWorkCenters.find((wc) => wc.id === "5"),
assignedOperators: ["8"],
setupTime: 15,
processTime: 45,
status: WorkOrderStatusEnum.Created,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-25"),
lastModificationTime: new Date("2024-02-10"),
},
{
id: "WO-2024-007",
workOrderNumber: "WO-2024-007",
productionOrderId: mockProductionOrders[0].id,
productionOrder: mockProductionOrders[0],
operationId: "2",
operation: mockOperations.find((op) => op.id === "2"),
materialId: "4",
material: mockMaterials.find((m) => m.id === "4"),
sequence: 4,
plannedStartDate: new Date("2024-01-25"),
plannedEndDate: new Date("2024-01-30"),
plannedQuantity: 10,
confirmedQuantity: 0,
scrapQuantity: 0,
workCenterId: "7",
workCenter: mockWorkCenters.find((wc) => wc.id === "7"),
assignedOperators: ["9"],
setupTime: 10,
processTime: 30,
status: WorkOrderStatusEnum.Cancelled,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-10"),
lastModificationTime: new Date("2024-01-25"),
},
{
id: "WO-2024-008",
workOrderNumber: "WO-2024-008",
productionOrderId: mockProductionOrders[1].id,
productionOrder: mockProductionOrders[1],
operationId: "3",
operation: mockOperations.find((op) => op.id === "3"),
materialId: "2",
material: mockMaterials.find((m) => m.id === "2"),
sequence: 4,
plannedStartDate: new Date("2024-02-15"),
plannedEndDate: new Date("2024-02-20"),
plannedQuantity: 5,
confirmedQuantity: 0,
scrapQuantity: 0,
workCenterId: "8",
workCenter: mockWorkCenters.find((wc) => wc.id === "8"),
assignedOperators: ["10"],
setupTime: 10,
processTime: 30,
status: WorkOrderStatusEnum.Created,
confirmations: [],
qualityChecks: [],
creationTime: new Date("2024-01-25"),
lastModificationTime: new Date("2024-02-15"),
},
];

View file

@ -1,40 +0,0 @@
import { WmZone, ZoneTypeEnum } from "../types/wm";
export const mockZones: WmZone[] = [
{
id: "1",
warehouseId: "1",
zoneCode: "Z001",
name: "Giriş Bölgesi",
description: "Malzeme kabul bölgesi",
zoneType: ZoneTypeEnum.Receiving,
temperature: 20,
humidity: 45,
locations: [],
isActive: true,
},
{
id: "2",
warehouseId: "1",
zoneCode: "Z002",
name: "Ana Depolama",
description: "Ana depolama alanı",
zoneType: ZoneTypeEnum.Storage,
temperature: 18,
humidity: 40,
locations: [],
isActive: true,
},
{
id: "3",
warehouseId: "2",
zoneCode: "Z003",
name: "Sevkiyat Hazırlık",
description: "Sevkiyat hazırlık alanı",
zoneType: ZoneTypeEnum.Shipping,
temperature: 22,
humidity: 50,
locations: [],
isActive: true,
},
];

View file

@ -1,5 +1,5 @@
import { Address, BankAccount } from '@/types/common'
import {
Address,
EmployeeStatusEnum,
EmploymentTypeEnum,
GenderEnum,
@ -14,6 +14,7 @@ import {
LeaveTypeEnum,
MaritalStatusEnum,
} from '@/types/hr'
import { PriorityEnum } from '@/types/intranet'
export interface IntranetDashboardDto {
events: EventDto[]
@ -30,7 +31,7 @@ export interface IntranetDashboardDto {
overtimes: OvertimeDto[]
surveys: SurveyDto[]
socialPosts: SocialPostDto[]
// priorityTasks: TaskDto[]
tasks: ProjectTaskDto[]
}
// Etkinlik
@ -59,6 +60,36 @@ export interface EventCommentDto {
likes: number
}
export enum BankAccountTypeEnum {
Current = 'CURRENT', // Vadesiz
Deposit = 'DEPOSIT', // Vadeli
Credit = 'CREDIT', // Kredi
Foreign = 'FOREIGN', // Yabancı Para
}
// Bank Management Types
export interface BankAccount {
// Banka Hesabı
id: string
accountCode: string
bankName: string
branchName: string
accountNumber: string
iban: string
accountType: BankAccountTypeEnum
currency: string
balance: number
overdraftLimit: number
dailyTransferLimit: number
isActive: boolean
contactPerson?: string
phoneNumber?: string
swiftCode?: string
isDefault: boolean
creationTime: Date
lastModificationTime: Date
}
export interface EmployeeDto {
// İnsan Kaynakları Çalışanı
id: string
@ -283,6 +314,26 @@ export interface MealDto {
materials: string[]
}
// İnsan Kaynakları Fazla Mesai
export interface ProjectTaskDto {
id: string
name: string
description: string
priority: PriorityEnum
status?: string
employeeId?: string
employee: EmployeeDto
startDate: Date
endDate: Date
progress: number
isActive: boolean
}
// İnsan Kaynakları Fazla Mesai
export interface OvertimeDto {
id: string

View file

@ -1,183 +1,3 @@
import { BankAccountTypeEnum } from './fi'
import {
CrmActivity,
CustomerSegmentEnum,
CustomerTypeEnum,
CrmOpportunity,
CrmSalesOrder,
CrmSalesTarget,
CrmTerritory,
} from './crm'
import { SupplierCardTypeEnum, MmSupplierPerformance, SupplierTypeEnum } from './mm'
import { EmployeeDto } from '@/proxy/intranet/models'
export interface DashboardStats {
// Gösterge Paneli İstatistikleri
totalMaterials: number
criticalStock: number
lowStock: number
pendingOrders: number
maintenanceDue: number
activeProjects: number
totalRevenue: number
monthlyGrowth: number
totalEmployees: number
openOpportunities: number
pendingPurchaseRequests: number
}
export interface BusinessParty {
// İş Ortağı (Müşteri/Satıcı)
id: string
code: string
name: string
address?: Address
taxNumber?: string
paymentTerms: PaymentTerms
currency: string
creditLimit: number
isActive: boolean
creationTime: Date
lastModificationTime: Date
partyType: PartyType
primaryContact?: Contact
contacts?: Contact[]
industry?: BusinessPartyIndustryEnum
email?: string
phoneNumber?: string
website?: string
lastOrderDate?: Date
status?: BusinessPartyStatusEnum
//Customera özgü alanlar
customerType?: CustomerTypeEnum
registrationNumber?: string
customerSegment?: CustomerSegmentEnum
assignedSalesRep?: string
teamId?: string
team?: Team
totalRevenue?: number
averageOrderValue?: number
lifetimeValue?: number
opportunities?: CrmOpportunity[]
orders?: CrmSalesOrder[]
activities?: CrmActivity[]
// Suppliera özgü alanlar
supplierType?: SupplierTypeEnum
cardNumber?: string
cardType?: SupplierCardTypeEnum
validFrom?: Date
validTo?: Date
currentBalance?: number
discountRate?: number
specialConditions?: string[]
performanceMetrics?: MmSupplierPerformance
certifications?: string[]
bankAccounts?: BankAccount[]
}
export enum BusinessPartyIndustryEnum {
// İş Ortağı Endüstrisi
Technology = 'TECHNOLOGY', // Teknoloji
Healthcare = 'HEALTHCARE', // Sağlık
Finance = 'FINANCE', // Finans
Retail = 'RETAIL', // Perakende
Manufacturing = 'MANUFACTURING', // Üretim
Education = 'EDUCATION', // Eğitim
Construction = 'CONSTRUCTION', // İnşaat
Hospitality = 'HOSPITALITY', // Konaklama
Transportation = 'TRANSPORTATION', // Ulaşım
RealEstate = 'REAL_ESTATE', // Emlak
Other = 'OTHER', // Diğer
}
export enum BusinessPartyStatusEnum {
// İş Ortağı Durumu
Prospect = 'PROSPECT', // Potansiyel
Active = 'ACTIVE', // Aktif
Inactive = 'INACTIVE', // Pasif
Blocked = 'BLOCKED', // Engellenmiş
}
export interface Team {
// Takım
id: string
code: string
name: string
description?: string
managerId: string
manager?: EmployeeDto
members: TeamMember[]
territories?: CrmTerritory[]
targets?: CrmSalesTarget[]
specializations?: string[]
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface TeamMember {
// Takım Üyesi
id: string
teamId: string
employeeId: string
employee?: EmployeeDto
role: TeamRoleEnum
joinDate: Date
isActive: boolean
}
export interface Contact {
// İletişim
id: string
customerId?: string
firstName: string
lastName: string
name: string
title?: string
department?: string
email: string
phoneNumber?: string
mobileNumber?: string
isPrimary: boolean
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface Address {
// Adres
country: string
state: string
city: string
street: string
postalCode: string
}
// Bank Management Types
export interface BankAccount {
// Banka Hesabı
id: string
accountCode: string
bankName: string
branchName: string
accountNumber: string
iban: string
accountType: BankAccountTypeEnum
currency: string
balance: number
overdraftLimit: number
dailyTransferLimit: number
isActive: boolean
contactPerson?: string
phoneNumber?: string
swiftCode?: string
isDefault: boolean
creationTime: Date
lastModificationTime: Date
}
export interface WidgetGroupDto {
// Widget Grubu
colGap?: number
@ -199,40 +19,4 @@ export interface WidgetEditDto {
icon: string
subTitle: string
onClick: string
}
export enum TeamRoleEnum {
// Takım Rolü
Member = 'MEMBER', // Üye
Lead = 'LEAD', // Lider
Manager = 'MANAGER', // Yönetici
Specialist = 'SPECIALIST', // Uzman
}
export enum PartyType {
// İş Ortağı Türü
Customer = 'CUSTOMER', // Müşteri
Supplier = 'SUPPLIER', // Tedarikçi
Both = 'BOTH', // Her İkisi
Other = 'OTHER', // Diğer
}
export enum PaymentTerms {
// Ödeme Koşulları
Net15 = 'NET15', // 15 Gün
Net30 = 'NET30', // 30 Gün
Net45 = 'NET45', // 45 Gün
Net60 = 'NET60', // 60 Gün
Net90 = 'NET90', // 90 Gün
COD = 'COD', // Kapıda Ödeme
Prepaid = 'PREPAID', // Peşin
Cash = 'CASH', // Nakit
}
export enum PriorityEnum {
// Öncelik
Low = 'LOW', // Düşük
Normal = 'NORMAL', // Normal
High = 'HIGH', // Yüksek
Urgent = 'URGENT', // Acil
}
}

View file

@ -1,275 +0,0 @@
import { EmployeeDto } from '@/proxy/intranet/models'
import { Address, BusinessParty, Contact, PaymentTerms, PriorityEnum } from './common'
import { MmDelivery, MmMaterial, MmUnit } from './mm'
export interface CrmSalesOrder {
// Satış Siparişi
id: string
orderNumber: string
customerId: string
customer?: BusinessParty
orderDate: Date
requestedDeliveryDate: Date
confirmedDeliveryDate?: Date
status: SaleOrderStatusEnum
subtotal: number
taxAmount: number
discountAmount: number
totalAmount: number
currency: string
paymentTerms: PaymentTerms
deliveryTerms?: string
deliveryAddress: Address
billingAddress: Address
exchangeRate?: number
discountRate?: number
taxRate?: number
specialInstructions?: string
items: CrmSalesOrderItem[]
deliveries: MmDelivery[]
notes?: string
creationTime: Date
lastModificationTime: Date
}
export interface CrmSalesOrderItem {
// Satış Sipariş Kalemi
id: string
orderId: string
materialId?: string
material?: MmMaterial
description: string
quantity: number
deliveredQuantity: number
unitPrice: number
totalAmount: number
unitId: string
unit?: MmUnit
discountRate?: number
discountAmount?: number
taxRate?: number
taxAmount?: number
notes?: string
requestedDate: Date
confirmedDate?: Date
status: SaleOrderItemStatusEnum
}
export interface CrmTerritory {
// Sales Bölgesi
id: string
territoryCode: string
name: string
description?: string
region: string
countries: string[]
cities: string[]
assignedTeamId?: string
assignedSalesRep?: string
isActive: boolean
}
export interface CrmOpportunity {
// Fırsat
id: string
opportunityNumber: string
title: string
description?: string
customerId: string
customer?: BusinessParty
contactId?: string
contact?: Contact
stage: OpportunityStageEnum
probability: number
estimatedValue: number
currency: string
expectedCloseDate: Date
actualCloseDate?: Date
assignedTo: string
assigned?: EmployeeDto
teamId?: string
leadSource: LeadSourceEnum
campaignId?: string
status: OpportunityStatusEnum
lostReason?: CrmLostReason
activities: CrmActivity[]
competitors: CrmCompetitor[]
creationTime: Date
lastModificationTime: Date
}
export interface CrmActivity {
// Aktivite
id: string
activityType: CrmActivityTypeEnum
subject: string
description?: string
customerId?: string
customer?: BusinessParty
opportunityId?: string
opportunity?: CrmOpportunity
contactId?: string
contact?: Contact
activityDate: Date
startTime?: Date
endTime?: Date
duration?: number // minutes
assignedTo: string
assigned?: EmployeeDto
participants: string[]
status: ActivityStatusEnum
priority: PriorityEnum
followUpDate?: Date
followUpActivity?: string
outcome?: string
nextSteps?: string
creationTime: Date
lastModificationTime: Date
}
export interface CrmCompetitor {
// Rakip
id: string
name: string
website?: string
strengths: string[]
weaknesses: string[]
marketShare?: number
isActive: boolean
}
export interface CrmLostReason {
// Kaybedilme Nedeni
id: string
code: string
name: string
description?: string
category: LostReasonCategoryEnum
isActive: boolean
}
export interface CrmSalesTarget {
// Satış Hedefi
id: string
teamId?: string
employeeId?: string
targetPeriod: string
targetType: TargetTypeEnum
targetValue: number
actualValue: number
currency: string
startDate: Date
endDate: Date
status: TargetStatusEnum
}
export enum CustomerTypeEnum {
// Müşteri Türü
Individual = 'INDIVIDUAL', // Bireysel
Company = 'COMPANY', // Şirket
Government = 'GOVERNMENT', // Devlet
NonProfit = 'NON_PROFIT', // Kar Amacı Gütmeyen
}
export enum CustomerSegmentEnum {
// Müşteri Segmenti
Enterprise = 'ENTERPRISE', // Kurumsal
SMB = 'SMB', // KOBİ
Startup = 'STARTUP', // Yeni Kuruluş
Government = 'GOVERNMENT', // Devlet
}
export enum OpportunityStageEnum {
// Fırsat Aşaması
Qualification = 'QUALIFICATION', // Nitelik
NeedsAnalysis = 'NEEDS_ANALYSIS', // İhtiyaç Analizi
Proposal = 'PROPOSAL', // Teklif
Negotiation = 'NEGOTIATION', // Müzakere
ClosedWon = 'CLOSED_WON', // Kazanıldı
ClosedLost = 'CLOSED_LOST', // Kaybedildi
}
export enum OpportunityStatusEnum {
// Fırsat Durumu
Open = 'OPEN', // Açık
Won = 'WON', // Kazanıldı
Lost = 'LOST', // Kaybedildi
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum LeadSourceEnum {
// Lead Kaynağı
Website = 'WEBSITE', // Web Sitesi
Referral = 'REFERRAL', // Tavsiye
Campaign = 'CAMPAIGN', // Kampanya
Trade_Show = 'TRADE_SHOW', // Fuar
Cold_Call = 'COLD_CALL', // Soğuk Arama
Social_Media = 'SOCIAL_MEDIA', // Sosyal Medya
Partner = 'PARTNER', // İş Ortağı
}
export enum SaleOrderStatusEnum {
// Satış Siparişi Durumu
Draft = 'DRAFT', // Taslak
Confirmed = 'CONFIRMED', // Onaylandı
InProduction = 'IN_PRODUCTION', // Üretimde
Ready = 'READY', // Hazır
Shipped = 'SHIPPED', // Gönderildi
Delivered = 'DELIVERED', // Teslim Edildi
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum SaleOrderItemStatusEnum {
// Satış Sipariş Kalemi Durumu
Pending = 'PENDING', // Beklemede
Confirmed = 'CONFIRMED', // Onaylandı
InProduction = 'IN_PRODUCTION', // Üretimde
Ready = 'READY', // Hazır
Shipped = 'SHIPPED', // Gönderildi
Delivered = 'DELIVERED', // Teslim Edildi
}
export enum CrmActivityTypeEnum {
// Aktivite Türü
Call = 'CALL', // Telefon
Email = 'EMAIL', // E-posta
Meeting = 'MEETING', // Toplantı
Task = 'TASK', // Görev
Note = 'NOTE', // Not
Demo = 'DEMO', // Demo
Proposal = 'PROPOSAL', // Teklif
}
export enum ActivityStatusEnum {
// Aktivite Durumu
Planned = 'PLANNED', // Planlandı
InProgress = 'IN_PROGRESS', // Devam Ediyor
Completed = 'COMPLETED', // Tamamlandı
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum LostReasonCategoryEnum {
// Kaybedilme Nedeni Kategorisi
Price = 'PRICE', // Fiyat
Product = 'PRODUCT', // Ürün
Service = 'SERVICE', // Hizmet
Competitor = 'COMPETITOR', // Rakip
Timing = 'TIMING', // Zamanlama
Budget = 'BUDGET', // Bütçe
}
export enum TargetTypeEnum {
// Hedef Türü
Revenue = 'REVENUE', // Gelir
Units = 'UNITS', // Birimler
Opportunities = 'OPPORTUNITIES', // Fırsatlar
Customers = 'CUSTOMERS', // Müşteriler
}
export enum TargetStatusEnum {
// Hedef Durumu
Active = 'ACTIVE', // Aktif
Achieved = 'ACHIEVED', // Gerçekleşti
Missed = 'MISSED', // Kaçırıldı
Cancelled = 'CANCELLED', // İptal Edildi
}

View file

@ -1,357 +0,0 @@
import { BankAccount, BusinessParty } from './common'
import { MmMaterial } from './mm'
export interface FiCurrentAccount {
// Cari Hesabı
id: string
accountCode: string
businessPartyId: string
businessParty?: BusinessParty
type: AccountTypeEnum
contactPerson?: string
phoneNumber?: string
email?: string
address?: string
taxNumber?: string
taxOffice?: string
creditLimit: number
balance: number
currency: string
isActive: boolean
riskGroup: RiskGroupEnum
paymentTerm: number
creationTime: Date
lastModificationTime: Date
lastTransactionDate?: Date
}
export interface FiCurrentAccountMovement {
// Cari Hesap Hareketi
id: string
accountId: string
account?: FiCurrentAccount
transactionDate: Date
description: string
referenceNumber?: string
documentType: FiDocumentTypeEnum
documentNumber?: string
debitAmount: number
creditAmount: number
balance: number
currency: string
invoiceId?: string
paymentId?: string
creationTime: Date
}
export interface FiInvoice {
// Fatura
id: string
invoiceNumber: string
invoiceType: InvoiceTypeEnum
currentAccountId: string
currentAccount?: FiCurrentAccount
invoiceDate: Date
dueDate: Date
deliveryDate?: Date
subtotal: number
taxAmount: number
discountAmount: number
totalAmount: number
paidAmount: number
remainingAmount: number
currency: string
status: InvoiceStatusEnum
paymentStatus: PaymentStatusEnum
items: FiInvoiceItem[]
waybillNumber?: string
waybillDate?: Date
notes?: string
creationTime: Date
lastModificationTime: Date
}
export interface FiInvoiceItem {
// Fatura Kalemi
id: string
invoiceId: string
materialId?: string
material?: MmMaterial
description: string
quantity: number
unit: string
unitPrice: number
lineTotal: number
discountRate: number
discountAmount: number
taxRate: number
taxAmount: number
netAmount: number
}
export interface FiWaybill {
// İrsaliye
id: string
waybillNumber: string
waybillType: WaybillTypeEnum
currentAccountId: string
currentAccount?: FiCurrentAccount
waybillDate: Date
deliveryDate?: Date
subtotal: number
taxAmount: number
discountAmount: number
totalAmount: number
currency: string
status: WaybillStatusEnum
isInvoiced: boolean
invoiceId?: string
items: FiWaybillItem[]
deliveryAddress?: string
receiverName?: string
receiverPhone?: string
carrierCompany?: string
trackingNumber?: string
notes?: string
creationTime: Date
lastModificationTime: Date
}
export interface FiWaybillItem {
// İrsaliye Kalemi
id: string
waybillId: string
materialId?: string
material?: MmMaterial
description: string
quantity: number
unit: string
unitPrice: number
lineTotal: number
discountRate: number
discountAmount: number
taxRate: number
taxAmount: number
netAmount: number
}
export interface FiCashAccount {
// Kasa Hesabı
id: string
accountCode: string
name: string
description?: string
currency: string
balance: number
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface FiCashMovement {
// Kasa Hareketi
id: string
cashAccountId: string
cashAccount?: FiCashAccount
transactionDate: Date
description: string
referenceNumber?: string
movementType: CashMovementTypeEnum
amount: number
currency: string
documentType?: FiDocumentTypeEnum
documentNumber?: string
currentAccountId?: string
currentAccount?: FiCurrentAccount
creationTime: Date
}
export interface FiBankMovement {
// Banka Hareketi
id: string
bankAccountId: string
bankAccount?: BankAccount
transactionDate: Date
valueDate: Date
description: string
referenceNumber?: string
transactionType: BankTransactionTypeEnum
amount: number
currency: string
recipientName?: string
recipientIban?: string
recipientBank?: string
documentType?: FiDocumentTypeEnum
documentNumber?: string
currentAccountId?: string
currentAccount?: FiCurrentAccount
status: TransactionStatusEnum
creationTime: Date
}
export interface FiCheck {
// Çek
id: string
checkNumber: string
bankName: string
branchName: string
accountNumber: string
drawerName: string
payeeName: string
currentAccountId?: string
currentAccount?: FiCurrentAccount
issueDate: Date
dueDate: Date
amount: number
currency: string
status: CheckStatusEnum
type: TypeEnum
bankingDate?: Date
collectionDate?: Date
endorsedTo?: string
notes?: string
creationTime: Date
lastModificationTime: Date
}
export interface PromissoryNote {
// Senet
id: string
noteNumber: string
drawerName: string
payeeName: string
currentAccountId?: string
currentAccount?: FiCurrentAccount
issueDate: Date
dueDate: Date
amount: number
currency: string
status: NoteStatusEnum
type: TypeEnum // Received or Issued
collectionDate?: Date
endorsedTo?: string
location?: string
notes?: string
creationTime: Date
lastModificationTime: Date
}
// Enums
export enum AccountTypeEnum {
Customer = 'CUSTOMER', // Müşteri
Supplier = 'SUPPLIER', // Tedarikçi
Both = 'BOTH', // Her İkisi de
Other = 'OTHER', // Diğer
}
export enum RiskGroupEnum {
Low = 'LOW', // Düşük
Medium = 'MEDIUM', // Orta
High = 'HIGH', // Yüksek
Blocked = 'BLOCKED', // Bloke
}
export enum FiDocumentTypeEnum {
Invoice = 'INVOICE', // Fatura
Waybill = 'WAYBILL', // İrsaliye
Receipt = 'RECEIPT', // Makbuz
Payment = 'PAYMENT', // Ödeme
BankTransfer = 'BANK_TRANSFER', // Banka Transferi
CashMovement = 'CASH_MOVEMENT', // Kasa Hareketi
Check = 'CHECK', // Çek
PromissoryNote = 'PROMISSORY_NOTE', // Senet
Other = 'OTHER', //Diğer
}
export enum InvoiceTypeEnum {
Sales = 'SALES', // Satış
Purchase = 'PURCHASE', // Satın Alma
Return = 'RETURN', // İade
Proforma = 'PROFORMA', // Proforma
}
export enum InvoiceStatusEnum {
Draft = 'DRAFT', // Taslak
Sent = 'SENT', // Gönderildi
Approved = 'APPROVED', // Onaylandı
Cancelled = 'CANCELLED', // İptal
}
export enum PaymentStatusEnum {
Unpaid = 'UNPAID', // Ödenmemiş
PartiallyPaid = 'PARTIALLY_PAID', // Kısmen Ödenmiş
Paid = 'PAID', // Ödenmiş
Overdue = 'OVERDUE', // Vadesi Geçmiş
}
export enum CashMovementTypeEnum {
Income = 'INCOME', // Gelir
Expense = 'EXPENSE', // Gider
}
export enum BankAccountTypeEnum {
Current = 'CURRENT', // Vadesiz
Deposit = 'DEPOSIT', // Vadeli
Credit = 'CREDIT', // Kredi
Foreign = 'FOREIGN', // Yabancı Para
}
export enum BankTransactionTypeEnum {
Deposit = 'DEPOSIT', // PARA YATIRMA
Withdrawal = 'WITHDRAWAL', // PARA ÇEKME
Transfer = 'TRANSFER', // HAVALE
EFT = 'EFT', // EFT
Fee = 'FEE', // MASRAF
Interest = 'INTEREST', // FAİZ
}
export enum TransactionStatusEnum {
Pending = 'PENDING', // BEKLEMEDE
Completed = 'COMPLETED', // TAMAMLANDI
Failed = 'FAILED', // BAŞARISIZ
Cancelled = 'CANCELLED', // İPTAL EDİLDİ
}
export enum CheckStatusEnum {
InHand = 'IN_HAND', // CÜZDANDA
Deposited = 'DEPOSITED', // HESABA YATIRILDI
Collected = 'COLLECTED', // TAHSİL EDİLDİ
Bounced = 'BOUNCED', // İADE OLDU
Endorsed = 'ENDORSED', // CIRO EDİLDİ
Cancelled = 'CANCELLED', // İPTAL EDİLDİ
}
export enum TypeEnum {
Received = 'RECEIVED', // ALINAN
Issued = 'ISSUED', // VERİLEN
}
export enum NoteStatusEnum {
InHand = 'IN_HAND', // CÜZDANDA
Collected = 'COLLECTED', // TAHSİL EDİLDİ
Overdue = 'OVERDUE', // VADESİ GEÇMİŞ
Endorsed = 'ENDORSED', // CIRO EDİLDİ
Cancelled = 'CANCELLED', // İPTAL EDİLDİ
}
export enum WaybillTypeEnum {
Outgoing = 'outgoing', // Çıkış İrsaliyesi
Incoming = 'incoming', // Giriş İrsaliyesi
Transfer = 'transfer', // Transfer İrsaliyesi
Return = 'return', // İade İrsaliyesi
}
export enum WaybillStatusEnum {
Draft = 'draft', // Taslak
Confirmed = 'confirmed', // Onaylandı
Delivered = 'delivered', // Teslim Edildi
Cancelled = 'cancelled', // İptal
}
export enum PaymentMethodEnum {
Cash = 'cash', // Nakit
BankTransfer = 'bank_transfer', // Banka Transferi
CreditCard = 'credit_card', // Kredi Kartı
Check = 'check', // Çek
PromissoryNote = 'promissory_note', // Senet
}

View file

@ -1,5 +1,13 @@
import { DepartmentDto, EmployeeDto, JobPositionDto } from '@/proxy/intranet/models'
import { Address, BankAccount } from './common'
import { DepartmentDto, EmployeeDto } from '@/proxy/intranet/models'
export interface Address {
// Adres
country: string
state: string
city: string
street: string
postalCode: string
}
export interface HrCostCenter {
// İnsan Kaynakları Masraf Merkezi

View file

@ -1,21 +1,36 @@
import {
EmployeeDto,
SurveyQuestionDto,
} from '@/proxy/intranet/models'
// Görev
export interface Task {
id: string
title: string
description: string
project: string
assignedTo: EmployeeDto[]
assignedBy: EmployeeDto
priority: 'low' | 'medium' | 'high' | 'urgent'
status: 'todo' | 'in-progress' | 'review' | 'done'
dueDate: Date
creationTime: Date
labels: string[]
attachments?: { name: string; url: string }[]
comments: number
export enum LeaveStatusEnum {
// İzin Durumu
Pending = 'Pending', // Beklemede
Approved = 'Approved', // Onaylandı
Rejected = 'Rejected', // Reddedildi
Cancelled = 'Cancelled', // İptal edildi
}
export enum LeaveTypeEnum {
// İzin Türü
Annual = 'Annual', // Yıllık
Sick = 'Sick', // Hastalık
Maternity = 'Maternity', // Doğum
Paternity = 'Paternity', // Babalık
Personal = 'Personal', // Kişisel
Emergency = 'Emergency', // Acil
Study = 'Study', // Eğitim
Unpaid = 'Unpaid', // Ücretsiz
}
export enum PriorityEnum {
// Öncelik
Low = 'LOW', // Düşük
Normal = 'NORMAL', // Normal
High = 'HIGH', // Yüksek
Urgent = 'URGENT', // Acil
}
export enum TaskStatusEnum {
// Görev Durumu
NotStarted = 'NOT_STARTED', // Başlanmadı
InProgress = 'IN_PROGRESS', // Devam Ediyor
Completed = 'COMPLETED', // Tamamlandı
OnHold = 'ON_HOLD', // Beklemede
Cancelled = 'CANCELLED', // İptal Edildi
}

View file

@ -38,7 +38,7 @@ export function toPrefix(menu: MenuPrefixEnum): string {
case MenuPrefixEnum.Maintenance:
return "Mnt";
case MenuPrefixEnum.Warehouse:
return "Wh";
return "Str";
case MenuPrefixEnum.Project:
return "Prj";
case MenuPrefixEnum.Hr:

View file

@ -1,713 +0,0 @@
import { DepartmentDto } from '@/proxy/intranet/models'
import { Address, BusinessParty, PaymentTerms, PriorityEnum } from './common'
import { WmWarehouse, WmZone, WmLocation } from './wm'
export interface MmMaterial {
// Malzeme
id: string
code: string
name: string
barcode?: string
description?: string
materialTypeId: string
materialType?: MmMaterialType
materialGroupId: string
materialGroup?: MmMaterialGroup
baseUnitId: string
baseUnit?: MmUnit
costPrice: number
salesPrice: number
currency: string
isActive: boolean
totalStock: number
alternativeUnits?: MmMaterialUnit[]
trackingType: 'Quantity' | 'Lot' | 'Serial'
variants?: MmMaterialVariant[]
specifications?: MmMaterialSpecification[]
suppliers?: MmMaterialSupplier[]
stockLevels?: MmStockLevel[]
creationTime: Date
lastModificationTime: Date
}
export interface MmMaterialType {
// Malzeme Türü
id: string
code: MaterialTypeEnum
name: string
description?: string
isActive: boolean
className: string
}
export interface MmMaterialGroup {
// Malzeme Grubu
id: string
code: string
name: string
parentGroupId?: string
parentGroup?: MmMaterialGroup
description?: string
isActive: boolean
children?: MmMaterialGroup[] // Ağaç görünümü için eklendi
}
export interface MmMaterialUnit {
// Alternatif Birim
id: string
materialId: string
unitId: string
unit?: MmUnit
conversionFactor: number
isDefault: boolean
}
export interface MmMaterialVariant {
// Varyant
id: string
materialId: string
variantCode: string
variantName: string
specifications: Record<string, string | number>
additionalCost: number
isActive: boolean
}
export interface MmMaterialSpecification {
// Özellik
id: string
materialId: string
specificationName: string
specificationValue: string
unitId: string
unit?: MmUnit
isRequired: boolean
}
export interface MmMaterialSupplier {
// Tedarikçi
id: string
materialId: string
supplierId: string
supplier?: BusinessParty
supplierMaterialCode?: string
leadTime: number
minimumOrderQuantity: number
price: number
currency: string
isPreferred: boolean
}
export interface MmUnit {
// Birim
id: string
code: string
name: string
description?: string
isActive: boolean
}
export interface MmLotNumber {
// Parti Numarası
id: string
materialId: string
material?: MmMaterial
lotNumber: string
productionDate: Date
expiryDate?: Date
quantity: number
unitId: string
supplierId?: string
qualityStatus: QualityStatusEnum
isActive: boolean
}
export interface MmSerialNumber {
// Seri Numarası
id: string
materialId: string
material?: MmMaterial
serialNumber: string
lotId?: string
productionDate: Date
warrantyExpiryDate?: Date
currentLocationId?: string
status: SerialStatusEnum
isActive: boolean
}
export interface MmStockLevel {
// Stok Seviyesi
id: string
materialId: string
warehouseId: string
warehouse?: WmWarehouse
zoneId?: string
zone?: WmZone
locationId?: string
location?: WmLocation
availableQuantity: number
reservedQuantity: number
inTransitQuantity: number
minimumStock: number
maximumStock: number
reorderPoint: number
lastUpdated: Date
}
export interface MmStockMovement {
// Stok Hareketi
id: string
movementNumber: string
materialId: string
material: MmMaterial
movementType: MovementTypeEnum
fromWarehouseId?: string
fromWarehouse?: WmWarehouse
fromZoneId?: string
fromZone?: WmZone
fromLocationId?: string
fromLocation?: WmLocation
toWarehouseId?: string
toWarehouse?: WmWarehouse
toZoneId?: string
toZone?: WmZone
toLocationId?: string
toLocation?: WmLocation
quantity: number
unit?: MmUnit
unitId?: string
lotNumber?: string
referenceDocument?: string
referenceDocumentType?: string
referenceType?: string
movementDate: Date
description?: string
reason?: string
performedBy?: string
approvedBy?: string
status?: MovementStatusEnum
creationTime: Date
}
export interface MmPurchaseRequisition {
// Satınalma Talebi
id: string
requisitionNumber: string
requestedBy: string
departmentId: string
requestDate: Date
requiredDate: Date
priority: PriorityEnum
status: RequisitionStatusEnum
description?: string
justification?: string
totalAmount: number
currency: string
items: MmPurchaseRequisitionItem[]
approvals: MmApprovalHistory[]
creationTime: Date
lastModificationTime: Date
}
export interface MmPurchaseRequisitionItem {
// Satınalma Talebi Kalemi
id: string
requisitionId: string
materialId?: string
material?: MmMaterial
description: string
quantity: number
unitId: string
estimatedPrice: number
totalAmount: number
requiredDate: Date
specifications?: string
preferredSupplierId?: string
budgetCode?: string
}
export interface MmPurchaseOrder {
// Satınalma Siparişi
id: string
orderNumber: string
supplierId: string
supplier?: BusinessParty
orderDate: Date
deliveryDate: Date
status: OrderStatusEnum
paymentTerms: PaymentTerms
currency: string
exchangeRate: number
subtotal: number
taxAmount: number
totalAmount: number
deliveryAddress: Address
terms?: string
notes?: string
items: MmPurchaseOrderItem[]
receipts: MmGoodsReceipt[]
creationTime: Date
lastModificationTime: Date
requestId: string
requestTitle: string
requestType: RequestTypeEnum
quotationId: string
expectedDeliveryDate: Date
actualDeliveryDate?: Date
deliveryTerms: string
attachments: string[]
approvedBy?: string
approvedAt?: Date
}
export interface MmPurchaseOrderItem {
// Sipariş Kalemi
id: string
orderId: string
materialId: string
material?: MmMaterial
description: string
quantity: number
unit: string
unitPrice: number
totalPrice: number
deliveryDate: Date
receivedQuantity: number
deliveredQuantity: number
remainingQuantity: number
specifications?: string
qualityRequirements?: string
}
export interface MmGoodsReceipt {
// Mal Kabul
id: string
receiptNumber: string
orderId: string
order?: MmPurchaseOrder
receiptDate: Date
receivedBy: string
warehouseId: string
status: ReceiptStatusEnum
notes?: string
items: MmGoodsReceiptItem[]
qualityInspection?: MmQualityInspection
creationTime: Date
lastModificationTime: Date
}
export interface MmGoodsReceiptItem {
// Mal Kabul Kalemi
id: string
receiptId: string
orderItemId: string
materialId: string
receivedQuantity: number
acceptedQuantity: number
rejectedQuantity: number
lotNumber?: string
expiryDate?: Date
qualityStatus: QualityStatusEnum
storageLocation?: string
}
export interface MmQualityInspection {
// Kalite Muayenesi
id: string
inspectionNumber: string
receiptId: string
inspectionDate: Date
inspectedBy: string
status: InspectionStatusEnum
overallResult: QualityResultEnumEnum
notes?: string
checkpoints: MmQualityInspectionCheckpoint[]
}
export interface MmQualityInspectionCheckpoint {
// Muayene Noktası
id: string
inspectionId: string
checkpointName: string
expectedValue: string
actualValue: string
result: QualityResultEnumEnum
notes?: string
}
export interface MmApprovalHistory {
id: string
documentId: string
documentType: string
approverUserId: string
approverName: string
approvalLevel: number
status: ApprovalStatusEnum
comments?: string
approvedAt?: Date
creationTime: Date
}
export interface MmPurchaseRequest {
// Satınalma Talebi
id: string
requestNumber: string
requestType: RequestTypeEnum
description: string
department: string
requestedBy: string
requestDate: Date
requiredDate: Date
priority: PriorityEnum
status: RequestStatusEnum
totalAmount?: number
currency: string
items: MmPurchaseRequestItem[]
approvals: MmRequestApproval[]
attachments: MmAttachment[]
comments: MmRequestComment[]
creationTime: Date
lastModificationTime: Date
}
export interface MmPurchaseRequestItem {
// Kalem
id: string
requestId: string
materialId?: string
serviceDescription?: string
quantity: number
unit: string
estimatedPrice?: number
specification?: string
justification?: string
isUrgent: boolean
}
export interface MmRequestApproval {
// Onay
id: string
requestId: string
approvalLevel: ApprovalLevelEnum
approverUserId: string
approverName: string
approvalDate?: Date
status: ApprovalStatusEnum
comments?: string
sequence: number
isRequired: boolean
}
export interface MmQuotation {
// Teklif
id: string
quotationNumber: string
requestId: string
requestTitle: string
requestType: RequestTypeEnum
supplierId: string
supplier?: BusinessParty
quotationDate: Date
validUntil: Date
status: QuotationStatusEnum
totalAmount: number
currency: string
paymentTerms: string
deliveryTerms: string
deliveryTime?: number
items: MmQuotationItem[]
evaluationScore?: number
evaluationComments?: string
evaluationNotes?: string
notes?: string
attachments: MmAttachment[]
submittedBy: string
submittedAt: Date
evaluatedBy?: string
evaluatedAt?: Date
creationTime: Date
lastModificationTime: Date
}
export interface MmAttachment {
// Ek
id: string
fileName: string
fileSize: number
fileType: string
uploadedBy: string
uploadedAt: Date
url?: string
}
export interface MmQuotationItem {
// Teklif Kalemi
id: string
materialCode: string
materialName: string
description: string
quantity: number
unit: string
unitPrice: number
totalPrice: number
leadTime?: number
specifications: string[]
}
export interface MmApprovalWorkflow {
// Onay İş Akışı
id: string
name: string
departmentId: string
department?: DepartmentDto
requestType: RequestTypeEnum
amountThreshold: number
approvalLevels: MmApprovalWorkflowLevel[]
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface MmApprovalWorkflowLevel {
// Onay Seviyesi
id: string
workflowId: string
level: ApprovalLevelEnum
approverUserIds: string[]
approverNames: string[]
sequence: number
isRequired: boolean
isParallel: boolean
timeoutDays?: number
}
export interface MmSupplierPerformance {
// Tedarikçi Performansı
deliveryPerformance: number
qualityRating: number
priceCompetitiveness: number
responsiveness: number
complianceRating: number
overallScore: number
lastEvaluationDate: Date
}
export interface MmRequestComment {
// Yorum
id: string
requestId: string
userId: string
userName: string
comment: string
commentDate: Date
isInternal: boolean
}
export interface MmDelivery {
// Teslimat
id: string
deliveryNumber: string
orderId: string
orderNumber: string
requestType: RequestTypeEnum
supplierId: string
supplierName: string
courierCompany?: string
trackingNumber?: string
deliveryDate: Date
expectedDeliveryDate: Date
actualDeliveryDate?: Date
status: DeliveryStatusEnum
deliveryAddress: string
receivedBy?: string
items: MmDeliveryItem[]
notes?: string
attachments: string[]
creationTime: Date
lastModificationTime: Date
}
export interface MmDeliveryItem {
// Teslimat Kalemi
id: string
materialId: string
material?: MmMaterial
orderedQuantity: number
deliveredQuantity: number
unit: string
condition: 'Good' | 'Damaged' | 'Missing'
notes?: string
}
export enum OrderStatusEnum {
// Sipariş Durumu
Draft = 'Draft', // Yeni
Pending = 'Pending', // Onay Bekliyor
Approved = 'Approved', // Onaylandı
Sent = 'Sent', // Gönderildi
Confirmed = 'Confirmed', // Onaylandı
PartiallyDelivered = 'PartiallyDelivered', // Kısmen Teslim Edildi
PartiallyReceived = 'PartiallyReceived', // Kısmen Alındı
Received = 'Received', // Alındı
Delivered = 'Delivered', // Teslim Edildi
Invoiced = 'Invoiced', // Faturalandırıldı
Completed = 'Completed', // Tamamlandı
Closed = 'Closed', // Kapalı
Cancelled = 'Cancelled', // İptal Edildi
}
export enum SupplierTypeEnum {
// Tedarikçi Türü
Manufacturer = 'MANUFACTURER', // Üretici
Distributor = 'DISTRIBUTOR', // Distribütör
Wholesaler = 'WHOLESALER', // Toptancı
ServiceProvider = 'SERVICE_PROVIDER', // Hizmet Sağlayıcı
Other = 'OTHER', // Diğer
}
export enum RequisitionStatusEnum {
// Satınalma Talebi Durumu
Draft = 'DRAFT', // Taslak
Submitted = 'SUBMITTED', // Gönderildi
InApproval = 'IN_APPROVAL', // Onayda
Approved = 'APPROVED', // Onaylandı
Rejected = 'REJECTED', // Reddedildi
Cancelled = 'CANCELLED', // İptal Edildi
Converted = 'CONVERTED',
}
export enum ReceiptStatusEnum {
// Mal Kabul Durumu
Pending = 'PENDING', // Beklemede
InProgress = 'IN_PROGRESS', // İşlemde
Completed = 'COMPLETED', // Tamamlandı
OnHold = 'ON_HOLD', // Beklemede
}
export enum InspectionStatusEnum {
// Muayene Durumu
Scheduled = 'SCHEDULED', // Planlandı
InProgress = 'IN_PROGRESS', // İşlemde
Completed = 'COMPLETED', // Tamamlandı
OnHold = 'ON_HOLD', // Beklemede
}
export enum QualityResultEnumEnum {
// Kalite Sonucu
Pass = 'PASS', // Geçti
Fail = 'FAIL', // Kaldı
Conditional = 'CONDITIONAL', // Koşullu
}
export enum ApprovalStatusEnum {
// Onay Durumu
Pending = 'PENDING', // Beklemede
Approved = 'APPROVED', // Onaylandı
Rejected = 'REJECTED', // Reddedildi
}
export enum RequestTypeEnum {
// Talep Türü
Material = 'MATERIAL', // Malzeme
Service = 'SERVICE', // Hizmet
WorkCenter = 'WORKCENTER', // İş Merkezi
Maintenance = 'MAINTENANCE', // Bakım
}
export enum RequestStatusEnum {
// Talep Durumu
Draft = 'DRAFT', // Taslak
Submitted = 'SUBMITTED', // Gönderildi
InReview = 'IN_REVIEW', // İnceleme Aşamasında
Approved = 'APPROVED', // Onaylandı
Rejected = 'REJECTED', // Reddedildi
InQuotation = 'IN_QUOTATION', // Teklif Aşamasında
Ordered = 'ORDERED', // Sipariş Verildi
Completed = 'COMPLETED', // Tamamlandı
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum QuotationStatusEnum {
// Teklif Durumu
Draft = 'Draft', // Taslak
Pending = 'Pending', // Beklemede
UnderReview = 'UnderReview', // İnceleme Aşamasında
Submitted = 'Submitted', // Gönderildi
Approved = 'Approved', // Onaylandı
Rejected = 'Rejected', // Reddedildi
Expired = 'Expired', // Süresi Dolmuş
}
export enum ApprovalLevelEnum {
// Onay Seviyesi
Supervisor = 'SUPERVISOR', // Ambar Sorumlusu
Manager = 'MANAGER', // Müdür
Director = 'DIRECTOR', // Direktör
GeneralManager = 'GENERAL_MANAGER', // Genel Müdür
FinanceManager = 'FINANCE_MANAGER', // Finans Müdürü
TechnicalManager = 'TECHNICAL_MANAGER', // Teknik Müdür
}
export enum SupplierCardTypeEnum {
// Tedarikçi Kart Türü
Standard = 'STANDARD', // Standart
Premium = 'PREMIUM', // Premium
Strategic = 'STRATEGIC', // Stratejik
Preferred = 'PREFERRED', // Tercih Edilen
}
export enum DeliveryStatusEnum {
// Teslimat Durumu
Preparing = 'Preparing', // Hazırlanıyor
Shipped = 'Shipped', // Gönderildi
InTransit = 'InTransit', // Taşınıyor
OutForDelivery = 'OutForDelivery', // Teslimat İçin Yolda
Delivered = 'Delivered', // Teslim Edildi
PartiallyDelivered = 'PartiallyDelivered', // Kısmen Teslim Edildi
Delayed = 'Delayed', // Gecikmiş
Returned = 'Returned', // İade Edildi
Cancelled = 'Cancelled', // İptal Edildi
}
export enum MovementStatusEnum {
// Hareket Durumu
Planned = 'PLANNED', // Planlandı
InProgress = 'IN_PROGRESS', // İşlemde
Completed = 'COMPLETED', // Tamamlandı
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum MovementTypeEnum {
// Hareket Türü
GoodsReceipt = 'GR', // Malzeme Girişi
GoodsIssue = 'GI', // Malzeme Çıkışı
Transfer = 'TR', // Transfer
}
export enum MaterialTypeEnum {
// Malzeme Türü
RawMaterial = 'RAW', // Hammadde
SemiFinished = 'SEMI', // Yarı Mamul
Finished = 'FINISHED', // Mamul
Consumable = 'CONSUMABLE', // Tüketim Malzemesi
Service = 'SERVICE', // Hizmet
Spare = 'SPARE', // Yedek Parça
}
export enum QualityStatusEnum {
// Kalite Durumu
Pending = 'PENDING', // Beklemede
Approved = 'APPROVED', // Onaylandı
Rejected = 'REJECTED', // Reddedildi
Conditional = 'CONDITIONAL', // Koşullu
Quarantine = 'QUARANTINE', // Karantinada
}
export enum SerialStatusEnum {
// Seri Numarası Durumu
Available = 'AVAILABLE', // Kullanılabilir
InUse = 'IN_USE', // Kullanımda
Maintenance = 'MAINTENANCE', // Bakımda
Disposed = 'DISPOSED', // İmha Edildi
}

View file

@ -1,465 +0,0 @@
import { PmWorkCenter, WorkOrderStatusEnum } from './pm'
import { MmMaterial, MmMaterialSupplier, QualityResultEnumEnum, QualityStatusEnum } from './mm'
import { PriorityEnum } from './common'
import { CrmSalesOrder } from './crm'
export interface MrpProductionOrder {
// Üretim Emri
id: string
orderNumber: string
orderType: ProductionOrderTypeEnum
customerRequirement?: string
plannedStartDate: Date
plannedEndDate: Date
actualStartDate?: Date
actualEndDate?: Date
status: ProductionOrderStatusEnum
priority: PriorityEnum
plannedQuantity: number //Planlanan Miktar
confirmedQuantity: number //Üretilen Miktar
requiredQuantity: number //Gereken Miktar
scrapQuantity: number //Fire
unitId: string
plannedCost: number
actualCost: number
currency: string
materials: MrpProductionOrderMaterial[]
workOrders: MrpWorkOrder[]
creationTime: Date
lastModificationTime: Date
}
export interface MrpProductionOrderMaterial {
// Üretim Emri Malzemesi
id: string
productionOrderId: string
salesOrderId?: string
salesOrder?: CrmSalesOrder
materialId: string
material?: MmMaterial
customerRequirement?: string
plannedQuantity: number //Planlanan Miktar
confirmedQuantity: number //Üretilen Miktar
requiredQuantity: number //Gereken Miktar
scrapQuantity: number //Fire
unitId: string
}
export interface MrpWorkOrder {
// İş Emri
id: string
workOrderNumber: string
productionOrderId: string
productionOrder?: MrpProductionOrder
operationId: string
operation?: MrpOperation
materialId: string
material?: MmMaterial
sequence: number
plannedStartDate: Date
plannedEndDate: Date
actualStartDate?: Date
actualEndDate?: Date
plannedQuantity: number
confirmedQuantity: number
scrapQuantity: number
workCenterId: string
workCenter?: PmWorkCenter
assignedOperators: string[]
setupTime: number // minutes
processTime: number // minutes
actualSetupTime?: number
actualProcessTime?: number
status: WorkOrderStatusEnum
confirmations: MrpWorkOrderConfirmation[]
qualityChecks: MrpWorkOrderQualityCheck[]
creationTime: Date
lastModificationTime: Date
}
export interface MrpWorkOrderConfirmation {
// İş Emri Onayı
id: string
workOrderId: string
confirmationDate: Date
confirmedQuantity: number
scrapQuantity: number
actualSetupTime: number
actualProcessTime: number
confirmedBy: string
notes?: string
creationTime: Date
}
export interface MrpWorkOrderQualityCheck {
// Kalite Kontrol
id: string
checkNumber: string
workOrderId?: string
productionOrderId?: string
materialId: string
checkType: QualityCheckTypeEnum
checkDate: Date
checkedBy: string
status: QualityStatusEnum
overallResult: QualityResultEnumEnum
checkpoints: MrpWorkOrderQualityCheckpoint[]
nonConformanceActions: MrpNonConformanceAction[]
creationTime: Date
lastModificationTime: Date
}
export interface MrpWorkOrderQualityCheckpoint {
// Kalite Kontrol Noktası
id: string
qualityCheckId: string
checkpointName: string
specification: string
measuredValue: string
result: QualityResultEnumEnum
notes?: string
}
export interface MrpNonConformanceAction {
// Uygunsuzluk Eylemi
id: string
qualityCheckId: string
actionType: NonConformanceActionTypeEnum
description: string
assignedTo: string
dueDate: Date
status: ActionStatusEnum
completedDate?: Date
}
export interface MrpMaterialRequirement {
// Malzeme Gereksinimi
id: string
mrpRunId: string
materialId: string
material?: MmMaterial
grossRequirement: number
scheduledReceipts: number
projectedAvailable: number
netRequirement: number
plannedOrderReceipt: number
plannedOrderRelease: number
requirementDate: Date
plannedReceiptDate: Date
plannedReleaseDate: Date
sourceType: RequirementSourceTypeEnum
sourceDocumentId?: string
creationTime: Date
lastModificationTime: Date
}
export interface MrpRecommendation {
// Tavsiye
id: string
mrpRunId: string
materialId: string
material?: MmMaterial
recommendationType: RecommendationTypeEnum
recommendedAction: string
quantity: number
dueDate: Date
priority: PriorityEnum
reason: string
status: RecommendationStatusEnum
implementedDate?: Date
implementedBy?: string
creationTime: Date
lastModificationTime: Date
}
export interface MrpDemandForecast {
// Talep Tahmini
id: string
materialId: string
material?: MmMaterial
forecastPeriod: string
startDate: Date
endDate: Date
forecastMethod: ForecastMethodEnum
forecastQuantity: number
actualQuantity?: number
accuracy?: number
seasonalityFactor?: number
trendFactor?: number
creationTime: Date
lastModificationTime: Date
notes: string
}
export interface MrpPurchaseSuggestion extends MrpRecommendation {
// Satınalma Tavsiyesi
supplierId: string
supplier?: MmMaterialSupplier
estimatedCost: number
leadTime: number
minimumOrderQuantity: number
suggestedQuantity: number
economicOrderQuantity: number
}
export interface MrpProductionSuggestion extends MrpRecommendation {
// Üretim Tavsiyesi
estimatedDuration: number // in hours
resourceRequirements: {
workCenter: string
capacity: number
efficiency: number
}[]
bom?: {
id: string
version: string
materialCount: number
totalCost: number
}
productionCost: number
setupTime: number
cycleTime: number
suggestedStartDate: string
suggestedCompletionDate: string
}
export interface MrpOperationTypeDefinition {
// Operasyon Türü Tanımı
id: string
code: string
name: string
description?: string
category: OperationCategoryEnum
defaultDuration: number
requiresSetup: boolean
allowsParallelOperation: boolean
qualityCheckRequired: boolean
skillLevelRequired: number
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface MrpOperation {
// Operasyon
id: string
code: string
name: string
description?: string
operationTypeId?: string
operationType?: MrpOperationTypeDefinition
workCenterId: string
workCenter?: PmWorkCenter
standardTime: number // minutes
setupTime: number // minutes
laborCost: number
machineCost: number
overheadCost: number
isActive: boolean
instructions?: string
qualityCheckRequired: boolean
creationTime: Date
lastModificationTime: Date
}
export interface MrpBOM {
// Malzeme Listesi (BOM)
id: string
bomCode: string
materialId: string
material?: MmMaterial
version: string
validFrom: Date
validTo?: Date
isActive: boolean
bomType: BOMTypeEnum
baseQuantity: number
components: MrpBOMComponent[]
operations: MrpBOMOperation[]
creationTime: Date
lastModificationTime: Date
}
export interface MrpBOMComponent {
// BOM Bileşeni
id: string
bomId: string
materialId: string
material?: MmMaterial
quantity: number
unitId: string
scrapPercentage: number
isPhantom: boolean
position: number
validFrom: Date
validTo?: Date
isActive: boolean
}
export interface MrpBOMOperation {
// BOM Operasyonu
id: string
bomId: string
operationId: string
operation?: MrpOperation
sequence: number
setupTime: number
runTime: number
waitTime: number
queueTime: number
moveTime: number
isActive: boolean
workCenterId: string
workCenter?: PmWorkCenter
isParallel: boolean
prerequisites: string[]
qualityChecks: MrpBOMQualityCheck[]
tools: MrpToolRequirement[]
skills: MrpSkillRequirement[]
}
export interface MrpBOMQualityCheck {
// Kalite Kontrol Noktası
id: string
name: string
description?: string
checkType: QualityCheckTypeEnum
parameter: string
minValue?: number
maxValue?: number
targetValue?: number
tolerance?: number
isRequired: boolean
}
export interface MrpToolRequirement {
// Araç Gereksinimi
id: string
toolId: string
toolName: string
quantity: number
isRequired: boolean
}
export interface MrpSkillRequirement {
// Beceri Gereksinimi
id: string
skillName: string
level: number
isRequired: boolean
}
export enum ProductionOrderTypeEnum {
// Üretim Emri Türü
Standard = 'STANDARD', // Standart üretim emri
Rework = 'REWORK', // Yeniden işleme emri
Maintenance = 'MAINTENANCE', // Bakım emri
Sample = 'SAMPLE', // Numune üretim emri
}
export enum ProductionOrderStatusEnum {
// Üretim Emri Durumu
Created = 'CREATED', // Oluşturuldu
Released = 'RELEASED', // Serbest bırakıldı
InProgress = 'IN_PROGRESS', // İşlemde
Completed = 'COMPLETED', // Tamamlandı
Cancelled = 'CANCELLED', // İptal edildi
OnHold = 'ON_HOLD', // Beklemede
}
export enum QualityCheckTypeEnum {
// Kalite Kontrol Türü
Incoming = 'INCOMING', // Giriş
InProcess = 'IN_PROCESS', // Süreç içi
Final = 'FINAL', // Nihai
Random = 'RANDOM', // Rastgele
Dimensional = 'DIMENSIONAL', // Boyutsal
Visual = 'VISUAL', // Görsel
Functional = 'FUNCTIONAL', // Fonksiyonel
Material = 'MATERIAL', // Malzeme
Electrical = 'ELECTRICAL', // Elektriksel
}
export enum NonConformanceActionTypeEnum {
// Uygunsuzluk Eylem Türü
Rework = 'REWORK', // Yeniden işleme
Scrap = 'SCRAP', // Hurda
UseAsIs = 'USE_AS_IS', // Olduğu gibi kullan
Return = 'RETURN', // İade et
}
export enum ActionStatusEnum {
// Eylem Durumu
Open = 'OPEN', // Açık
InProgress = 'IN_PROGRESS', // İşlemde
Completed = 'COMPLETED', // Tamamlandı
Cancelled = 'CANCELLED', // İptal edildi
}
export enum RequirementSourceTypeEnum {
// Gereksinim Kaynak Türü
SalesOrder = 'SALES_ORDER', // Satış Siparişi
Forecast = 'FORECAST', // Tahmin
SafetyStock = 'SAFETY_STOCK', // Güvenlik Stoku
ProductionOrder = 'PRODUCTION_ORDER', // Üretim Emri
}
export enum RecommendationTypeEnum {
// Tavsiye Türü
PlannedOrder = 'PLANNED_ORDER', // Planlanan Sipariş
PurchaseRequisition = 'PURCHASE_REQUISITION', // Satınalma Talebi
Reschedule = 'RESCHEDULE', // Yeniden Planla
Cancel = 'CANCEL', // İptal Et
}
export enum RecommendationStatusEnum {
// Tavsiye Durumu
Open = 'OPEN', // Açık
Implemented = 'IMPLEMENTED', // Uygulandı
Rejected = 'REJECTED', // Reddedildi
Expired = 'EXPIRED', // Süresi Doldu
}
export enum ForecastMethodEnum {
// Tahmin Yöntemi
MovingAverage = 'MOVING_AVERAGE', // Hareketli Ortalama
ExponentialSmoothing = 'EXPONENTIAL_SMOOTHING', // Üstel Yumuşatma
LinearRegression = 'LINEAR_REGRESSION', // Doğrusal Regresyon
Seasonal = 'SEASONAL', // Mevsimsel
}
export enum SecurityLevelEnum {
// Güvenlik Seviyesi
Low = 'LOW', // Düşük
Medium = 'MEDIUM', // Orta
High = 'HIGH', // Yüksek
Restricted = 'RESTRICTED', // Kısıtlı
}
export enum BOMTypeEnum {
// BOM Türü
Production = 'PROD', // Üretim
Engineering = 'ENG', // Mühendislik
Planning = 'PLAN', // Planlama
Costing = 'COST', // Maliyetlendirme
}
export enum RoutingStatusEnum {
// Rota Durumu
Draft = 'DRAFT', // Taslak
Active = 'ACTIVE', // Aktif
Inactive = 'INACTIVE', // Pasif
Obsolete = 'OBSOLETE', // Kullanım dışı
}
export enum OperationCategoryEnum {
// Operasyon Kategorisi
Production = 'PROD', // Üretim
Assembly = 'ASSY', // Montaj
Inspection = 'INSP', // Muayene
Packaging = 'PACK', // Ambalajlama
Setup = 'SETUP', // Kurulum
Maintenance = 'MAINT', // Bakım
Transport = 'TRANS', // Taşıma
Quality = 'QUAL', // Kalite
}

View file

@ -1,294 +0,0 @@
import { DepartmentDto } from '@/proxy/intranet/models'
import { PriorityEnum } from './common'
import { MmMaterial } from './mm'
export type CalendarView = 'month' | 'week' | 'day'
export interface PmWorkCenter {
// İş Merkezi / Ekipman
id: string
code: string
name: string
description?: string
manufacturer?: string
model?: string
serialNumber?: string
installationDate: Date
warrantyExpiry?: Date
location: string
departmentId: string
department?: DepartmentDto
status: WorkCenterStatusEnum
criticality: CriticalityLevelEnum
specifications: PmWorkCenterSpecification[]
maintenancePlans: PmMaintenancePlan[]
workOrders: PmMaintenanceWorkOrder[]
downTimeHistory: PmDownTimeRecord[]
capacity: number
costPerHour: number
setupTime: number
machineTypeId: string
machineType?: PmMachineType
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface PmWorkCenterType {
// İş Merkezi / Ekipman Türü
id: string
code: string
name: string
description?: string
category: string
isActive: boolean
}
export interface PmMachineType {
// Makina Türü
id: string
code: string
name: string
isActive: boolean
}
export interface PmWorkCenterSpecification {
// İş Merkezi / Ekipman Özelliği
id: string
workCenterId: string
specificationName: string
specificationValue: string
unit?: string
isRequired: boolean
}
export interface PmMaintenancePlan {
// Bakım Planı
id: string
planCode: string
workCenterId: string
workCenter?: PmWorkCenter
planType: MaintenancePlanTypeEnum
description: string
frequency: number
frequencyUnit: FrequencyUnitEnum
estimatedDuration: number // minutes
priority: PriorityEnum
maintenanceTeamId?: string
instructions?: string
requiredMaterials: PmPlanMaterial[]
requiredSkills: string[]
lastExecuted?: Date
nextDue: Date
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface PmPlanMaterial {
// Bakım Planı İçin Gerekli Malzeme
id: string
planId: string
materialId: string
material?: MmMaterial
quantity: number
unitId: string
isRequired: boolean
}
export interface PmMaintenanceWorkOrder {
// Bakım İş Emri
id: string
workOrderNumber: string
workCenterId: string
workCenter?: PmWorkCenter
planId?: string
plan?: PmMaintenancePlan
orderType: WorkOrderTypeEnum
priority: PriorityEnum
status: WorkOrderStatusEnum
description: string
reportedBy: string
assignedTo?: string
maintenanceTeamId?: string
scheduledStart?: Date
scheduledEnd?: Date
actualStart?: Date
actualEnd?: Date
estimatedCost: number
actualCost: number
materials: PmWorkOrderMaterial[]
activities: PmWorkOrderActivity[]
notes?: string
completionNotes?: string
creationTime: Date
lastModificationTime: Date
}
export interface PmWorkOrderMaterial {
// Bakım İş Emri İçin Kullanılan Malzeme
id: string
workOrderId: string
materialId: string
materialCode?: string
materialName?: string
material?: MmMaterial
plannedQuantity: number
actualQuantity: number
unitCost: number
totalCost: number
}
export interface PmWorkOrderActivity {
// Bakım İş Emri Faaliyeti
id: string
workOrderId: string
activityDescription: string
plannedDuration: number
actualDuration: number
performedBy: string
completedAt?: Date
notes?: string
}
export interface PmDownTimeRecord {
// İş Merkezi / Ekipman Arıza Süreç Kaydı
id: string
workCenterId: string
workOrderId?: string
downTimeStart: Date
downTimeEnd?: Date
duration?: number // minutes
reason: string
impact: DownTimeImpactEnum
cost: number
description?: string
}
export interface PmFaultNotification {
// Arıza Bildirimi
id: string
notificationCode: string
workCenterId: string
workCenter: PmWorkCenter
location: string
faultType: FaultTypeEnum
priority: PriorityEnum
severity: CriticalityLevelEnum
title: string
description: string
reportedBy: string
reportedAt: Date
assignedTo?: string
status: NotificationStatusEnum
images?: string[]
estimatedRepairTime?: number // minutes
actualRepairTime?: number // minutes
resolutionNotes?: string
closedBy?: string
closedAt?: Date
workOrderId?: string
followUpRequired: boolean
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface PmCalendarEvent {
// Bakım Takvimi Etkinliği
id: string
title: string
type: 'plan' | 'workorder'
date: Date
startTime?: string
endTime?: string
status: WorkOrderStatusEnum
priority: PriorityEnum
assignedTo?: string
workCenterCode?: string
duration: number // minutes
}
export enum CriticalityLevelEnum {
// Kritik Seviye
Low = 'LOW', // Düşük
Medium = 'MEDIUM', // Orta
High = 'HIGH', // Yüksek
Critical = 'CRITICAL', // Kritik
}
export enum MaintenancePlanTypeEnum {
// Bakım Plan Türü
Preventive = 'PREVENTIVE', // Önleyici
Predictive = 'PREDICTIVE', // Tahmine Dayalı
Corrective = 'CORRECTIVE', // Düzeltici
Condition = 'CONDITION', // Durum Bazlı
}
export enum FrequencyUnitEnum {
// Frekans Birimi
Days = 'DAYS', // Günler
Weeks = 'WEEKS', // Haftalar
Months = 'MONTHS', // Aylar
Years = 'YEARS', // Yıllar
Hours = 'HOURS', // Saatler
Cycles = 'CYCLES', // Döngüler
}
export enum WorkOrderTypeEnum {
// İş Emri Türü
Preventive = 'PREVENTIVE', // Önleyici
Corrective = 'CORRECTIVE', // Düzeltici
Emergency = 'EMERGENCY', // Acil
Inspection = 'INSPECTION', // Denetim
Calibration = 'CALIBRATION', // Kalibrasyon
}
export enum WorkOrderStatusEnum {
// İş Emri Durumu
Created = 'CREATED', // Oluşturuldu
Planned = 'PLANNED', // Planlandı
Released = 'RELEASED', // Serbest Bırakıldı
InProgress = 'IN_PROGRESS', // Devam Ediyor
OnHold = 'ON_HOLD', // Beklemede
Completed = 'COMPLETED', // Tamamlandı
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum DownTimeImpactEnum {
// Arıza Süreç Etkisi
Low = 'LOW', // DÜŞÜK
Medium = 'MEDIUM', // ORTA
High = 'HIGH', // YÜKSEK
Critical = 'CRITICAL', // KRİTİK
}
export enum FaultTypeEnum {
// Arıza Türü
Mechanical = 'MECHANICAL', // Mekanik
Electrical = 'ELECTRICAL', // Elektrik
Hydraulic = 'HYDRAULIC', // Hidrolik
Pneumatic = 'PNEUMATIC', // Pnömatik
Software = 'SOFTWARE', // Yazılım
Safety = 'SAFETY', // Güvenlik
Performance = 'PERFORMANCE', // Performans
Other = 'OTHER', // Diğer
}
export enum NotificationStatusEnum {
// Bildirim Durumu
Open = 'OPEN', // Açık
Assigned = 'ASSIGNED', // Atandı
InProgress = 'IN_PROGRESS', // Devam Ediyor
Resolved = 'RESOLVED', // Çözüldü
Closed = 'CLOSED', // Kapandı
Rejected = 'REJECTED', // Reddedildi
}
export enum WorkCenterStatusEnum {
// İş Merkezi / Ekipman Durumu
Operational = 'OPERATIONAL', // OPERATİF
UnderMaintenance = 'UNDER_MAINTENANCE', // BAKIMDA
OutOfOrder = 'OUT_OF_ORDER', // ARIZALI
Retired = 'RETIRED', // ESKİ
}

View file

@ -1,373 +0,0 @@
import { EmployeeDto } from '@/proxy/intranet/models'
import { BusinessParty, PriorityEnum } from './common'
export interface PsProject {
// Proje
id: string
code: string
name: string
description?: string
projectType: ProjectTypeEnum
status: ProjectStatusEnum
priority: PriorityEnum
customerId?: string
customer?: BusinessParty
projectManagerId: string
projectManager?: EmployeeDto
startDate: Date
endDate: Date
actualStartDate?: Date
actualEndDate?: Date
budget: number
actualCost: number
currency: string
progress: number
phases: PsProjectPhase[]
tasks: PsProjectTask[]
risks: PsProjectRisk[]
documents: PsProjectDocument[]
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface PsProjectPhase {
// Proje Fazı
id: string
projectId: string
project?: PsProject
code: string
name: string
description?: string
sequence: number
startDate: Date
endDate: Date
actualStartDate?: Date
actualEndDate?: Date
status: PhaseStatusEnum
budget: number
actualCost: number
progress: number
tasks: PsProjectTask[]
isActive: boolean
milestones: number
completedMilestones: number
assignedTeams: string[]
deliverables: string[]
risks: string[]
category: PhaseCategoryEnum
}
export interface PsProjectTask {
// Proje Görevi
id: string
projectId: string
phaseId?: string
phase?: PsProjectPhase
taskCode: string
name: string
description?: string
taskType: TaskTypeEnum
status: TaskStatusEnum
priority: PriorityEnum
assignedTo?: string
assignee?: EmployeeDto
startDate: Date
endDate: Date
actualStartDate?: Date
actualEndDate?: Date
estimatedHours: number
actualHours: number
progress: number
activities: PsTaskActivity[]
comments: PsTaskComment[]
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface PsProjectRisk {
// Proje Riski
id: string
projectId: string
riskCode: string
title: string
description: string
category: RiskCategoryEnum
probability: RiskProbabilityEnum
impact: RiskImpactEnum
riskLevel: RiskLevelEnum
status: RiskStatusEnum
identifiedBy: string
identifiedDate: Date
mitigationPlan?: string
contingencyPlan?: string
ownerId?: string
reviewDate?: Date
isActive: boolean
}
export interface PsTaskActivity {
// Görev Aktivitesi
id: string
taskId: string
activityType: PsActivityTypeEnum
description: string
performedBy: string
performedAt: Date
hoursSpent?: number
notes?: string
}
export interface PsTaskComment {
// Görev Yorumu
id: string
taskId: string
comment: string
commentedBy: string
commentedAt: Date
isInternal: boolean
}
export interface PsProjectDocument {
// Proje Belgesi
id: string
projectId: string
documentName: string
documentType: PsDocumentTypeEnum
filePath: string
fileSize: number
uploadedBy: string
uploadedAt: Date
version: string
isActive: boolean
}
export interface PsActivity {
// Aktivite
id: string
activityType: PsActivityTypeEnum
name: string
description: string
category: string
defaultDuration: number // hours
isActive: boolean
creationTime: Date
lastModificationTime: Date
}
export interface PsProjectCostTracking {
// Proje Maliyet Takibi
id: string
projectId: string
projectName: string
projectCode: string
plannedBudget: number
actualCost: number
remainingBudget: number
plannedStartDate: Date
plannedEndDate: Date
actualStartDate?: Date
actualEndDate?: Date
plannedDuration: number // days
actualDuration?: number // days
progress: number // percentage
status: ProjectCostTrackingStatus
currency: string
lastUpdated: Date
}
export interface PsTaskDailyUpdate {
// Görev Günlük Güncellemesi
id: string
taskId: string
task?: PsProjectTask
employeeId: string
employee?: EmployeeDto
date: Date
hoursWorked: number
description: string
workType: WorkTypeEnum
progress: number // percentage
challenges?: string
nextSteps?: string
status: DailyUpdateStatusEnum
attachments?: string[]
creationTime: Date
lastModificationTime: Date
}
export interface PsGanttTask {
// Gantt Görevi
id: string
name: string
type: 'project' | 'phase' | 'task'
startDate: Date
endDate: Date
progress: number
assignee?: EmployeeDto
parentId?: string
children?: PsGanttTask[]
dependencies?: string[]
priority: PriorityEnum
status: TaskStatusEnum | ProjectStatusEnum | PhaseStatusEnum
hoursWorked?: number
estimatedHours?: number
level: number // indentation level
}
export enum WorkTypeEnum {
// İş Türü
Development = 'DEVELOPMENT', // Geliştirme
Testing = 'TESTING', // Test
Design = 'DESIGN', // Tasarım
Documentation = 'DOCUMENTATION', // Dokümantasyon
Meeting = 'MEETING', // Toplantı
Research = 'RESEARCH', // Araştırma
Debugging = 'DEBUGGING', // Hata Ayıklama
Review = 'REVIEW', // İnceleme
Other = 'OTHER', // Diğer
}
export enum DailyUpdateStatusEnum {
// Günlük Güncelleme Durumu
Draft = 'DRAFT', // Taslak
Submitted = 'SUBMITTED', // Gönderildi
Approved = 'APPROVED', // Onaylandı
Rejected = 'REJECTED', // Reddedildi
}
export enum ProjectTypeEnum {
// Proje Türü
Internal = 'INTERNAL', // Dahili
Customer = 'CUSTOMER', // Müşteri
Research = 'RESEARCH', // Araştırma
Maintenance = 'MAINTENANCE', // Bakım
Development = 'DEVELOPMENT', // Geliştirme
}
export enum ProjectStatusEnum {
// Proje Durumu
Planning = 'PLANNING', // Planlama
Active = 'ACTIVE', // Aktif
OnHold = 'ON_HOLD', // Beklemede
Completed = 'COMPLETED', // Tamamlandı
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum PhaseCategoryEnum {
// Category of Phase
Planning = 'PLANNING', // Planlama
Development = 'EXECUTION', // Yürütme
Testing = 'MONITORING', // İzleme
Deployment = 'CLOSURE', // Kapanış
Design = 'OTHER', // Diğer
}
export enum PhaseStatusEnum {
// Faz Durumu
NotStarted = 'NOT_STARTED', // Başlanmadı
InProgress = 'IN_PROGRESS', // Devam Ediyor
Completed = 'COMPLETED', // Tamamlandı
OnHold = 'ON_HOLD', // Beklemede
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum TaskStatusEnum {
// Görev Durumu
NotStarted = 'NOT_STARTED', // Başlanmadı
InProgress = 'IN_PROGRESS', // Devam Ediyor
Completed = 'COMPLETED', // Tamamlandı
OnHold = 'ON_HOLD', // Beklemede
Cancelled = 'CANCELLED', // İptal Edildi
}
export enum TaskTypeEnum {
// Görev Türü
Development = 'DEVELOPMENT', // Geliştirme
Testing = 'TESTING', // Test
Documentation = 'DOCUMENTATION', // Dokümantasyon
Review = 'REVIEW', // İnceleme
Deployment = 'DEPLOYMENT', // Dağıtım
Meeting = 'MEETING', // Toplantı
}
export enum RiskCategoryEnum {
// Risk Kategorisi
Technical = 'TECHNICAL', // Teknik
Schedule = 'SCHEDULE', // Zamanlama
Budget = 'BUDGET', // Bütçe
Resource = 'RESOURCE', // Kaynak
External = 'EXTERNAL', // Dışsal
Quality = 'QUALITY', // Kalite
}
export enum RiskProbabilityEnum {
// Risk Olasılığı
VeryLow = 'VERY_LOW', // Çok Düşük
Low = 'LOW', // Düşük
Medium = 'MEDIUM', // Orta
High = 'HIGH', // Yüksek
VeryHigh = 'VERY_HIGH', // Çok Yüksek
}
export enum RiskImpactEnum {
// Risk Etkisi
VeryLow = 'VERY_LOW', // Çok Düşük
Low = 'LOW', // Düşük
Medium = 'MEDIUM', // Orta
High = 'HIGH', // Yüksek
VeryHigh = 'VERY_HIGH', // Çok Yüksek
}
export enum RiskLevelEnum {
// Risk Seviyesi
Low = 'LOW', // Düşük
Medium = 'MEDIUM', // Orta
High = 'HIGH', // Yüksek
Critical = 'CRITICAL', // Kritik
}
export enum RiskStatusEnum {
// Risk Durumu
Identified = 'IDENTIFIED', // Belirlendi
Analyzing = 'ANALYZING', // Analiz Ediliyor
Mitigating = 'MITIGATING', // Azaltılıyor
Monitoring = 'MONITORING', // İzleniyor
Closed = 'CLOSED', // Kapatıldı
}
export enum PsActivityTypeEnum {
// Aktivite Türü
WorkLog = 'WORK_LOG', // İş Günlüğü
StatusUpdate = 'STATUS_UPDATE', // Durum Güncellemesi
Issue = 'ISSUE', // Sorun
Meeting = 'MEETING', // Toplantı
Review = 'REVIEW', // İnceleme
TaskCreated = 'TASK_CREATED', // Görev Oluşturuldu
TaskUpdated = 'TASK_UPDATED', // Görev Güncellendi
TaskCompleted = 'TASK_COMPLETED', // Görev Tamamlandı
CommentAdded = 'COMMENT_ADDED', // Yorum Eklendi
FileUploaded = 'FILE_UPLOADED', // Dosya Yüklendi
StatusChanged = 'STATUS_CHANGED', // Durum Değişti
AssignmentChanged = 'ASSIGNMENT_CHANGED', // Atama Değişti
MeetingScheduled = 'MEETING_SCHEDULED', // Toplantı Planlandı
}
export enum PsDocumentTypeEnum {
// Belge Türü
Specification = 'SPECIFICATION', // Spesifikasyon
Design = 'DESIGN', // Tasarım
Contract = 'CONTRACT', // Sözleşme
Report = 'REPORT', // Rapor
Manual = 'MANUAL', // Kılavuz
Other = 'OTHER', // Diğer
}
export enum ProjectCostTrackingStatus {
// Proje Maliyet Takibi Durumu
OnTrack = 'ON_TRACK', // Planında
AtRisk = 'AT_RISK', // Riskte
Delayed = 'DELAYED', // Gecikmiş
Completed = 'COMPLETED', // Tamamlandı
}

View file

@ -1,256 +0,0 @@
import { Address } from './common'
import { MmMaterial } from './mm'
import { SecurityLevelEnum } from './mrp'
export interface WmWarehouse {
// Depo
id: string
code: string
name: string
description?: string
address?: Address
warehouseType: WarehouseTypeEnum
locations: WmLocation[]
isMainWarehouse: boolean
capacity: number
currentUtilization: number
zones: WmZone[]
isActive: boolean
securityLevel: SecurityLevelEnum
temperatureControlled: boolean
managerId: number
creationTime: Date
lastModificationTime: Date
}
export interface WmZone {
// Bölge
id: string
warehouseId: string
zoneCode: string
name: string
description?: string
zoneType: ZoneTypeEnum
temperature?: number
humidity?: number
locations: WmLocation[]
isActive: boolean
}
export interface WmLocation {
// Lokasyon
id: string
warehouseId: string
zoneId: string
locationCode: string
name: string
description?: string
locationType: LocationTypeEnum
capacity: number
currentStock: number
dimensions?: WmLocationDimensions
restrictions?: string[]
stockItems: WmStockItem[]
isActive: boolean
}
export interface WmLocationDimensions {
// Lokasyon Boyutları
length: number
width: number
height: number
weight: number
unit: string
}
export interface WmStockItem {
// Stok Kalemi
id: string
materialId: string
material?: MmMaterial
warehouseId: string
zoneId: string
locationId: string
quantity: number
reservedQuantity: number
availableQuantity: number
unitId: string
lotNumber?: string
serialNumber?: string
expiryDate?: Date
receivedDate: Date
lastMovementDate: Date
status: StockStatusEnum
}
export interface WmInventoryCount {
// Envanter Sayımı
id: string
countNumber: string
warehouseId: string
warehouse?: WmWarehouse
zoneId?: string
zone?: WmZone
locationId?: string
location?: WmLocation
countType: CountTypeEnum
status: CountStatusEnum
scheduledDate: Date
startDate?: Date
endDate?: Date
countedBy: string[]
approvedBy?: string
items: WmInventoryCountItem[]
variances: WmInventoryVariance[]
notes?: string
creationTime: Date
lastModificationTime: Date
}
export interface WmInventoryCountItem {
// Envanter Sayım Kalemi
id: string
countId: string
materialId: string
material?: MmMaterial
locationId: string
systemQuantity: number
countedQuantity: number
variance: number
variancePercentage: number
lotNumber?: string
serialNumber?: string
countedBy: string
countedAt: Date
notes?: string
}
export interface WmInventoryVariance {
// Envanter Farkı
id: string
countId: string
materialId: string
locationId: string
variance: number
varianceValue: number
reason?: string
action: VarianceActionEnum
adjustmentMade: boolean
approvedBy?: string
approvedAt?: Date
}
export interface WmPutawayRule {
// Yerleştirme Kuralı
id: string
code: string
name: string
description?: string
warehouseId: string
materialTypeId?: string
materialGroupId?: string
priority: number
conditions: WmPutawayCondition[]
targetZoneId?: string
targetLocationId?: string
strategy: PutawayStrategyEnum
isActive: boolean
}
export interface WmPutawayCondition {
// Yerleştirme Koşulu
id: string
ruleId: string
conditionType: ConditionTypeEnum
operator: ConditionOperatorEnum
value: string
}
export enum WarehouseTypeEnum {
// Depo Türleri
RawMaterials = 'RAW_MATERIALS', // Hammaddeler
FinishedGoods = 'FINISHED_GOODS', // Mamuller
WorkInProgress = 'WIP', // İşlenmekte olan ürünler
SpareParts = 'SPARE_PARTS', // Yedek Parçalar
Returns = 'RETURNS', // İadeler
Quarantine = 'QUARANTINE', // Karantina
Transit = 'TRANSIT', // Geçici Depo
}
export enum ZoneTypeEnum {
// Bölge Türleri
Storage = 'STORAGE', // Depolama
Receiving = 'RECEIVING', // Giriş
Shipping = 'SHIPPING', // Çıkış
Picking = 'PICKING', // Toplama
Quality = 'QUALITY', // Kalite Kontrol
Staging = 'STAGING', // Sevkiyat Hazırlık
}
export enum LocationTypeEnum {
// Lokasyon Türleri
Shelf = 'SHELF', // Raf
Bin = 'BIN', // Kutu
Floor = 'FLOOR', // Zemin
Rack = 'RACK', // Palet Rafı
Tank = 'TANK', // Tank
}
export enum StockStatusEnum {
// Stok Durumları
Available = 'AVAILABLE', // Mevcut
Reserved = 'RESERVED', // Rezerve Edilmiş
Blocked = 'BLOCKED', // Engellenmiş
InTransit = 'IN_TRANSIT', // Transferde
Quarantine = 'QUARANTINE', // Karantina
}
export enum CountTypeEnum {
// Sayım Türleri
Full = 'FULL', // Tam Sayım
Cycle = 'CYCLE', // Döngüsel Sayım
Spot = 'SPOT', // Noktasal Sayım
}
export enum CountStatusEnum {
// Sayım Durumları
Planned = 'PLANNED', // Planlandı
InProgress = 'IN_PROGRESS', // Devam Ediyor
Completed = 'COMPLETED', // Tamamlandı
Approved = 'APPROVED', // Onaylandı
}
export enum VarianceActionEnum {
// Fark Eylem Türleri
Accept = 'ACCEPT', // Kabul Et
Investigate = 'INVESTIGATE', // Araştır
Recount = 'RECOUNT', // Yeniden Say
Adjust = 'ADJUST', // Düzelt
}
export enum PutawayStrategyEnum {
// Yerleştirme Stratejileri
FIFO = 'FIFO', // First In First Out
LIFO = 'LIFO', // Last In First Out
NearestLocation = 'NEAREST_LOCATION', // En Yakın Lokasyon
EmptyLocation = 'EMPTY_LOCATION', // Boş Lokasyon
SameProduct = 'SAME_PRODUCT', // Aynı Ürün
}
export enum ConditionTypeEnum {
// Koşul Türleri
MaterialType = 'MATERIAL_TYPE', // Malzeme Türü
MaterialGroup = 'MATERIAL_GROUP', // Malzeme Grubu
Quantity = 'QUANTITY', // Miktar
Weight = 'WEIGHT', // Ağırlık
Volume = 'VOLUME', // Hacim
}
export enum ConditionOperatorEnum {
// Koşul Operatörleri
Equals = 'EQUALS', // Eşittir
NotEquals = 'NOT_EQUALS', // Eşit Değildir
GreaterThan = 'GREATER_THAN', // Daha Büyüktür
LessThan = 'LESS_THAN', // Daha Küçüktür
Contains = 'CONTAINS', // İçerir
}

File diff suppressed because it is too large Load diff

View file

@ -1,218 +0,0 @@
import React, { useState, useEffect } from 'react'
import BankManagement from './components/BankManagement'
import BankAccountForm from './components/BankAccountForm'
import BankMovementForm from './components/BankMovementForm'
import BankAccountDetails from './components/BankAccountDetails'
import {
FiBankMovement,
BankAccountTypeEnum,
BankTransactionTypeEnum,
TransactionStatusEnum,
} from '../../types/fi'
import { mockBanks } from '../../mocks/mockBanks'
import { mockBankMovements } from '../../mocks/mockBankMovements'
import { BankAccount } from '../../types/common'
import { Container } from '@/components/shared'
const BankPage: React.FC = () => {
const [bankAccounts, setBankAccounts] = useState<BankAccount[]>(mockBanks)
const [bankMovements, setBankMovements] = useState<FiBankMovement[]>([])
// Initialize bank movements after bank accounts are set
useEffect(() => {
if (bankAccounts.length > 0) {
setBankMovements(mockBankMovements)
}
}, [bankAccounts])
// Modal states
const [isAccountFormOpen, setIsAccountFormOpen] = useState(false)
const [isMovementFormOpen, setIsMovementFormOpen] = useState(false)
const [isAccountDetailsOpen, setIsAccountDetailsOpen] = useState(false)
const [selectedAccount, setSelectedAccount] = useState<BankAccount | undefined>(undefined)
const [selectedMovement, setSelectedMovement] = useState<FiBankMovement | undefined>(undefined)
const handleAddAccount = () => {
setSelectedAccount(undefined)
setIsAccountFormOpen(true)
}
const handleEditAccount = (account: BankAccount) => {
setSelectedAccount(account)
setIsAccountFormOpen(true)
}
const handleAddMovement = () => {
setSelectedMovement(undefined)
setIsMovementFormOpen(true)
}
const handleEditMovement = (movement: FiBankMovement) => {
setSelectedMovement(movement)
setIsMovementFormOpen(true)
}
const handleViewDetails = (account: BankAccount) => {
setSelectedAccount(account)
setIsAccountDetailsOpen(true)
}
const handleSaveAccount = (accountData: Partial<BankAccount>) => {
if (selectedAccount) {
// Update existing account
setBankAccounts((prev) =>
prev.map((acc) =>
acc.id === selectedAccount.id
? { ...acc, ...accountData, lastModificationTime: new Date() }
: acc,
),
)
} else {
// Add new account
const newAccount: BankAccount = {
id: Date.now().toString(),
accountCode: accountData.accountCode || '',
bankName: accountData.bankName || '',
branchName: accountData.branchName || '',
accountNumber: accountData.accountNumber || '',
iban: accountData.iban || '',
accountType: accountData.accountType || BankAccountTypeEnum.Current,
currency: accountData.currency || 'TRY',
balance: accountData.balance || 0,
overdraftLimit: accountData.overdraftLimit || 0,
dailyTransferLimit: accountData.dailyTransferLimit || 0,
contactPerson: accountData.contactPerson,
phoneNumber: accountData.phoneNumber,
isActive: accountData.isActive ?? true,
creationTime: new Date(),
lastModificationTime: new Date(),
isDefault: false,
}
setBankAccounts((prev) => [...prev, newAccount])
}
setIsAccountFormOpen(false)
setSelectedAccount(undefined)
}
const handleSaveMovement = (movementData: Partial<FiBankMovement>) => {
if (selectedMovement) {
// Update existing movement
setBankMovements((prev) =>
prev.map((mov) => (mov.id === selectedMovement.id ? { ...mov, ...movementData } : mov)),
)
} else {
// Add new movement
const bankAccount = bankAccounts.find((acc) => acc.id === movementData.bankAccountId)
const newMovement: FiBankMovement = {
id: Date.now().toString(),
bankAccountId: movementData.bankAccountId || '',
bankAccount: bankAccount,
transactionDate: movementData.transactionDate || new Date(),
valueDate: movementData.valueDate || new Date(),
description: movementData.description || '',
referenceNumber: movementData.referenceNumber,
transactionType: movementData.transactionType || BankTransactionTypeEnum.Deposit,
amount: movementData.amount || 0,
currency: movementData.currency || 'TRY',
recipientName: movementData.recipientName,
recipientIban: movementData.recipientIban,
recipientBank: movementData.recipientBank,
currentAccountId: movementData.currentAccountId,
status: movementData.status || TransactionStatusEnum.Pending,
creationTime: new Date(),
}
setBankMovements((prev) => [...prev, newMovement])
// Update account balance
if (bankAccount) {
const isIncoming = [
BankTransactionTypeEnum.Deposit,
BankTransactionTypeEnum.Interest,
].includes(newMovement.transactionType)
const isOutgoing = [
BankTransactionTypeEnum.Withdrawal,
BankTransactionTypeEnum.Transfer,
BankTransactionTypeEnum.EFT,
BankTransactionTypeEnum.Fee,
].includes(newMovement.transactionType)
if (newMovement.status === TransactionStatusEnum.Completed) {
const balanceChange = isIncoming
? newMovement.amount
: isOutgoing
? -newMovement.amount
: 0
setBankAccounts((prev) =>
prev.map((acc) =>
acc.id === bankAccount.id
? {
...acc,
balance: acc.balance + balanceChange,
lastModificationTime: new Date(),
}
: acc,
),
)
}
}
}
setIsMovementFormOpen(false)
setSelectedMovement(undefined)
}
return (
<Container>
<BankManagement
bankAccounts={bankAccounts}
bankMovements={bankMovements}
onAddAccount={handleAddAccount}
onEditAccount={handleEditAccount}
onAddMovement={handleAddMovement}
onEditMovement={handleEditMovement}
onViewDetails={handleViewDetails}
/>
{/* Bank Account Form Modal */}
<BankAccountForm
account={selectedAccount}
isOpen={isAccountFormOpen}
onClose={() => {
setIsAccountFormOpen(false)
setSelectedAccount(undefined)
}}
onSave={handleSaveAccount}
/>
{/* Bank Movement Form Modal */}
<BankMovementForm
movement={selectedMovement}
bankAccounts={bankAccounts}
isOpen={isMovementFormOpen}
onClose={() => {
setIsMovementFormOpen(false)
setSelectedMovement(undefined)
}}
onSave={handleSaveMovement}
/>
{/* Bank Account Details Modal */}
{selectedAccount && (
<BankAccountDetails
account={selectedAccount}
movements={bankMovements}
isOpen={isAccountDetailsOpen}
onClose={() => {
setIsAccountDetailsOpen(false)
setSelectedAccount(undefined)
}}
onEdit={(account) => {
setIsAccountDetailsOpen(false)
handleEditAccount(account)
}}
/>
)}
</Container>
)
}
export default BankPage

View file

@ -1,171 +0,0 @@
import React, { useState } from 'react'
import CashManagement from './components/CashManagement'
import CashAccountForm from './components/CashAccountForm'
import CashMovementForm from './components/CashMovementForm'
import CashAccountDetails from './components/CashAccountDetails'
import { FiCashAccount, FiCashMovement, CashMovementTypeEnum } from '../../types/fi'
import { mockCashAccounts } from '../../mocks/mockCashAccounts'
import { mockCashMovements } from '../../mocks/mockCashMovements'
import { Container } from '@/components/shared'
const CashPage: React.FC = () => {
const [showAccountForm, setShowAccountForm] = useState(false)
const [showMovementForm, setShowMovementForm] = useState(false)
const [showAccountDetails, setShowAccountDetails] = useState(false)
const [editingAccount, setEditingAccount] = useState<FiCashAccount | undefined>()
const [editingMovement, setEditingMovement] = useState<FiCashMovement | undefined>()
const [viewingAccount, setViewingAccount] = useState<FiCashAccount | undefined>()
const [cashAccounts, setCashAccounts] = useState(mockCashAccounts)
const [cashMovements, setCashMovements] = useState(mockCashMovements)
const handleAddAccount = () => {
setEditingAccount(undefined)
setShowAccountForm(true)
}
const handleEditAccount = (account: FiCashAccount) => {
setEditingAccount(account)
setShowAccountForm(true)
}
const handleSaveAccount = (accountData: Omit<FiCashAccount, 'id'>) => {
if (editingAccount) {
// Update existing account
setCashAccounts((prev) =>
prev.map((acc) =>
acc.id === editingAccount.id ? { ...accountData, id: editingAccount.id } : acc,
),
)
} else {
// Add new account
const newAccount: FiCashAccount = {
...accountData,
id: Date.now().toString(),
}
setCashAccounts((prev) => [...prev, newAccount])
}
setShowAccountForm(false)
setEditingAccount(undefined)
}
const handleAddMovement = () => {
setEditingMovement(undefined)
setShowMovementForm(true)
}
const handleEditMovement = (movement: FiCashMovement) => {
setEditingMovement(movement)
setShowMovementForm(true)
}
const handleSaveMovement = (movementData: Omit<FiCashMovement, 'id'>) => {
if (editingMovement) {
// Update existing movement
setCashMovements((prev) =>
prev.map((mov) =>
mov.id === editingMovement.id ? { ...movementData, id: editingMovement.id } : mov,
),
)
} else {
// Add new movement
const newMovement: FiCashMovement = {
...movementData,
id: Date.now().toString(),
}
setCashMovements((prev) => [...prev, newMovement])
}
// Update cash account balance
if (movementData.cashAccount) {
setCashAccounts((prev) =>
prev.map((acc) => {
if (acc.id === movementData.cashAccount?.id) {
const balanceChange =
movementData.movementType === CashMovementTypeEnum.Income
? movementData.amount
: -movementData.amount
return {
...acc,
balance: acc.balance + balanceChange,
lastModificationTime: new Date(),
}
}
return acc
}),
)
}
setShowMovementForm(false)
setEditingMovement(undefined)
}
const handleViewDetails = (account: FiCashAccount) => {
setViewingAccount(account)
setShowAccountDetails(true)
}
const handleCloseAccountForm = () => {
setShowAccountForm(false)
setEditingAccount(undefined)
}
const handleCloseMovementForm = () => {
setShowMovementForm(false)
setEditingMovement(undefined)
}
const handleCloseAccountDetails = () => {
setShowAccountDetails(false)
setViewingAccount(undefined)
}
return (
<Container>
<CashManagement
cashAccounts={cashAccounts}
cashMovements={cashMovements}
onAddAccount={handleAddAccount}
onEditAccount={handleEditAccount}
onAddMovement={handleAddMovement}
onEditMovement={handleEditMovement}
onViewDetails={handleViewDetails}
/>
{/* Account Form Modal */}
{showAccountForm && (
<CashAccountForm
account={editingAccount}
onSave={handleSaveAccount}
onCancel={handleCloseAccountForm}
isEdit={!!editingAccount}
/>
)}
{/* Movement Form Modal */}
{showMovementForm && (
<CashMovementForm
movement={editingMovement}
cashAccounts={cashAccounts}
onSave={handleSaveMovement}
onCancel={handleCloseMovementForm}
isEdit={!!editingMovement}
/>
)}
{/* Account Details Modal */}
{showAccountDetails && viewingAccount && (
<CashAccountDetails
account={viewingAccount}
movements={cashMovements}
onClose={handleCloseAccountDetails}
onEdit={(account) => {
setShowAccountDetails(false)
handleEditAccount(account)
}}
/>
)}
</Container>
)
}
export default CashPage

View file

@ -1,146 +0,0 @@
import React, { useState } from 'react'
import CheckNoteManagement from './components/CheckNoteManagement'
import { FiCheck, PromissoryNote, CheckStatusEnum, NoteStatusEnum } from '../../types/fi'
import { mockChecks } from '../../mocks/mockChecks'
import { mockPromissoryNotes } from '../../mocks/mockPromissoryNotes'
import { mockCurrentAccounts } from '../../mocks/mockCurrentAccounts'
import { Container } from '@/components/shared'
const CheckNotePage: React.FC = () => {
const [checks, setChecks] = useState<FiCheck[]>(mockChecks)
const [promissoryNotes, setPromissoryNotes] = useState<PromissoryNote[]>(mockPromissoryNotes)
const handleAddCheck = (
checkData: Omit<FiCheck, 'id' | 'creationTime' | 'lastModificationTime'>,
) => {
const newCheck: FiCheck = {
...checkData,
id: `check_${Date.now()}`,
creationTime: new Date(),
lastModificationTime: new Date(),
}
setChecks((prev) => [...prev, newCheck])
console.log('Check added:', newCheck)
}
const handleEditCheck = (
id: string,
checkData: Omit<FiCheck, 'id' | 'creationTime' | 'lastModificationTime'>,
) => {
setChecks((prev) =>
prev.map((check) =>
check.id === id ? { ...check, ...checkData, lastModificationTime: new Date() } : check,
),
)
console.log('Check updated:', id, checkData)
}
const handleAddNote = (
noteData: Omit<PromissoryNote, 'id' | 'creationTime' | 'lastModificationTime'>,
) => {
const newNote: PromissoryNote = {
...noteData,
id: `note_${Date.now()}`,
creationTime: new Date(),
lastModificationTime: new Date(),
}
setPromissoryNotes((prev) => [...prev, newNote])
console.log('Promissory note added:', newNote)
}
const handleEditNote = (
id: string,
noteData: Omit<PromissoryNote, 'id' | 'creationTime' | 'lastModificationTime'>,
) => {
setPromissoryNotes((prev) =>
prev.map((note) =>
note.id === id ? { ...note, ...noteData, lastModificationTime: new Date() } : note,
),
)
console.log('Promissory note updated:', id, noteData)
}
const handleCollectCheck = (id: string, collectionDate: Date) => {
setChecks((prev) =>
prev.map((check) =>
check.id === id
? {
...check,
status: CheckStatusEnum.Collected,
collectionDate,
lastModificationTime: new Date(),
}
: check,
),
)
console.log('Check collected:', id, collectionDate)
}
const handleCollectNote = (id: string, collectionDate: Date) => {
setPromissoryNotes((prev) =>
prev.map((note) =>
note.id === id
? {
...note,
status: NoteStatusEnum.Collected,
collectionDate,
lastModificationTime: new Date(),
}
: note,
),
)
console.log('Promissory note collected:', id, collectionDate)
}
const handleEndorseCheck = (id: string, endorsedTo: string) => {
setChecks((prev) =>
prev.map((check) =>
check.id === id
? {
...check,
status: CheckStatusEnum.Endorsed,
endorsedTo,
lastModificationTime: new Date(),
}
: check,
),
)
console.log('Check endorsed:', id, endorsedTo)
}
const handleEndorseNote = (id: string, endorsedTo: string) => {
setPromissoryNotes((prev) =>
prev.map((note) =>
note.id === id
? {
...note,
status: NoteStatusEnum.Endorsed,
endorsedTo,
lastModificationTime: new Date(),
}
: note,
),
)
console.log('Promissory note endorsed:', id, endorsedTo)
}
return (
<Container>
<CheckNoteManagement
checks={checks}
promissoryNotes={promissoryNotes}
currentAccounts={mockCurrentAccounts}
onAddCheck={handleAddCheck}
onEditCheck={handleEditCheck}
onAddNote={handleAddNote}
onEditNote={handleEditNote}
onCollectCheck={handleCollectCheck}
onCollectNote={handleCollectNote}
onEndorseCheck={handleEndorseCheck}
onEndorseNote={handleEndorseNote}
/>
</Container>
)
}
export default CheckNotePage

View file

@ -1,18 +0,0 @@
import React from 'react'
import CurrentAccountManagement from './components/CurrentAccountManagement'
import { mockCurrentAccounts } from '../../mocks/mockCurrentAccounts'
import { mockCurrentAccountMovements } from '../../mocks/mockCurrentAccountMovements'
import { Container } from '@/components/shared'
const CurrentAccountPage: React.FC = () => {
return (
<Container>
<CurrentAccountManagement
accounts={mockCurrentAccounts}
accountMovements={mockCurrentAccountMovements}
/>
</Container>
)
}
export default CurrentAccountPage

View file

@ -1,173 +0,0 @@
import React, { useState } from 'react'
import InvoiceManagement from './components/InvoiceManagement'
import InvoiceForm from './components/InvoiceForm'
import InvoiceDetails from './components/InvoiceDetails'
import PaymentForm from './components/PaymentForm'
import WaybillToInvoice from './components/WaybillToInvoice'
import { FiInvoice, PaymentMethodEnum, PaymentStatusEnum } from '../../types/fi'
import { mockInvoices } from '../../mocks/mockInvoices'
import { Container } from '@/components/shared'
interface PaymentData {
amount: number
paymentDate: Date
paymentMethod: PaymentMethodEnum
description: string
referenceNumber?: string
}
const InvoicePage: React.FC = () => {
const [invoices, setInvoices] = useState<FiInvoice[]>(mockInvoices)
const [showInvoiceForm, setShowInvoiceForm] = useState(false)
const [showInvoiceDetails, setShowInvoiceDetails] = useState(false)
const [showPaymentForm, setShowPaymentForm] = useState(false)
const [showWaybillToInvoice, setShowWaybillToInvoice] = useState(false)
const [selectedInvoice, setSelectedInvoice] = useState<FiInvoice | null>(null)
const [editingInvoice, setEditingInvoice] = useState<FiInvoice | null>(null)
const handleAdd = () => {
setEditingInvoice(null)
setShowInvoiceForm(true)
}
const handleEdit = (invoice: FiInvoice) => {
setEditingInvoice(invoice)
setShowInvoiceForm(true)
}
const handleCreatePayment = (invoice: FiInvoice) => {
setSelectedInvoice(invoice)
setShowPaymentForm(true)
}
const handleViewDetails = (invoice: FiInvoice) => {
setSelectedInvoice(invoice)
setShowInvoiceDetails(true)
}
const handleConvertFromWaybill = () => {
setShowWaybillToInvoice(true)
}
const handleSaveInvoice = (invoiceData: Partial<FiInvoice>) => {
if (editingInvoice) {
// Güncelleme
setInvoices((prev) =>
prev.map((inv) =>
inv.id === editingInvoice.id
? { ...inv, ...invoiceData, lastModificationTime: new Date() }
: inv,
),
)
} else {
// Yeni ekleme
const newInvoice: FiInvoice = {
id: Date.now().toString(),
creationTime: new Date(),
lastModificationTime: new Date(),
...invoiceData,
} as FiInvoice
setInvoices((prev) => [newInvoice, ...prev])
}
setShowInvoiceForm(false)
setEditingInvoice(null)
}
const handleSavePayment = (paymentData: PaymentData) => {
if (!selectedInvoice) return
// Ödeme bilgilerini faturaya ekle
const updatedInvoice = {
...selectedInvoice,
paidAmount: selectedInvoice.paidAmount + paymentData.amount,
remainingAmount: selectedInvoice.remainingAmount - paymentData.amount,
paymentStatus:
selectedInvoice.remainingAmount - paymentData.amount <= 0
? PaymentStatusEnum.Paid
: PaymentStatusEnum.PartiallyPaid,
lastModificationTime: new Date(),
}
setInvoices((prev) => prev.map((inv) => (inv.id === selectedInvoice.id ? updatedInvoice : inv)))
setShowPaymentForm(false)
setSelectedInvoice(null)
// Başarı mesajı
alert(
`${paymentData.amount.toLocaleString('tr-TR', {
style: 'currency',
currency: 'TRY',
})} tutarında ödeme kaydedildi.`,
)
}
const handleSaveFromWaybill = () => {
setShowWaybillToInvoice(false)
alert('İrsaliyelerden fatura başarıyla oluşturuldu.')
}
const handleCancelForm = () => {
setShowInvoiceForm(false)
setEditingInvoice(null)
}
const handleCancelDetails = () => {
setShowInvoiceDetails(false)
setSelectedInvoice(null)
}
const handleCancelPayment = () => {
setShowPaymentForm(false)
setSelectedInvoice(null)
}
const handleCancelWaybillToInvoice = () => {
setShowWaybillToInvoice(false)
}
return (
<Container>
<InvoiceManagement
invoices={invoices}
onAdd={handleAdd}
onEdit={handleEdit}
onCreatePayment={handleCreatePayment}
onViewDetails={handleViewDetails}
onConvertFromWaybill={handleConvertFromWaybill}
/>
<InvoiceForm
invoice={editingInvoice || undefined}
onSave={handleSaveInvoice}
onCancel={handleCancelForm}
isVisible={showInvoiceForm}
/>
{selectedInvoice && (
<>
<InvoiceDetails
invoice={selectedInvoice}
onClose={handleCancelDetails}
isVisible={showInvoiceDetails}
/>
<PaymentForm
invoice={selectedInvoice}
onSave={handleSavePayment}
onCancel={handleCancelPayment}
isVisible={showPaymentForm}
/>
</>
)}
<WaybillToInvoice
onClose={handleCancelWaybillToInvoice}
onInvoiceCreated={handleSaveFromWaybill}
isVisible={showWaybillToInvoice}
/>
</Container>
)
}
export default InvoicePage

View file

@ -1,139 +0,0 @@
import React, { useState } from 'react'
import WaybillManagement from './components/WaybillManagement'
import WaybillForm from './components/WaybillForm'
import WaybillDetails from './components/WaybillDetails'
import WaybillToInvoice from './components/WaybillToInvoice'
import { FiWaybill, WaybillStatusEnum } from '../../types/fi'
import { mockWaybills } from '../../mocks/mockWaybills'
import { Container } from '@/components/shared'
type ViewType = 'management' | 'form' | 'details' | 'createInvoice'
const WaybillPage: React.FC = () => {
const [currentView, setCurrentView] = useState<ViewType>('management')
const [waybills, setWaybills] = useState<FiWaybill[]>(mockWaybills)
const [selectedWaybill, setSelectedWaybill] = useState<FiWaybill | undefined>()
const handleAdd = () => {
setSelectedWaybill(undefined)
setCurrentView('form')
}
const handleEdit = (waybill: FiWaybill) => {
setSelectedWaybill(waybill)
setCurrentView('form')
}
const handleViewDetails = (waybill: FiWaybill) => {
setSelectedWaybill(waybill)
setCurrentView('details')
}
const handleCreateInvoice = (waybill: FiWaybill) => {
setSelectedWaybill(waybill)
setCurrentView('createInvoice')
}
const handleMarkAsDelivered = (waybill: FiWaybill) => {
setWaybills((prev) =>
prev.map((w) =>
w.id === waybill.id
? {
...w,
status: WaybillStatusEnum.Delivered,
lastModificationTime: new Date(),
}
: w,
),
)
alert(`${waybill.waybillNumber} numaralı irsaliye teslim edildi olarak işaretlendi.`)
}
const handleSaveWaybill = (waybillData: Partial<FiWaybill>) => {
if (selectedWaybill) {
// Update existing waybill
const updatedWaybills = waybills.map((w) =>
w.id === selectedWaybill.id
? {
...selectedWaybill,
...waybillData,
lastModificationTime: new Date(),
}
: w,
)
setWaybills(updatedWaybills)
} else {
// Create new waybill
const newWaybill: FiWaybill = {
...(waybillData as FiWaybill),
id: Date.now().toString(),
creationTime: new Date(),
lastModificationTime: new Date(),
}
setWaybills([...waybills, newWaybill])
}
setCurrentView('management')
setSelectedWaybill(undefined)
}
const handleCancel = () => {
setCurrentView('management')
setSelectedWaybill(undefined)
}
const handleInvoiceCreated = () => {
// Mark waybill as invoiced
if (selectedWaybill) {
const updatedWaybills = waybills.map((w) =>
w.id === selectedWaybill.id
? { ...w, isInvoiced: true, lastModificationTime: new Date() }
: w,
)
setWaybills(updatedWaybills)
}
setCurrentView('management')
setSelectedWaybill(undefined)
}
return (
<Container>
{currentView === 'management' && (
<WaybillManagement
waybills={waybills}
onAdd={handleAdd}
onEdit={handleEdit}
onViewDetails={handleViewDetails}
onCreateInvoice={handleCreateInvoice}
onMarkAsDelivered={handleMarkAsDelivered}
/>
)}
<WaybillForm
waybill={selectedWaybill}
onSave={handleSaveWaybill}
onCancel={handleCancel}
isVisible={currentView === 'form'}
/>
{selectedWaybill && (
<WaybillDetails
waybill={selectedWaybill}
onClose={handleCancel}
onCreateInvoice={() => handleCreateInvoice(selectedWaybill)}
isVisible={currentView === 'details'}
/>
)}
{selectedWaybill && (
<WaybillToInvoice
selectedWaybills={[selectedWaybill.id]}
onClose={handleCancel}
onInvoiceCreated={handleInvoiceCreated}
isVisible={currentView === 'createInvoice'}
/>
)}
</Container>
)
}
export default WaybillPage

View file

@ -1,477 +0,0 @@
import React from "react";
import {
FaBuilding,
FaTimes,
FaCreditCard,
FaMoneyBillWave,
FaUser,
FaCalendar,
FaTimesCircle,
} from "react-icons/fa";
import {
FiBankMovement,
BankTransactionTypeEnum,
TransactionStatusEnum,
} from "../../../types/fi";
import { BankAccount } from "../../../types/common";
import {
getBankAccountTypeText,
getTransactionStatusText,
getTransactionTypeText,
} from "../../../utils/erp";
interface BankAccountDetailsProps {
account: BankAccount;
movements: FiBankMovement[];
isOpen: boolean;
onClose: () => void;
onEdit: (account: BankAccount) => void;
}
const BankAccountDetails: React.FC<BankAccountDetailsProps> = ({
account,
movements,
isOpen,
onClose,
onEdit,
}) => {
const formatCurrency = (amount: number) => {
return amount.toLocaleString("tr-TR", {
style: "currency",
currency: account.currency || "TRY",
minimumFractionDigits: 2,
});
};
const formatIban = (iban: string) => {
return iban.replace(/(.{4})/g, "$1 ").trim();
};
const formatDate = (date: Date | string) => {
return new Date(date).toLocaleDateString("tr-TR");
};
// Calculate statistics
const accountMovements = movements.filter(
(m) => m.bankAccountId === account.id
);
const totalIncoming = accountMovements
.filter((m) =>
[
BankTransactionTypeEnum.Deposit,
BankTransactionTypeEnum.Interest,
].includes(m.transactionType)
)
.reduce((sum, m) => sum + m.amount, 0);
const totalOutgoing = accountMovements
.filter((m) =>
[
BankTransactionTypeEnum.Withdrawal,
BankTransactionTypeEnum.Transfer,
BankTransactionTypeEnum.EFT,
BankTransactionTypeEnum.Fee,
].includes(m.transactionType)
)
.reduce((sum, m) => sum + m.amount, 0);
const pendingTransactions = accountMovements.filter(
(m) => m.status === TransactionStatusEnum.Pending
);
const recentMovements = accountMovements
.sort(
(a, b) =>
new Date(b.transactionDate).getTime() -
new Date(a.transactionDate).getTime()
)
.slice(0, 10);
const isNearOverdraftLimit = () => {
const usedLimit = Math.abs(Math.min(account.balance, 0));
return (
account.overdraftLimit > 0 && usedLimit > account.overdraftLimit * 0.8
);
};
if (!isOpen) return null;
return (
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div className="bg-white rounded-lg shadow-xl max-w-4xl w-full mx-4 max-h-[90vh] overflow-y-auto text-sm">
<div className="flex items-center justify-between p-4 border-b border-gray-200">
<div className="flex items-center gap-2.5">
<FaBuilding className="w-5 h-5 text-blue-600" />
<div>
<h2 className="text-lg font-semibold text-gray-900">
Banka Hesap Detayları
</h2>
<p className="text-sm text-gray-500">
{account.bankName} - {account.accountNumber}
</p>
</div>
</div>
<div className="flex items-center gap-2">
<button
onClick={() => onEdit(account)}
className="flex items-center gap-2 px-3 py-1.5 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors text-sm"
>
Düzenle
</button>
<button
onClick={onClose}
className="p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors"
>
<FaTimes className="w-5 h-5" />
</button>
</div>
</div>
<div className="p-4">
{/* Account Overview */}
<div className="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
<div className="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-4 rounded-lg">
<div className="flex items-center justify-between">
<div>
<p className="text-blue-100">Güncel Bakiye</p>
<p className="text-xl font-bold">
{formatCurrency(account.balance)}
</p>
</div>
<FaMoneyBillWave className="w-7 h-7 text-blue-200" />
</div>
</div>
<div className="bg-gradient-to-r from-green-500 to-green-600 text-white p-4 rounded-lg">
<div className="flex items-center justify-between">
<div>
<p className="text-green-100">Toplam Gelen</p>
<p className="text-xl font-bold">
{formatCurrency(totalIncoming)}
</p>
</div>
<FaMoneyBillWave className="w-7 h-7 text-green-200" />
</div>
</div>
<div className="bg-gradient-to-r from-red-500 to-red-600 text-white p-4 rounded-lg">
<div className="flex items-center justify-between">
<div>
<p className="text-red-100">Toplam Çıkan</p>
<p className="text-xl font-bold">
{formatCurrency(totalOutgoing)}
</p>
</div>
<FaMoneyBillWave className="w-7 h-7 text-red-200" />
</div>
</div>
<div className="bg-gradient-to-r from-orange-500 to-orange-600 text-white p-4 rounded-lg">
<div className="flex items-center justify-between">
<div>
<p className="text-orange-100">Bekleyen İşlem</p>
<p className="text-xl font-bold">
{pendingTransactions.length}
</p>
</div>
<FaCreditCard className="w-7 h-7 text-orange-200" />
</div>
</div>
</div>
{/* Alerts */}
{isNearOverdraftLimit() && (
<div className="bg-orange-50 border border-orange-200 rounded-lg p-3 mb-4">
<div className="flex items-center gap-2">
<FaTimesCircle className="w-5 h-5 text-orange-600" />
<h3 className="text-base font-semibold text-orange-900">
Kredi Limiti Uyarısı
</h3>
</div>
<p className="text-orange-700 mt-1">
Bu hesap kredi limitinin %80'ine yaklaşmış durumda.
</p>
</div>
)}
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
{/* Account Information */}
<div className="space-y-4">
<div className="bg-gray-50 rounded-lg p-4">
<h3 className="text-base font-semibold text-gray-900 mb-3 flex items-center gap-2">
<FaBuilding className="w-5 h-5 text-blue-600" />
Hesap Bilgileri
</h3>
<div className="space-y-2">
<div className="flex justify-between">
<span className="text-gray-600">Hesap Kodu:</span>
<span className="font-medium">{account.accountCode}</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Banka:</span>
<span className="font-medium">{account.bankName}</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Şube:</span>
<span className="font-medium">{account.branchName}</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Hesap No:</span>
<span className="font-mono">{account.accountNumber}</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">IBAN:</span>
<span className="font-mono text-xs">
{formatIban(account.iban)}
</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Hesap Türü:</span>
<span className="px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded-full">
{getBankAccountTypeText(account.accountType)}
</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Para Birimi:</span>
<span className="px-2 py-1 text-xs font-medium bg-gray-100 text-gray-800 rounded-full">
{account.currency}
</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Durum:</span>
<span
className={`px-2 py-1 text-xs font-medium rounded-full ${
account.isActive
? "bg-green-100 text-green-800"
: "bg-gray-100 text-gray-800"
}`}
>
{account.isActive ? "Aktif" : "Pasif"}
</span>
</div>
</div>
</div>
<div className="bg-gray-50 rounded-lg p-4">
<h3 className="text-base font-semibold text-gray-900 mb-3 flex items-center gap-2">
<FaCreditCard className="w-5 h-5 text-green-600" />
Limitler
</h3>
<div className="space-y-2">
<div className="flex justify-between">
<span className="text-gray-600">Kredi Limiti:</span>
<span className="font-medium">
{formatCurrency(account.overdraftLimit)}
</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">
Günlük Transfer Limiti:
</span>
<span className="font-medium">
{formatCurrency(account.dailyTransferLimit)}
</span>
</div>
{account.overdraftLimit > 0 && (
<div className="flex justify-between">
<span className="text-gray-600">Kullanılan Kredi:</span>
<span
className={`font-medium ${
account.balance < 0
? "text-red-600"
: "text-green-600"
}`}
>
{account.balance < 0
? formatCurrency(Math.abs(account.balance))
: formatCurrency(0)}
</span>
</div>
)}
</div>
</div>
{(account.contactPerson || account.phoneNumber) && (
<div className="bg-gray-50 rounded-lg p-4">
<h3 className="text-base font-semibold text-gray-900 mb-3 flex items-center gap-2">
<FaUser className="w-5 h-5 text-purple-600" />
İletişim Bilgileri
</h3>
<div className="space-y-2">
{account.contactPerson && (
<div className="flex justify-between">
<span className="text-gray-600">İletişim Kişisi:</span>
<span className="font-medium">
{account.contactPerson}
</span>
</div>
)}
{account.phoneNumber && (
<div className="flex justify-between">
<span className="text-gray-600">Telefon:</span>
<span className="font-medium">{account.phoneNumber}</span>
</div>
)}
</div>
</div>
)}
<div className="bg-gray-50 rounded-lg p-4">
<h3 className="text-base font-semibold text-gray-900 mb-3 flex items-center gap-2">
<FaCalendar className="w-5 h-5 text-gray-600" />
Tarihler
</h3>
<div className="space-y-2">
<div className="flex justify-between">
<span className="text-gray-600">Oluşturulma:</span>
<span className="font-medium">
{formatDate(account.creationTime)}
</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Son Güncelleme:</span>
<span className="font-medium">
{formatDate(account.lastModificationTime)}
</span>
</div>
</div>
</div>
</div>
{/* Recent Movements */}
<div className="space-y-4">
<div className="bg-gray-50 rounded-lg p-4">
<h3 className="text-base font-semibold text-gray-900 mb-3">
Son Hareketler ({recentMovements.length})
</h3>
{recentMovements.length > 0 ? (
<div className="space-y-2 max-h-96 overflow-y-auto">
{recentMovements.map((movement) => {
const isIncoming = [
BankTransactionTypeEnum.Deposit,
BankTransactionTypeEnum.Interest,
].includes(movement.transactionType);
const isOutgoing = [
BankTransactionTypeEnum.Withdrawal,
BankTransactionTypeEnum.Transfer,
BankTransactionTypeEnum.EFT,
BankTransactionTypeEnum.Fee,
].includes(movement.transactionType);
return (
<div
key={movement.id}
className="bg-white rounded-lg p-3 border"
>
<div className="flex items-center justify-between mb-2">
<div className="flex items-center gap-2">
<span
className={`px-2 py-1 text-xs font-medium rounded-full ${
isIncoming
? "bg-green-100 text-green-800"
: isOutgoing
? "bg-red-100 text-red-800"
: "bg-gray-100 text-gray-800"
}`}
>
{getTransactionTypeText(
movement.transactionType
)}
</span>
<span
className={`px-2 py-1 text-xs font-medium rounded-full ${
movement.status ===
TransactionStatusEnum.Completed
? "bg-green-100 text-green-800"
: movement.status ===
TransactionStatusEnum.Pending
? "bg-yellow-100 text-yellow-800"
: movement.status ===
TransactionStatusEnum.Failed
? "bg-red-100 text-red-800"
: "bg-gray-100 text-gray-800"
}`}
>
{getTransactionStatusText(movement.status)}
</span>
</div>
<span
className={`font-medium ${
isIncoming
? "text-green-600"
: isOutgoing
? "text-red-600"
: "text-gray-600"
}`}
>
{isIncoming ? "+" : isOutgoing ? "-" : ""}
{formatCurrency(movement.amount)}
</span>
</div>
<div className="text-sm text-gray-900 font-medium mb-1">
{movement.description}
</div>
<div className="flex items-center justify-between text-xs text-gray-500">
<span>{formatDate(movement.transactionDate)}</span>
{movement.referenceNumber && (
<span>Ref: {movement.referenceNumber}</span>
)}
</div>
{movement.recipientName && (
<div className="text-xs text-blue-600 mt-1">
Alıcı: {movement.recipientName}
</div>
)}
</div>
);
})}
</div>
) : (
<div className="text-center py-6 text-gray-500">
<FaCalendar className="w-8 h-8 mx-auto mb-2 text-gray-300" />
<p>Henüz hareket bulunmamaktadır.</p>
</div>
)}
</div>
{pendingTransactions.length > 0 && (
<div className="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
<h3 className="text-base font-semibold text-yellow-900 mb-3 flex items-center gap-2">
<FaTimesCircle className="w-5 h-5 text-yellow-600" />
Bekleyen İşlemler ({pendingTransactions.length})
</h3>
<div className="space-y-1.5">
{pendingTransactions.slice(0, 5).map((movement) => (
<div
key={movement.id}
className="flex items-center justify-between py-2"
>
<div>
<div className="text-sm font-medium text-yellow-900">
{movement.description}
</div>
<div className="text-xs text-yellow-700">
{formatDate(movement.transactionDate)}
</div>
</div>
<span className="text-sm font-medium text-yellow-900">
{formatCurrency(movement.amount)}
</span>
</div>
))}
{pendingTransactions.length > 5 && (
<div className="text-xs text-yellow-700 text-center pt-2">
... ve {pendingTransactions.length - 5} işlem daha
</div>
)}
</div>
</div>
)}
</div>
</div>
</div>
</div>
</div>
);
};
export default BankAccountDetails;

View file

@ -1,427 +0,0 @@
import React, { useState, useEffect } from 'react'
import { FaSave, FaTimes, FaBuilding } from 'react-icons/fa'
import { BankAccountTypeEnum } from '../../../types/fi'
import { BankAccount } from '../../../types/common'
import { getBankAccountTypeText } from '@/utils/erp'
import { mockCurrencies } from '@/mocks/mockCurrencies'
interface BankAccountFormProps {
account?: BankAccount
isOpen: boolean
onClose: () => void
onSave: (account: Partial<BankAccount>) => void
}
const BankAccountForm: React.FC<BankAccountFormProps> = ({ account, isOpen, onClose, onSave }) => {
const [formData, setFormData] = useState<Partial<BankAccount>>({
accountCode: '',
bankName: '',
branchName: '',
accountNumber: '',
iban: '',
accountType: BankAccountTypeEnum.Current,
currency: 'TRY',
balance: 0,
overdraftLimit: 0,
dailyTransferLimit: 0,
contactPerson: '',
phoneNumber: '',
isActive: true,
})
const [errors, setErrors] = useState<Record<string, string>>({})
useEffect(() => {
if (account) {
setFormData(account)
} else {
setFormData({
accountCode: '',
bankName: '',
branchName: '',
accountNumber: '',
iban: '',
accountType: BankAccountTypeEnum.Current,
currency: 'TRY',
balance: 0,
overdraftLimit: 0,
dailyTransferLimit: 0,
contactPerson: '',
phoneNumber: '',
isActive: true,
})
}
setErrors({})
}, [account, isOpen])
const validateForm = () => {
const newErrors: Record<string, string> = {}
if (!formData.accountCode?.trim()) {
newErrors.accountCode = 'Hesap kodu gereklidir'
}
if (!formData.bankName?.trim()) {
newErrors.bankName = 'Banka adı gereklidir'
}
if (!formData.branchName?.trim()) {
newErrors.branchName = 'Şube adı gereklidir'
}
if (!formData.accountNumber?.trim()) {
newErrors.accountNumber = 'Hesap numarası gereklidir'
}
if (!formData.iban?.trim()) {
newErrors.iban = 'IBAN gereklidir'
} else if (formData.iban.length < 26) {
newErrors.iban = 'IBAN geçerli formatta olmalıdır'
}
if (!formData.currency?.trim()) {
newErrors.currency = 'Para birimi gereklidir'
}
if (formData.dailyTransferLimit !== undefined && formData.dailyTransferLimit < 0) {
newErrors.dailyTransferLimit = 'Günlük transfer limiti negatif olamaz'
}
if (formData.overdraftLimit !== undefined && formData.overdraftLimit < 0) {
newErrors.overdraftLimit = 'Kredi limiti negatif olamaz'
}
setErrors(newErrors)
return Object.keys(newErrors).length === 0
}
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault()
if (validateForm()) {
onSave(formData)
}
}
const handleInputChange = (
e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,
) => {
const { name, value, type } = e.target
const parsedValue = type === 'number' ? parseFloat(value) || 0 : value
setFormData((prev) => ({
...prev,
[name]: parsedValue,
}))
// Clear error when user starts typing
if (errors[name]) {
setErrors((prev) => ({
...prev,
[name]: '',
}))
}
}
const handleCheckboxChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const { name, checked } = e.target
setFormData((prev) => ({
...prev,
[name]: checked,
}))
}
const handleIbanChange = (e: React.ChangeEvent<HTMLInputElement>) => {
let value = e.target.value
// Sadece harf ve rakam kalsın
value = value.replace(/[^A-Za-z0-9]/g, '')
// 4 karakterde bir boşluk ekle
value = value.replace(/(.{4})/g, '$1 ').trim()
setFormData({
...formData,
iban: value,
})
}
if (!isOpen) return null
return (
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div className="bg-white rounded-lg shadow-xl max-w-3xl w-full mx-4 max-h-[90vh] overflow-y-auto">
<div className="flex items-center justify-between p-4 border-b border-gray-200">
<div className="flex items-center gap-2.5">
<FaBuilding className="w-5 h-5 text-blue-600" />
<h2 className="text-lg font-semibold text-gray-900">
{account ? 'Banka Hesabını Düzenle' : 'Yeni Banka Hesabı'}
</h2>
</div>
<button
onClick={onClose}
className="p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors"
>
<FaTimes className="w-5 h-5" />
</button>
</div>
<form onSubmit={handleSubmit} className="p-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
{/* Temel Bilgiler */}
<div className="space-y-3">
<h3 className="text-base font-semibold text-gray-900 border-b pb-2 mb-2">
Temel Bilgiler
</h3>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Hesap Kodu *</label>
<input
type="text"
name="accountCode"
value={formData.accountCode || ''}
onChange={handleInputChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.accountCode ? 'border-red-500' : 'border-gray-300'
}`}
placeholder="Örn: BANKA001"
/>
{errors.accountCode && (
<p className="text-red-500 text-xs mt-1">{errors.accountCode}</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Banka Adı *</label>
<input
type="text"
name="bankName"
value={formData.bankName || ''}
onChange={handleInputChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.bankName ? 'border-red-500' : 'border-gray-300'
}`}
placeholder="Örn: İş Bankası"
/>
{errors.bankName && <p className="text-red-500 text-xs mt-1">{errors.bankName}</p>}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Şube Adı *</label>
<input
type="text"
name="branchName"
value={formData.branchName || ''}
onChange={handleInputChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.branchName ? 'border-red-500' : 'border-gray-300'
}`}
placeholder="Örn: Levent Şubesi"
/>
{errors.branchName && (
<p className="text-red-500 text-xs mt-1">{errors.branchName}</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Hesap Türü</label>
<select
name="accountType"
value={formData.accountType || BankAccountTypeEnum.Current}
onChange={handleInputChange}
className="w-full px-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
>
{Object.values(BankAccountTypeEnum).map((type) => (
<option key={type} value={type}>
{getBankAccountTypeText(type)}
</option>
))}
</select>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Para Birimi *
</label>
<select
name="currency"
value={formData.currency || 'TRY'}
onChange={handleInputChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.currency ? 'border-red-500' : 'border-gray-300'
}`}
>
{mockCurrencies.map((cur) => (
<option key={cur.value} value={cur.value}>
{cur.value} - {cur.label}
</option>
))}
</select>
{errors.currency && <p className="text-red-500 text-xs mt-1">{errors.currency}</p>}
</div>
</div>
{/* Hesap Detayları */}
<div className="space-y-3">
<h3 className="text-base font-semibold text-gray-900 border-b pb-2 mb-2">
Hesap Detayları
</h3>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Hesap Numarası *
</label>
<input
type="text"
name="accountNumber"
value={formData.accountNumber || ''}
onChange={handleInputChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.accountNumber ? 'border-red-500' : 'border-gray-300'
}`}
placeholder="1234567890"
/>
{errors.accountNumber && (
<p className="text-red-500 text-xs mt-1">{errors.accountNumber}</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">IBAN *</label>
<input
type="text"
name="iban"
value={formData.iban || ''}
onChange={handleIbanChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono ${
errors.iban ? 'border-red-500' : 'border-gray-300'
}`}
placeholder="TR12 0006 4000 0011 2345 6789 01"
maxLength={34}
/>
{errors.iban && <p className="text-red-500 text-xs mt-1">{errors.iban}</p>}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Başlangıç Bakiyesi
</label>
<input
type="number"
name="balance"
value={formData.balance || 0}
onChange={handleInputChange}
className="w-full px-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
step="0.01"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Kredi Limiti</label>
<input
type="number"
name="overdraftLimit"
value={formData.overdraftLimit || 0}
onChange={handleInputChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.overdraftLimit ? 'border-red-500' : 'border-gray-300'
}`}
step="0.01"
min="0"
/>
{errors.overdraftLimit && (
<p className="text-red-500 text-xs mt-1">{errors.overdraftLimit}</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Günlük Transfer Limiti
</label>
<input
type="number"
name="dailyTransferLimit"
value={formData.dailyTransferLimit || 0}
onChange={handleInputChange}
className={`w-full px-3 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.dailyTransferLimit ? 'border-red-500' : 'border-gray-300'
}`}
step="0.01"
min="0"
/>
{errors.dailyTransferLimit && (
<p className="text-red-500 text-xs mt-1">{errors.dailyTransferLimit}</p>
)}
</div>
</div>
{/* İletişim Bilgileri */}
<div className="space-y-3 md:col-span-2">
<h3 className="text-base font-semibold text-gray-900 border-b pb-2 mb-2">
İletişim Bilgileri
</h3>
<div className="grid grid-cols-1 md:grid-cols-2 gap-3">
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
İletişim Kişisi
</label>
<input
type="text"
name="contactPerson"
value={formData.contactPerson || ''}
onChange={handleInputChange}
className="w-full px-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
placeholder="Ad Soyad"
/>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">Telefon</label>
<input
type="tel"
name="phoneNumber"
value={formData.phoneNumber || ''}
onChange={handleInputChange}
className="w-full px-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
placeholder="+90 212 555 1234"
/>
</div>
</div>
<div className="flex items-center">
<input
type="checkbox"
name="isActive"
checked={formData.isActive || false}
onChange={handleCheckboxChange}
className="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"
/>
<label className="ml-2 block text-sm text-gray-700">Hesap aktif</label>
</div>
</div>
</div>
{/* Form Actions */}
<div className="flex justify-end gap-3 mt-6 pt-4 border-t border-gray-200">
<button
type="button"
onClick={onClose}
className="px-4 py-1.5 text-sm text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-md transition-colors"
>
İptal
</button>
<button
type="submit"
className="flex items-center gap-2 px-3 py-1.5 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
>
<FaSave className="w-4 h-4" />
{account ? 'Güncelle' : 'Kaydet'}
</button>
</div>
</form>
</div>
</div>
)
}
export default BankAccountForm

View file

@ -1,676 +0,0 @@
import React, { useState } from "react";
import {
FaBuilding,
FaPlus,
FaSearch,
FaExclamationTriangle,
FaCalendar,
FaEdit,
} from "react-icons/fa";
import {
FiBankMovement,
BankTransactionTypeEnum,
TransactionStatusEnum,
} from "../../../types/fi";
import DataTable, { Column } from "../../../components/common/DataTable";
import { BankAccount } from "../../../types/common";
import Widget from "../../../components/common/Widget";
import {
getBankAccountTypeColor,
getBankAccountTypeText,
getTransactionStatusColor,
getTransactionStatusText,
getTransactionTypeColor,
getTransactionTypeText,
} from "../../../utils/erp";
interface BankManagementProps {
bankAccounts: BankAccount[];
bankMovements: FiBankMovement[];
onAddAccount: () => void;
onEditAccount: (account: BankAccount) => void;
onAddMovement: () => void;
onEditMovement: (movement: FiBankMovement) => void;
onViewDetails: (account: BankAccount) => void;
}
const BankManagement: React.FC<BankManagementProps> = ({
bankAccounts,
bankMovements,
onAddAccount,
onEditAccount,
onAddMovement,
onEditMovement,
onViewDetails,
}) => {
const [activeTab, setActiveTab] = useState<"accounts" | "movements">(
"accounts"
);
const [searchTerm, setSearchTerm] = useState("");
const [selectedTransactionType, setSelectedTransactionType] = useState<
BankTransactionTypeEnum | "all"
>("all");
const [selectedStatus, setSelectedStatus] = useState<
TransactionStatusEnum | "all"
>("all");
const [sortBy, setSortBy] = useState<"date" | "amount">("date");
const filteredAccounts = bankAccounts.filter((account) => {
if (
searchTerm &&
!account.bankName.toLowerCase().includes(searchTerm.toLowerCase()) &&
!account.accountNumber.toLowerCase().includes(searchTerm.toLowerCase()) &&
!account.iban.toLowerCase().includes(searchTerm.toLowerCase())
) {
return false;
}
return true;
});
const filteredMovements = bankMovements
.filter((movement) => {
if (
searchTerm &&
!movement.description
.toLowerCase()
.includes(searchTerm.toLowerCase()) &&
!movement.referenceNumber
?.toLowerCase()
.includes(searchTerm.toLowerCase()) &&
!movement.bankAccount?.bankName
?.toLowerCase()
.includes(searchTerm.toLowerCase()) &&
!movement.recipientName
?.toLowerCase()
.includes(searchTerm.toLowerCase())
) {
return false;
}
if (
selectedTransactionType !== "all" &&
movement.transactionType !== selectedTransactionType
) {
return false;
}
if (selectedStatus !== "all" && movement.status !== selectedStatus) {
return false;
}
return true;
})
.sort((a, b) => {
switch (sortBy) {
case "date":
return (
new Date(b.transactionDate).getTime() -
new Date(a.transactionDate).getTime()
);
case "amount":
return b.amount - a.amount;
default:
return 0;
}
});
const formatCurrency = (amount: number) => {
return amount.toLocaleString("tr-TR", {
style: "currency",
currency: "TRY",
minimumFractionDigits: 2,
});
};
const formatIban = (iban: string) => {
return iban.replace(/(.{4})/g, "$1 ").trim();
};
const isNearOverdraftLimit = (account: BankAccount) => {
const usedLimit = Math.abs(Math.min(account.balance, 0));
return (
account.overdraftLimit > 0 && usedLimit > account.overdraftLimit * 0.8
);
};
const accountColumns: Column<BankAccount>[] = [
{
key: "bankInfo",
header: "Banka Bilgileri",
render: (account: BankAccount) => (
<div>
<div className="font-medium text-gray-900">{account.bankName}</div>
<div className="text-sm text-gray-500">{account.branchName}</div>
<div className="text-xs text-gray-400">
Kod: {account.accountCode}
</div>
</div>
),
},
{
key: "accountDetails",
header: "Hesap Detayları",
render: (account: BankAccount) => (
<div>
<div className="text-sm font-mono">{account.accountNumber}</div>
<div className="text-xs font-mono text-gray-500">
{formatIban(account.iban)}
</div>
</div>
),
},
{
key: "type",
header: "Tür",
render: (account: BankAccount) => (
<span
className={`px-2 py-1 text-xs font-medium rounded-full ${getBankAccountTypeColor(
account.accountType
)}`}
>
{getBankAccountTypeText(account.accountType)}
</span>
),
},
{
key: "currency",
header: "Para Birimi",
render: (account: BankAccount) => (
<span className="px-2 py-1 text-xs font-medium bg-gray-100 text-gray-800 rounded-full">
{account.currency}
</span>
),
},
{
key: "balance",
header: "Bakiye",
sortable: true,
render: (account: BankAccount) => {
const isOverdraft = account.balance < 0;
const isNearLimit = isNearOverdraftLimit(account);
return (
<div className="text-right">
<div
className={`font-medium ${
isOverdraft ? "text-red-600" : "text-green-600"
}`}
>
{formatCurrency(account.balance)}
</div>
{account.overdraftLimit > 0 && (
<div className="text-xs text-gray-500">
Limit: {formatCurrency(account.overdraftLimit)}
{isNearLimit && (
<span className="ml-1 text-orange-600"></span>
)}
</div>
)}
</div>
);
},
},
{
key: "limits",
header: "Limitler",
render: (account: BankAccount) => (
<div className="text-sm">
<div>Günlük Transfer:</div>
<div className="text-gray-600">
{formatCurrency(account.dailyTransferLimit)}
</div>
</div>
),
},
{
key: "contact",
header: "İletişim",
render: (account: BankAccount) => (
<div className="text-sm">
{account.contactPerson && (
<div className="text-gray-900">{account.contactPerson}</div>
)}
{account.phoneNumber && (
<div className="text-gray-500">{account.phoneNumber}</div>
)}
</div>
),
},
{
key: "status",
header: "Durum",
render: (account: BankAccount) => (
<span
className={`px-2 py-1 text-xs font-medium rounded-full ${
account.isActive
? "bg-green-100 text-green-800"
: "bg-gray-100 text-gray-800"
}`}
>
{account.isActive ? "Aktif" : "Pasif"}
</span>
),
},
{
key: "actions",
header: "İşlemler",
render: (account: BankAccount) => (
<div className="flex gap-1">
<button
onClick={() => onViewDetails(account)}
className="p-1 text-blue-600 hover:bg-blue-50 rounded"
title="Detayları Görüntüle"
>
<FaCalendar className="w-4 h-4" />
</button>
<button
onClick={() => onEditAccount(account)}
className="p-1 text-green-600 hover:bg-green-50 rounded"
title="Düzenle"
>
<FaEdit className="w-4 h-4" />
</button>
</div>
),
},
];
const movementColumns: Column<FiBankMovement>[] = [
{
key: "dates",
header: "Tarihler",
sortable: true,
render: (movement: FiBankMovement) => (
<div className="text-sm">
<div>
İşlem:{" "}
{new Date(movement.transactionDate).toLocaleDateString("tr-TR")}
</div>
<div className="text-gray-500">
Valör: {new Date(movement.valueDate).toLocaleDateString("tr-TR")}
</div>
</div>
),
},
{
key: "bankAccount",
header: "Banka Hesabı",
render: (movement: FiBankMovement) => (
<div>
<div className="font-medium text-gray-900">
{movement.bankAccount?.bankName || "Bilinmeyen"}
</div>
<div className="text-sm text-gray-500">
{movement.bankAccount?.accountNumber}
</div>
</div>
),
},
{
key: "type",
header: "İşlem Türü",
render: (movement: FiBankMovement) => (
<span
className={`px-2 py-1 text-xs font-medium rounded-full ${getTransactionTypeColor(
movement.transactionType
)}`}
>
{getTransactionTypeText(movement.transactionType)}
</span>
),
},
{
key: "description",
header: "Açıklama",
render: (movement: FiBankMovement) => (
<div>
<div className="font-medium text-gray-900">
{movement.description}
</div>
{movement.referenceNumber && (
<div className="text-sm text-gray-500">
Ref: {movement.referenceNumber}
</div>
)}
{movement.recipientName && (
<div className="text-sm text-blue-600">
Alıcı: {movement.recipientName}
</div>
)}
</div>
),
},
{
key: "amount",
header: "Tutar",
sortable: true,
render: (movement: FiBankMovement) => {
const isIncoming = [
BankTransactionTypeEnum.Deposit,
BankTransactionTypeEnum.Interest,
].includes(movement.transactionType);
const isOutgoing = [
BankTransactionTypeEnum.Withdrawal,
BankTransactionTypeEnum.Transfer,
BankTransactionTypeEnum.EFT,
BankTransactionTypeEnum.Fee,
].includes(movement.transactionType);
return (
<div className="text-right">
<span
className={`font-medium ${
isIncoming
? "text-green-600"
: isOutgoing
? "text-red-600"
: "text-gray-600"
}`}
>
{isIncoming ? "+" : isOutgoing ? "-" : ""}
{formatCurrency(movement.amount)}
</span>
</div>
);
},
},
{
key: "status",
header: "Durum",
render: (movement: FiBankMovement) => (
<span
className={`px-2 py-1 text-xs font-medium rounded-full ${getTransactionStatusColor(
movement.status
)}`}
>
{getTransactionStatusText(movement.status)}
</span>
),
},
{
key: "currentAccount",
header: "Cari Hesap",
render: (movement: FiBankMovement) => (
<div className="text-sm text-gray-900">
{movement.currentAccount?.accountCode || "-"}
</div>
),
},
{
key: "actions",
header: "İşlemler",
render: (movement: FiBankMovement) => (
<div className="flex gap-1">
<button
onClick={() => onEditMovement(movement)}
className="p-1 text-green-600 hover:bg-green-50 rounded"
title="Düzenle"
>
<FaEdit className="w-4 h-4" />
</button>
</div>
),
},
];
// Calculate statistics
const totalBankBalance = bankAccounts.reduce(
(sum, account) => sum + account.balance,
0
);
const activeBankAccounts = bankAccounts.filter(
(account) => account.isActive
).length;
const totalOverdraftLimit = bankAccounts.reduce(
(sum, account) => sum + account.overdraftLimit,
0
);
const todayMovements = bankMovements.filter((movement) => {
const today = new Date();
const movementDate = new Date(movement.transactionDate);
return movementDate.toDateString() === today.toDateString();
});
const todayIncoming = todayMovements
.filter((m) =>
[
BankTransactionTypeEnum.Deposit,
BankTransactionTypeEnum.Interest,
].includes(m.transactionType)
)
.reduce((sum, m) => sum + m.amount, 0);
const todayOutgoing = todayMovements
.filter((m) =>
[
BankTransactionTypeEnum.Withdrawal,
BankTransactionTypeEnum.Transfer,
BankTransactionTypeEnum.EFT,
BankTransactionTypeEnum.Fee,
].includes(m.transactionType)
)
.reduce((sum, m) => sum + m.amount, 0);
// Accounts near overdraft limit
const accountsNearLimit = bankAccounts.filter(isNearOverdraftLimit);
// Pending transactions
const pendingTransactions = bankMovements.filter(
(m) => m.status === TransactionStatusEnum.Pending
);
return (
<div className="space-y-2">
{/* Header */}
<div className="flex items-center justify-between">
<div>
<h2 className="text-2xl font-bold text-gray-900">Banka Yönetimi</h2>
<p className="text-gray-600">
Banka hesapları ve EFT/Havale işlemleri
</p>
</div>
<div className="flex gap-2 text-sm">
<button
onClick={onAddMovement}
className="flex items-center gap-2 px-3 py-1.5 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors"
>
<FaPlus className="w-4 h-4" />
Banka Hareketi
</button>
<button
onClick={onAddAccount}
className="flex items-center gap-2 px-3 py-1.5 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
>
<FaPlus className="w-4 h-4" />
Yeni Banka Hesabı
</button>
</div>
</div>
{/* Stats Cards */}
<div className="grid grid-cols-1 md:grid-cols-4 gap-4">
<Widget
title="Toplam Banka Bakiyesi"
value={formatCurrency(totalBankBalance)}
color="blue"
icon="FaBuilding"
subTitle={`${activeBankAccounts} aktif hesap`}
/>
<Widget
title="Günlük Giren"
value={formatCurrency(todayIncoming)}
color="green"
icon="FaArrowUp"
subTitle="Bugün"
/>
<Widget
title="Günlük Çıkan"
value={formatCurrency(todayOutgoing)}
color="red"
icon="FaArrowDown"
subTitle="Bugün"
/>
<Widget
title="Kredi Limiti"
value={formatCurrency(totalOverdraftLimit)}
color="orange"
icon="FaCreditCard"
subTitle="Toplam limit"
/>
</div>
{/* Alerts */}
{(accountsNearLimit.length > 0 || pendingTransactions.length > 0) && (
<div className="space-y-3">
{accountsNearLimit.length > 0 && (
<div className="bg-orange-50 border border-orange-200 rounded-lg p-3">
<div className="flex items-center gap-2">
<FaExclamationTriangle className="w-5 h-5 text-orange-600" />
<h3 className="text-base font-semibold text-orange-900">
Kredi Limiti Uyarısı
</h3>
</div>
<p className="text-orange-700 mt-1">
{accountsNearLimit.length} hesap kredi limitinin %80'ine
yaklaşmış durumda.
</p>
</div>
)}
{pendingTransactions.length > 0 && (
<div className="bg-yellow-50 border border-yellow-200 rounded-lg p-3">
<div className="flex items-center gap-2">
<FaExclamationTriangle className="w-5 h-5 text-yellow-600" />
<h3 className="text-base font-semibold text-yellow-900">
Bekleyen İşlemler
</h3>
</div>
<p className="text-yellow-700 mt-1">
{pendingTransactions.length} adet bekleyen banka işlemi
bulunmaktadır.
</p>
</div>
)}
</div>
)}
{/* Tabs */}
<div className="border-b border-gray-200">
<nav className="-mb-px flex space-x-6">
<button
onClick={() => setActiveTab("accounts")}
className={`py-3 px-1 border-b-2 font-medium text-sm ${
activeTab === "accounts"
? "border-blue-500 text-blue-600"
: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"
}`}
>
Banka Hesapları ({bankAccounts.length})
</button>
<button
onClick={() => setActiveTab("movements")}
className={`py-3 px-1 border-b-2 font-medium text-sm ${
activeTab === "movements"
? "border-blue-500 text-blue-600"
: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"
}`}
>
Banka Hareketleri ({bankMovements.length})
</button>
</nav>
</div>
{/* Filters */}
<div className="flex gap-3 items-center">
<div className="flex-1 relative">
<FaSearch className="w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400" />
<input
type="text"
placeholder={
activeTab === "accounts"
? "Banka adı, hesap no veya IBAN ara..."
: "Açıklama, referans no veya alıcı ara..."
}
value={searchTerm}
onChange={(e) => setSearchTerm(e.target.value)}
className="w-full pl-10 pr-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
/>
</div>
{activeTab === "movements" && (
<>
<select
value={selectedTransactionType}
onChange={(e) =>
setSelectedTransactionType(
e.target.value as BankTransactionTypeEnum | "all"
)
}
className="px-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
>
<option value="all">Tüm İşlem Türleri</option>
{Object.values(BankTransactionTypeEnum).map((type) => (
<option key={type} value={type}>
{getTransactionTypeText(type)}
</option>
))}
</select>
<select
value={selectedStatus}
onChange={(e) =>
setSelectedStatus(
e.target.value as TransactionStatusEnum | "all"
)
}
className="px-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
>
<option value="all">Tüm Durumlar</option>
{Object.values(TransactionStatusEnum).map((status) => (
<option key={status} value={status}>
{getTransactionStatusText(status)}
</option>
))}
</select>
<select
value={sortBy}
onChange={(e) => setSortBy(e.target.value as "date" | "amount")}
className="px-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
>
<option value="date">Tarihe Göre</option>
<option value="amount">Tutara Göre</option>
</select>
</>
)}
</div>
{/* Data Table */}
<div className="bg-white rounded-lg shadow-sm border overflow-x-auto">
{activeTab === "accounts" ? (
<DataTable data={filteredAccounts} columns={accountColumns} />
) : (
<DataTable data={filteredMovements} columns={movementColumns} />
)}
</div>
{/* Empty State */}
{((activeTab === "accounts" && filteredAccounts.length === 0) ||
(activeTab === "movements" && filteredMovements.length === 0)) && (
<div className="text-center py-10">
<FaBuilding className="w-12 h-12 text-gray-400 mx-auto mb-4" />
<h3 className="text-base font-medium text-gray-900 mb-2">
{activeTab === "accounts"
? "Banka hesabı bulunamadı"
: "Banka hareketi bulunamadı"}
</h3>
<p className="text-sm text-gray-500">
{activeTab === "accounts"
? "Yeni bir banka hesabı ekleyin veya arama kriterlerinizi değiştirin."
: "Yeni bir banka hareketi ekleyin veya arama kriterlerinizi değiştirin."}
</p>
</div>
)}
</div>
);
};
export default BankManagement;

View file

@ -1,524 +0,0 @@
import React, { useState, useEffect } from "react";
import { FaSave, FaTimes, FaExchangeAlt } from "react-icons/fa";
import {
FiBankMovement,
BankTransactionTypeEnum,
TransactionStatusEnum,
FiCurrentAccount,
} from "../../../types/fi";
import { BankAccount } from "../../../types/common";
import {
getTransactionStatusText,
getTransactionTypeText,
} from "../../../utils/erp";
interface BankMovementFormProps {
movement?: FiBankMovement;
bankAccounts: BankAccount[];
currentAccounts?: FiCurrentAccount[];
isOpen: boolean;
onClose: () => void;
onSave: (movement: Partial<FiBankMovement>) => void;
}
const BankMovementForm: React.FC<BankMovementFormProps> = ({
movement,
bankAccounts,
currentAccounts = [],
isOpen,
onClose,
onSave,
}) => {
const [formData, setFormData] = useState<
Partial<FiBankMovement> & {
transactionDateString?: string;
valueDateString?: string;
}
>({
bankAccountId: "",
transactionDateString: new Date().toISOString().split("T")[0],
valueDateString: new Date().toISOString().split("T")[0],
description: "",
referenceNumber: "",
transactionType: BankTransactionTypeEnum.Deposit,
amount: 0,
currency: "TRY",
recipientName: "",
recipientIban: "",
recipientBank: "",
currentAccountId: "",
status: TransactionStatusEnum.Pending,
});
const [errors, setErrors] = useState<Record<string, string>>({});
useEffect(() => {
if (movement) {
setFormData({
...movement,
transactionDateString: new Date(movement.transactionDate)
.toISOString()
.split("T")[0],
valueDateString: new Date(movement.valueDate)
.toISOString()
.split("T")[0],
});
} else {
setFormData({
bankAccountId: "",
transactionDateString: new Date().toISOString().split("T")[0],
valueDateString: new Date().toISOString().split("T")[0],
description: "",
referenceNumber: "",
transactionType: BankTransactionTypeEnum.Deposit,
amount: 0,
currency: "TRY",
recipientName: "",
recipientIban: "",
recipientBank: "",
currentAccountId: "",
status: TransactionStatusEnum.Pending,
});
}
setErrors({});
}, [movement, isOpen]);
const validateForm = () => {
const newErrors: Record<string, string> = {};
if (!formData.bankAccountId) {
newErrors.bankAccountId = "Banka hesabı seçmelisiniz";
}
if (!formData.description?.trim()) {
newErrors.description = "Açıklama gereklidir";
}
if (!formData.amount || formData.amount <= 0) {
newErrors.amount = "Tutar 0'dan büyük olmalıdır";
}
if (!formData.transactionDateString) {
newErrors.transactionDate = "İşlem tarihi gereklidir";
}
if (!formData.valueDateString) {
newErrors.valueDate = "Valör tarihi gereklidir";
}
// EFT/Transfer için alıcı bilgileri kontrol et
if (
[BankTransactionTypeEnum.EFT, BankTransactionTypeEnum.Transfer].includes(
formData.transactionType!
)
) {
if (!formData.recipientName?.trim()) {
newErrors.recipientName = "Alıcı adı gereklidir";
}
if (!formData.recipientIban?.trim()) {
newErrors.recipientIban = "Alıcı IBAN gereklidir";
}
}
setErrors(newErrors);
return Object.keys(newErrors).length === 0;
};
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
if (validateForm()) {
const selectedBankAccount = bankAccounts.find(
(acc) => acc.id === formData.bankAccountId
);
onSave({
...formData,
transactionDate: new Date(formData.transactionDateString!),
valueDate: new Date(formData.valueDateString!),
currency: selectedBankAccount?.currency || formData.currency,
});
}
};
const handleInputChange = (
e: React.ChangeEvent<
HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
>
) => {
const { name, value, type } = e.target;
const parsedValue = type === "number" ? parseFloat(value) || 0 : value;
setFormData((prev) => ({
...prev,
[name]: parsedValue,
}));
// Update currency when bank account changes
if (name === "bankAccountId") {
const selectedAccount = bankAccounts.find((acc) => acc.id === value);
if (selectedAccount) {
setFormData((prev) => ({
...prev,
bankAccountId: value,
currency: selectedAccount.currency,
}));
}
}
// Clear error when user starts typing
if (errors[name]) {
setErrors((prev) => ({
...prev,
[name]: "",
}));
}
};
const formatIban = (iban: string) => {
const cleaned = iban.replace(/\s/g, "").toUpperCase();
return cleaned.replace(/(.{4})/g, "$1 ").trim();
};
const handleIbanChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const formatted = formatIban(e.target.value);
setFormData((prev) => ({
...prev,
recipientIban: formatted,
}));
if (errors.recipientIban) {
setErrors((prev) => ({
...prev,
recipientIban: "",
}));
}
};
const isTransferType = [
BankTransactionTypeEnum.EFT,
BankTransactionTypeEnum.Transfer,
].includes(formData.transactionType!);
if (!isOpen) return null;
return (
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div className="bg-white rounded-lg shadow-xl max-w-3xl w-full mx-4 max-h-[90vh] overflow-y-auto">
<div className="flex items-center justify-between p-4 border-b border-gray-200">
<div className="flex items-center gap-2.5">
<FaExchangeAlt className="w-5 h-5 text-green-600" />
<h2 className="text-lg font-semibold text-gray-900">
{movement ? "Banka Hareketini Düzenle" : "Yeni Banka Hareketi"}
</h2>
</div>
<button
onClick={onClose}
className="p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors"
>
<FaTimes className="w-5 h-5" />
</button>
</div>
<form onSubmit={handleSubmit} className="p-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
{/* Temel Bilgiler */}
<div className="space-y-3">
<h3 className="text-base font-semibold text-gray-900 border-b pb-2 mb-2">
Temel Bilgiler
</h3>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Banka Hesabı *
</label>
<select /* Kontrol küçültüldü */
name="bankAccountId"
value={formData.bankAccountId || ""}
onChange={handleInputChange}
className={`w-full px-2 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.bankAccountId ? "border-red-500" : "border-gray-300"
}`}
>
<option value="">Banka hesabı seçin</option>
{bankAccounts.map((account) => (
<option key={account.id} value={account.id}>
{account.bankName} - {account.accountNumber} (
{account.currency})
</option>
))}
</select>
{errors.bankAccountId && (
<p className="text-red-500 text-xs mt-1">
{errors.bankAccountId}
</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
İşlem Türü *
</label>
<select /* Kontrol küçültüldü */
name="transactionType"
value={
formData.transactionType || BankTransactionTypeEnum.Deposit
}
onChange={handleInputChange}
className="w-full px-2 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
>
{Object.values(BankTransactionTypeEnum).map((type) => (
<option key={type} value={type}>
{getTransactionTypeText(type)}
</option>
))}
</select>
</div>
<div className="grid grid-cols-2 gap-3">
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
İşlem Tarihi *
</label>
<input /* Kontrol küçültüldü */
type="date"
name="transactionDateString"
value={formData.transactionDateString || ""}
onChange={handleInputChange}
className={`w-full px-2 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.transactionDate
? "border-red-500"
: "border-gray-300"
}`}
/>
{errors.transactionDate && (
<p className="text-red-500 text-xs mt-1">
{errors.transactionDate}
</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Valör Tarihi *
</label>
<input /* Kontrol küçültüldü */
type="date"
name="valueDateString"
value={formData.valueDateString || ""}
onChange={handleInputChange}
className={`w-full px-2 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.valueDate ? "border-red-500" : "border-gray-300"
}`}
/>
{errors.valueDate && (
<p className="text-red-500 text-xs mt-1">
{errors.valueDate}
</p>
)}
</div>
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
ıklama *
</label>
<textarea /* Kontrol küçültüldü */
name="description"
value={formData.description || ""}
onChange={handleInputChange}
rows={3}
className={`w-full px-2 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.description ? "border-red-500" : "border-gray-300"
}`}
placeholder="İşlem açıklaması"
/>
{errors.description && (
<p className="text-red-500 text-xs mt-1">
{errors.description}
</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Referans Numarası
</label>
<input /* Kontrol küçültüldü */
type="text"
name="referenceNumber"
value={formData.referenceNumber || ""}
onChange={handleInputChange}
className="w-full px-2 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
placeholder="REF-001"
/>
</div>
</div>
{/* Tutar ve Durum */}
<div className="space-y-3">
<h3 className="text-base font-semibold text-gray-900 border-b pb-2 mb-2">
Tutar ve Durum
</h3>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Tutar *
</label>
<div className="relative">
<input /* Kontrol küçültüldü */
type="number"
name="amount"
value={formData.amount || ""}
onChange={handleInputChange}
className={`w-full px-2 py-1.5 text-sm pr-16 border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.amount ? "border-red-500" : "border-gray-300"
}`}
step="0.01"
min="0"
placeholder="0.00"
/>
<span className="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-500">
{formData.currency || "TRY"}
</span>
</div>
{errors.amount && (
<p className="text-red-500 text-xs mt-1">{errors.amount}</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Durum
</label>
<select /* Kontrol küçültüldü */
name="status"
value={formData.status || TransactionStatusEnum.Pending}
onChange={handleInputChange}
className="w-full px-2 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
>
{Object.values(TransactionStatusEnum).map((status) => (
<option key={status} value={status}>
{getTransactionStatusText(status)}
</option>
))}
</select>
</div>
{currentAccounts.length > 0 && (
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Cari Hesap
</label>
<select /* Kontrol küçültüldü */
name="currentAccountId"
value={formData.currentAccountId || ""}
onChange={handleInputChange}
className="w-full px-2 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
>
<option value="">Cari hesap seçin (opsiyonel)</option>
{currentAccounts.map((account) => (
<option key={account.id} value={account.id}>
{account.businessParty?.name} - {account.accountCode}
</option>
))}
</select>
</div>
)}
</div>
{/* Transfer Bilgileri */}
{isTransferType && (
<div className="space-y-3 md:col-span-2">
<h3 className="text-base font-semibold text-gray-900 border-b pb-2 mb-2">
Transfer Bilgileri
</h3>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Alıcı Adı *
</label>
<input /* Kontrol küçültüldü */
type="text"
name="recipientName"
value={formData.recipientName || ""}
onChange={handleInputChange}
className={`w-full px-2 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 ${
errors.recipientName
? "border-red-500"
: "border-gray-300"
}`}
placeholder="Alıcı adı"
/>
{errors.recipientName && (
<p className="text-red-500 text-xs mt-1">
{errors.recipientName}
</p>
)}
</div>
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">
Alıcı Bankası
</label>
<input /* Kontrol küçültüldü */
type="text"
name="recipientBank"
value={formData.recipientBank || ""}
onChange={handleInputChange}
className="w-full px-2 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
placeholder="Banka adı"
/>
</div>
<div className="md:col-span-2">
<label className="block text-sm font-medium text-gray-700 mb-1">
Alıcı IBAN *
</label>
<input /* Kontrol küçültüldü */
type="text"
name="recipientIban"
value={formData.recipientIban || ""}
onChange={handleIbanChange}
className={`w-full px-2 py-1.5 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 font-mono ${
errors.recipientIban
? "border-red-500"
: "border-gray-300"
}`}
placeholder="TR12 0006 4000 0011 2345 6789 01"
maxLength={34}
/>
{errors.recipientIban && (
<p className="text-red-500 text-xs mt-1">
{errors.recipientIban}
</p>
)}
</div>
</div>
</div>
)}
</div>
{/* Form Actions */}
<div className="flex justify-end gap-3 mt-6 pt-4 border-t border-gray-200">
<button
type="button"
onClick={onClose}
className="px-4 py-1.5 text-sm text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-md transition-colors"
>
İptal
</button>
<button
type="submit"
className="flex items-center gap-2 px-3 py-1.5 text-sm bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors"
>
<FaSave className="w-4 h-4" />
{movement ? "Güncelle" : "Kaydet"}
</button>
</div>
</form>
</div>
</div>
);
};
export default BankMovementForm;

View file

@ -1,331 +0,0 @@
import React from "react";
import {
FaTimes,
FaWallet,
FaCalendar,
FaEdit,
FaArrowUp,
FaArrowDown,
} from "react-icons/fa";
import {
FiCashAccount,
FiCashMovement,
CashMovementTypeEnum,
} from "../../../types/fi";
import {
getCashMovementTypeColor,
getCashMovementTypeText,
} from "../../../utils/erp";
interface CashAccountDetailsProps {
account: FiCashAccount;
movements: FiCashMovement[];
onClose: () => void;
onEdit: (account: FiCashAccount) => void;
}
const CashAccountDetails: React.FC<CashAccountDetailsProps> = ({
account,
movements,
onClose,
onEdit,
}) => {
const formatCurrency = (amount: number) => {
return amount.toLocaleString("tr-TR", {
style: "currency",
currency: account.currency,
minimumFractionDigits: 2,
});
};
// Filter movements for this account
const accountMovements = movements
.filter((movement) => movement.cashAccount?.id === account.id)
.sort(
(a, b) =>
new Date(b.transactionDate).getTime() -
new Date(a.transactionDate).getTime()
);
// Calculate statistics
const totalIncome = accountMovements
.filter((m) => m.movementType === CashMovementTypeEnum.Income)
.reduce((sum, m) => sum + m.amount, 0);
const totalExpense = accountMovements
.filter((m) => m.movementType === CashMovementTypeEnum.Expense)
.reduce((sum, m) => sum + m.amount, 0);
const recentMovements = accountMovements.slice(0, 10);
return (
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
<div className="bg-white rounded-lg shadow-xl w-full max-w-2xl mx-4 max-h-[90vh] overflow-y-auto text-sm">
{/* Header */}
<div className="flex items-center justify-between p-4 border-b border-gray-200">
<div className="flex items-center gap-2.5">
<FaWallet className="w-5 h-5 text-blue-600" />
<div>
<h2 className="text-lg font-semibold text-gray-900">
Kasa Hesabı Detayları
</h2>
<p className="text-gray-600">
{account.name} ({account.accountCode})
</p>
</div>
</div>
<div className="flex items-center gap-2">
<button
onClick={() => onEdit(account)}
className="flex items-center gap-2 px-3 py-1.5 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors text-sm"
>
<FaEdit className="w-4 h-4" />
Düzenle
</button>
<button
onClick={onClose}
className="p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded-md transition-colors"
>
<FaTimes className="w-5 h-5" />
</button>
</div>
</div>
<div className="p-4 space-y-4">
{/* Account Information */}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<div className="bg-blue-50 p-4 rounded-lg">
<div className="flex items-center gap-2 mb-2">
<FaWallet className="w-5 h-5 text-blue-600" />
<span className="text-sm font-medium text-blue-800">
Mevcut Bakiye
</span>
</div>
<p
className={`text-xl font-bold ${
account.balance >= 0 ? "text-green-600" : "text-red-600"
}`}
>
{formatCurrency(account.balance)}
</p>
</div>
<div className="bg-green-50 p-4 rounded-lg">
<div className="flex items-center gap-2 mb-2">
<FaArrowUp className="w-5 h-5 text-green-600" />
<span className="text-sm font-medium text-green-800">
Toplam Giriş
</span>
</div>
<p className="text-xl font-bold text-green-600">
{formatCurrency(totalIncome)}
</p>
</div>
<div className="bg-red-50 p-4 rounded-lg">
<div className="flex items-center gap-2 mb-2">
<FaArrowDown className="w-5 h-5 text-red-600" />
<span className="text-sm font-medium text-red-800">
Toplam Çıkış
</span>
</div>
<p className="text-xl font-bold text-red-600">
{formatCurrency(totalExpense)}
</p>
</div>
<div className="bg-gray-50 p-4 rounded-lg">
<div className="flex items-center gap-2 mb-2">
<FaCalendar className="w-5 h-5 text-gray-600" />
<span className="text-sm font-medium text-gray-800">
İşlem Sayısı
</span>
</div>
<p className="text-xl font-bold text-gray-600">
{accountMovements.length}
</p>
</div>
</div>
{/* Account Details */}
<div className="bg-gray-50 p-4 rounded-lg">
<h3 className="text-base font-semibold text-gray-900 mb-3">
Hesap Bilgileri
</h3>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<div className="space-y-2">
<div>
<span className="text-sm font-medium text-gray-600">
Hesap Kodu:
</span>
<p className="font-mono text-sm">{account.accountCode}</p>
</div>
<div>
<span className="text-sm font-medium text-gray-600">
Kasa Adı:
</span>
<p className="font-medium">{account.name}</p>
</div>
<div>
<span className="text-sm font-medium text-gray-600">
Para Birimi:
</span>
<span className="ml-2 px-2 py-1 text-xs font-medium bg-gray-100 text-gray-800 rounded-full">
{account.currency}
</span>
</div>
</div>
</div>
<div>
<div className="space-y-2">
<div>
<span className="text-sm font-medium text-gray-600">
Durum:
</span>
<span
className={`ml-2 px-2 py-1 text-xs font-medium rounded-full ${
account.isActive
? "bg-green-100 text-green-800"
: "bg-gray-100 text-gray-800"
}`}
>
{account.isActive ? "Aktif" : "Pasif"}
</span>
</div>
<div>
<span className="text-sm font-medium text-gray-600">
Oluşturulma:
</span>
<p className="text-sm">
{new Date(account.creationTime).toLocaleDateString(
"tr-TR"
)}
</p>
</div>
<div>
<span className="text-sm font-medium text-gray-600">
Son Güncelleme:
</span>
<p className="text-sm">
{new Date(
account.lastModificationTime
).toLocaleDateString("tr-TR")}
</p>
</div>
</div>
</div>
</div>
{account.description && (
<div className="mt-4">
<span className="text-sm font-medium text-gray-600">
ıklama:
</span>
<p className="mt-1 text-sm text-gray-700">
{account.description}
</p>
</div>
)}
</div>
{/* Recent Movements */}
<div>
<div className="flex items-center justify-between mb-3">
<h3 className="text-base font-semibold text-gray-900">
Son Hareketler
</h3>
<span className="text-sm text-gray-500">
Son {recentMovements.length} işlem
</span>
</div>
{recentMovements.length > 0 ? (
<div className="bg-white border border-gray-200 rounded-lg overflow-hidden">
<div className="overflow-x-auto">
<table className="min-w-full divide-y divide-gray-200">
<thead className="bg-gray-50">
<tr>
<th className="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Tarih
</th>
<th className="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Tür
</th>
<th className="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
ıklama
</th>
<th className="px-4 py-2 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">
Tutar
</th>
</tr>
</thead>
<tbody className="bg-white divide-y divide-gray-200">
{recentMovements.map((movement) => (
<tr
key={movement.id}
className="hover:bg-gray-50 text-sm"
>
<td className="px-4 py-2 whitespace-nowrap text-gray-900">
{new Date(
movement.transactionDate
).toLocaleDateString("tr-TR")}
</td>
<td className="px-4 py-2 whitespace-nowrap">
<span
className={`px-2 py-0.5 text-xs font-medium rounded-full ${getCashMovementTypeColor(
movement.movementType
)}`}
>
{getCashMovementTypeText(movement.movementType)}
</span>
</td>
<td className="px-4 py-2 text-gray-900">
<div>
<div className="font-medium">
{movement.description}
</div>
{movement.referenceNumber && (
<div className="text-xs text-gray-500">
Ref: {movement.referenceNumber}
</div>
)}
</div>
</td>
<td className="px-4 py-2 whitespace-nowrap text-right">
<span
className={`font-medium text-sm ${
movement.movementType ===
CashMovementTypeEnum.Income
? "text-green-600"
: "text-red-600"
}`}
>
{movement.movementType ===
CashMovementTypeEnum.Income
? "+"
: "-"}
{formatCurrency(movement.amount)}
</span>
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
) : (
<div className="text-center py-6 bg-gray-50 rounded-lg">
<FaCalendar className="w-8 h-8 text-gray-400 mx-auto mb-2" />
<p className="text-gray-500">
Bu kasa hesabında henüz hareket bulunmamaktadır.
</p>
</div>
)}
</div>
</div>
</div>
</div>
);
};
export default CashAccountDetails;

Some files were not shown because too many files have changed in this diff Show more