diff --git a/ui/src/types/common.ts b/ui/src/types/common.ts index 7d8e9b55..e0c18bbf 100644 --- a/ui/src/types/common.ts +++ b/ui/src/types/common.ts @@ -1,4 +1,4 @@ -import { BankAccountTypeEnum } from "./fi"; +import { BankAccountTypeEnum } from './fi' import { CrmActivity, CustomerSegmentEnum, @@ -7,216 +7,217 @@ import { CrmSalesOrder, CrmSalesTarget, CrmTerritory, -} from "./admin/crm"; -import { HrEmployee } from "./hr"; -import { - SupplierCardTypeEnum, - MmSupplierPerformance, - SupplierTypeEnum, -} from "./mm"; +} from './crm' +import { HrEmployee } from './hr' +import { SupplierCardTypeEnum, MmSupplierPerformance, SupplierTypeEnum } from './mm' 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; + 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?: string; - email?: string; - phone?: string; - website?: string; - lastOrderDate?: Date; - status?: BusinessPartyStatusEnum; + 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?: string + email?: string + phone?: string + website?: string + lastOrderDate?: Date + status?: BusinessPartyStatusEnum //Customer’a ö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[]; + customerType?: CustomerTypeEnum + registrationNumber?: string + customerSegment?: CustomerSegmentEnum + assignedSalesRep?: string + teamId?: string + team?: Team + totalRevenue?: number + averageOrderValue?: number + lifetimeValue?: number + opportunities?: CrmOpportunity[] + orders?: CrmSalesOrder[] + activities?: CrmActivity[] // Supplier’a özgü alanlar - supplierType?: SupplierTypeEnum; - cardNumber?: string; - cardType?: SupplierCardTypeEnum; - validFrom?: Date; - validTo?: Date; - currentBalance?: number; - discountRate?: number; - specialConditions?: string[]; - performanceMetrics?: MmSupplierPerformance; - certifications?: string[]; - bankAccounts?: BankAccount[]; + supplierType?: SupplierTypeEnum + cardNumber?: string + cardType?: SupplierCardTypeEnum + validFrom?: Date + validTo?: Date + currentBalance?: number + discountRate?: number + specialConditions?: string[] + performanceMetrics?: MmSupplierPerformance + certifications?: string[] + bankAccounts?: BankAccount[] } -export enum BusinessPartyStatusEnum { // İş Ortağı Durumu - Prospect = "PROSPECT", // Potansiyel - Active = "ACTIVE", // Aktif - Inactive = "INACTIVE", // Pasif - Blocked = "BLOCKED", // Engellenmiş +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?: HrEmployee; - members: TeamMember[]; - territories?: CrmTerritory[]; - targets?: CrmSalesTarget[]; - specializations?: string[]; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; + id: string + code: string + name: string + description?: string + managerId: string + manager?: HrEmployee + 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?: HrEmployee; - role: TeamRoleEnum; - joinDate: Date; - isActive: boolean; + id: string + teamId: string + employeeId: string + employee?: HrEmployee + role: TeamRoleEnum + joinDate: Date + isActive: boolean } export interface Contact { // İletişim - id: string; - customerId?: string; - firstName: string; - lastName: string; - fullName: string; - title?: string; - department?: string; - email: string; - phone?: string; - mobile?: string; - isPrimary: boolean; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; + id: string + customerId?: string + firstName: string + lastName: string + fullName: string + title?: string + department?: string + email: string + phone?: string + mobile?: string + isPrimary: boolean + isActive: boolean + creationTime: Date + lastModificationTime: Date } export interface Address { // Adres - street: string; - city: string; - state: string; - postalCode: string; - country: string; + street: string + city: string + state: string + postalCode: string + country: 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; - phone?: string; - swiftCode?: string; - isDefault: boolean; - creationTime: Date; - lastModificationTime: Date; + 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 + phone?: string + swiftCode?: string + isDefault: boolean + creationTime: Date + lastModificationTime: Date } export interface WidgetGroupDto { // Widget Grubu - colGap?: number; - colSpan?: number; - className?: string; - items: WidgetEditDto[]; + colGap?: number + colSpan?: number + className?: string + items: WidgetEditDto[] } export interface WidgetEditDto { // Widget Düzenleme - colGap: number; - colSpan: number; - sqlQuery?: string; - className?: string; - title: string; - value: string; - valueClassName: string; - color: string; - icon: string; - subTitle: string; - onClick: string; + colGap: number + colSpan: number + sqlQuery?: string + className?: string + title: string + value: string + valueClassName: string + color: string + 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 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 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 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 +export enum PriorityEnum { + // Öncelik + Low = 'LOW', // Düşük + Normal = 'NORMAL', // Normal + High = 'HIGH', // Yüksek + Urgent = 'URGENT', // Acil } diff --git a/ui/src/types/crm.ts b/ui/src/types/crm.ts index 1f4f512d..35f7859b 100644 --- a/ui/src/types/crm.ts +++ b/ui/src/types/crm.ts @@ -1,269 +1,275 @@ -import { - Address, - BusinessParty, - Contact, - PaymentTerms, - PriorityEnum, -} from "./common"; -import { HrEmployee } from "./hr"; -import { MmDelivery, MmMaterial, MmUnit } from "./mm"; +import { Address, BusinessParty, Contact, PaymentTerms, PriorityEnum } from './common' +import { HrEmployee } from './hr' +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; + 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; + 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; + 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?: HrEmployee; - teamId?: string; - leadSource: LeadSourceEnum; - campaignId?: string; - status: OpportunityStatusEnum; - lostReason?: CrmLostReason; - activities: CrmActivity[]; - competitors: CrmCompetitor[]; - creationTime: Date; - lastModificationTime: Date; + 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?: HrEmployee + 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?: HrEmployee; - participants: string[]; - status: ActivityStatusEnum; - priority: PriorityEnum; - followUpDate?: Date; - followUpActivity?: string; - outcome?: string; - nextSteps?: string; - creationTime: Date; - lastModificationTime: Date; + 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?: HrEmployee + 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; + 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; + 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; + 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 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 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 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 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 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 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 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 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 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 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 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 +export enum TargetStatusEnum { + // Hedef Durumu + Active = 'ACTIVE', // Aktif + Achieved = 'ACHIEVED', // Gerçekleşti + Missed = 'MISSED', // Kaçırıldı + Cancelled = 'CANCELLED', // İptal Edildi } diff --git a/ui/src/types/fi.ts b/ui/src/types/fi.ts index 49226cbd..f2058438 100644 --- a/ui/src/types/fi.ts +++ b/ui/src/types/fi.ts @@ -1,362 +1,362 @@ -import { BankAccount, BusinessParty } from "./common"; -import { MmMaterial } from "./mm"; +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; - phone?: 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; + id: string + accountCode: string + businessPartyId: string + businessParty?: BusinessParty + type: AccountTypeEnum + contactPerson?: string + phone?: 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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: CheckTypeEnum; - bankingDate?: Date; - collectionDate?: Date; - endorsedTo?: string; - notes?: string; - creationTime: Date; - lastModificationTime: Date; + 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: CheckTypeEnum + 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: NoteTypeEnum; // Received or Issued - collectionDate?: Date; - endorsedTo?: string; - location?: string; - notes?: string; - creationTime: Date; - lastModificationTime: Date; + id: string + noteNumber: string + drawerName: string + payeeName: string + currentAccountId?: string + currentAccount?: FiCurrentAccount + issueDate: Date + dueDate: Date + amount: number + currency: string + status: NoteStatusEnum + type: NoteTypeEnum // 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 + 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 + 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 + 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 + 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 + 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ş + 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 + Income = 'INCOME', // Gelir + Expense = 'EXPENSE', // Gider } export enum BankAccountTypeEnum { - Current = "CURRENT", // Vadesiz - Deposit = "DEPOSIT", // Vadeli - Credit = "CREDIT", // Kredi - Foreign = "FOREIGN", // Yabancı Para + 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 + 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İ + 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İ + 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 CheckTypeEnum { - Received = "RECEIVED", // ALINAN - Issued = "ISSUED", // VERİLEN + 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İ + 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 NoteTypeEnum { - Received = "RECEIVED", // Alınan - Issued = "ISSUED", // Verilen + Received = 'RECEIVED', // Alınan + Issued = 'ISSUED', // Verilen } export enum WaybillTypeEnum { - Outgoing = "outgoing", // Çıkış İrsaliyesi - Incoming = "incoming", // Giriş İrsaliyesi - Transfer = "transfer", // Transfer İrsaliyesi - Return = "return", // İade İrsaliyesi + 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 + 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 + Cash = 'cash', // Nakit + BankTransfer = 'bank_transfer', // Banka Transferi + CreditCard = 'credit_card', // Kredi Kartı + Check = 'check', // Çek + PromissoryNote = 'promissory_note', // Senet } diff --git a/ui/src/types/hr.ts b/ui/src/types/hr.ts index 43a7465f..14101d21 100644 --- a/ui/src/types/hr.ts +++ b/ui/src/types/hr.ts @@ -1,702 +1,760 @@ -import { Address, BankAccount } from "./common"; +import { Address, BankAccount } from './common' -export interface HrEmployee { // İnsan Kaynakları Çalışanı - id: string; - code: string; - firstName: string; - lastName: string; - fullName: string; - email: string; - phone?: string; - personalPhone?: string; - nationalId: string; - birthDate: Date; - gender: GenderEnum; - maritalStatus: MaritalStatusEnum; - address: Address; - emergencyContact: HrEmergencyContact; - hireDate: Date; - terminationDate?: Date; - employmentType: EmploymentTypeEnum; - jobPositionId: string; - jobPosition?: HrJobPosition; - departmantId: string; - department?: HrDepartment; - managerId?: string; - manager?: HrEmployee; - baseSalary: number; - currency: string; - payrollGroup: string; - bankAccountId: string; - bankAccount?: BankAccount; - workLocation: string; - workSchedule?: HrWorkSchedule; - badgeNumber?: string; - employeeStatus: EmployeeStatusEnum; - isActive: boolean; - leaves: HrLeave[]; - evaluations: HrPerformanceEvaluation[]; - trainings: HrTraining[]; - disciplinaryActions: HrDisciplinaryAction[]; - creationTime: Date; - lastModificationTime: Date; +export interface HrEmployee { + // İnsan Kaynakları Çalışanı + id: string + code: string + firstName: string + lastName: string + fullName: string + email: string + phone?: string + personalPhone?: string + nationalId: string + birthDate: Date + gender: GenderEnum + maritalStatus: MaritalStatusEnum + address: Address + emergencyContact: HrEmergencyContact + hireDate: Date + terminationDate?: Date + employmentType: EmploymentTypeEnum + jobPositionId: string + jobPosition?: HrJobPosition + departmantId: string + department?: HrDepartment + managerId?: string + manager?: HrEmployee + baseSalary: number + currency: string + payrollGroup: string + bankAccountId: string + bankAccount?: BankAccount + workLocation: string + workSchedule?: HrWorkSchedule + badgeNumber?: string + employeeStatus: EmployeeStatusEnum + isActive: boolean + leaves: HrLeave[] + evaluations: HrPerformanceEvaluation[] + trainings: HrTraining[] + disciplinaryActions: HrDisciplinaryAction[] + creationTime: Date + lastModificationTime: Date } -export interface HrCostCenter { // İnsan Kaynakları Masraf Merkezi - id: string; - code: string; - name: string; - description?: string; - parentCostCenterId?: string; - parentCostCenter?: HrCostCenter; - subCostCenters: HrCostCenter[]; - responsibleEmployeeId?: string; - responsibleEmployee?: HrEmployee; - departmentId?: string; - department?: HrDepartment; - costCenterType: CostCenterType; - budgetedAmount: number; - actualAmount: number; - currency: string; - fiscalYear: string; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; +export interface HrCostCenter { + // İnsan Kaynakları Masraf Merkezi + id: string + code: string + name: string + description?: string + parentCostCenterId?: string + parentCostCenter?: HrCostCenter + subCostCenters: HrCostCenter[] + responsibleEmployeeId?: string + responsibleEmployee?: HrEmployee + departmentId?: string + department?: HrDepartment + costCenterType: CostCenterType + budgetedAmount: number + actualAmount: number + currency: string + fiscalYear: string + isActive: boolean + creationTime: Date + lastModificationTime: Date } -export interface HrDepartment { // İnsan Kaynakları Departmanı - id: string; - code: string; - name: string; - description?: string; - parentDepartmentId?: string; - parentDepartment?: HrDepartment; - subDepartments: HrDepartment[]; - managerId?: string; - manager?: HrEmployee; - costCenterId?: string; - costCenter?: HrCostCenter; - budget: number; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; +export interface HrDepartment { + // İnsan Kaynakları Departmanı + id: string + code: string + name: string + description?: string + parentDepartmentId?: string + parentDepartment?: HrDepartment + subDepartments: HrDepartment[] + managerId?: string + manager?: HrEmployee + costCenterId?: string + costCenter?: HrCostCenter + budget: number + isActive: boolean + creationTime: Date + lastModificationTime: Date } -export interface HrJobPosition { // İnsan Kaynakları İş Pozisyonu - id: string; - code: string; - name: string; - description?: string; - departmentId: string; - department?: HrDepartment; - level: JobLevelEnum; - minSalary: number; - maxSalary: number; - currency: string; - requiredSkills: string[]; - responsibilities: string[]; - qualifications: string[]; - isActive: boolean; - employees: HrEmployee[]; - creationTime: Date; - lastModificationTime: Date; +export interface HrJobPosition { + // İnsan Kaynakları İş Pozisyonu + id: string + code: string + name: string + description?: string + departmentId: string + department?: HrDepartment + level: JobLevelEnum + minSalary: number + maxSalary: number + currency: string + requiredSkills: string[] + responsibilities: string[] + qualifications: string[] + isActive: boolean + employees: HrEmployee[] + creationTime: Date + lastModificationTime: Date } -export interface HrLeave { // İnsan Kaynakları İzni - id: string; - employeeId: string; - employee?: HrEmployee; - leaveType: LeaveTypeEnum; - startDate: Date; - endDate: Date; - totalDays: number; - reason?: string; - status: LeaveStatusEnum; - appliedDate: Date; - approvedBy?: string; - approvedDate?: Date; - rejectionReason?: string; - isHalfDay: boolean; - attachments: string[]; - creationTime: Date; - lastModificationTime: Date; +export interface HrLeave { + // İnsan Kaynakları İzni + id: string + employeeId: string + employee?: HrEmployee + leaveType: LeaveTypeEnum + startDate: Date + endDate: Date + totalDays: number + reason?: string + status: LeaveStatusEnum + appliedDate: Date + approvedBy?: string + approvedDate?: Date + rejectionReason?: string + isHalfDay: boolean + attachments: string[] + creationTime: Date + lastModificationTime: Date } -export interface HrPerformanceEvaluation { // İnsan Kaynakları Performans Değerlendirmesi - id: string; - employeeId: string; - employee?: HrEmployee; - evaluatorId: string; - evaluator?: HrEmployee; - evaluationPeriod: string; - evaluationType: EvaluationTypeEnum; - overallRating: number; - goals: HrPerformanceGoal[]; - competencies: HrCompetencyRating[]; - strengths: string[]; - areasForImprovement: string[]; - developmentPlan: string[]; - comments?: string; - status: EvaluationStatusEnum; - dueDate: Date; - completedDate?: Date; - creationTime: Date; - lastModificationTime: Date; +export interface HrPerformanceEvaluation { + // İnsan Kaynakları Performans Değerlendirmesi + id: string + employeeId: string + employee?: HrEmployee + evaluatorId: string + evaluator?: HrEmployee + evaluationPeriod: string + evaluationType: EvaluationTypeEnum + overallRating: number + goals: HrPerformanceGoal[] + competencies: HrCompetencyRating[] + strengths: string[] + areasForImprovement: string[] + developmentPlan: string[] + comments?: string + status: EvaluationStatusEnum + dueDate: Date + completedDate?: Date + creationTime: Date + lastModificationTime: Date } -export interface HrPerformanceGoal { // İnsan Kaynakları Performans Hedefi - id: string; - evaluationId: string; - goalDescription: string; - targetValue?: string; - actualValue?: string; - weight: number; - rating: number; - comments?: string; +export interface HrPerformanceGoal { + // İnsan Kaynakları Performans Hedefi + id: string + evaluationId: string + goalDescription: string + targetValue?: string + actualValue?: string + weight: number + rating: number + comments?: string } -export interface HrCompetencyRating { // İnsan Kaynakları Yeterlilik Değerlendirmesi - id: string; - evaluationId: string; - competencyName: string; - expectedLevel: number; - actualLevel: number; - rating: number; - comments?: string; +export interface HrCompetencyRating { + // İnsan Kaynakları Yeterlilik Değerlendirmesi + id: string + evaluationId: string + competencyName: string + expectedLevel: number + actualLevel: number + rating: number + comments?: string } -export interface HrTraining { // İnsan Kaynakları Eğitimi - id: string; - trainingCode: string; - title: string; - description?: string; - trainingType: TrainingTypeEnum; - provider: string; - startDate: Date; - endDate: Date; - duration: number; - location?: string; - isOnline: boolean; - maxParticipants?: number; - cost: number; - currency: string; - status: TrainingStatusEnum; - participants: HrTrainingParticipant[]; - materials: string[]; - creationTime: Date; - lastModificationTime: Date; +export interface HrTraining { + // İnsan Kaynakları Eğitimi + id: string + trainingCode: string + title: string + description?: string + trainingType: TrainingTypeEnum + provider: string + startDate: Date + endDate: Date + duration: number + location?: string + isOnline: boolean + maxParticipants?: number + cost: number + currency: string + status: TrainingStatusEnum + participants: HrTrainingParticipant[] + materials: string[] + creationTime: Date + lastModificationTime: Date } -export interface HrTrainingParticipant { // İnsan Kaynakları Eğitim Katılımcısı - id: string; - trainingId: string; - employeeId: string; - employee?: HrEmployee; - enrollmentDate: Date; - completionDate?: Date; - status: ParticipationStatusEnum; - score?: number; - feedback?: string; - certificateIssued: boolean; +export interface HrTrainingParticipant { + // İnsan Kaynakları Eğitim Katılımcısı + id: string + trainingId: string + employeeId: string + employee?: HrEmployee + enrollmentDate: Date + completionDate?: Date + status: ParticipationStatusEnum + score?: number + feedback?: string + certificateIssued: boolean } -export interface HrWorkSchedule { // İnsan Kaynakları Çalışma Programı - id: string; - scheduleCode: string; - name: string; - description?: string; - workingDays: HrWorkingDay[]; - totalHoursPerWeek: number; - isFlexible: boolean; - isActive: boolean; +export interface HrWorkSchedule { + // İnsan Kaynakları Çalışma Programı + id: string + scheduleCode: string + name: string + description?: string + workingDays: HrWorkingDay[] + totalHoursPerWeek: number + isFlexible: boolean + isActive: boolean } -export interface HrWorkingDay { // İnsan Kaynakları Çalışma Günü - dayOfWeek: number; // 0-6 (Sunday-Saturday) - isWorkingDay: boolean; - startTime?: string; - endTime?: string; - breakDuration?: number; // minutes +export interface HrWorkingDay { + // İnsan Kaynakları Çalışma Günü + dayOfWeek: number // 0-6 (Sunday-Saturday) + isWorkingDay: boolean + startTime?: string + endTime?: string + breakDuration?: number // minutes } -export interface HrDisciplinaryAction { // İnsan Kaynakları Disiplin Cezası - id: string; - employeeId: string; - employee?: HrEmployee; - actionType: DisciplinaryActionTypeEnum; - reason: string; - description: string; - actionDate: Date; - issuedBy: string; - severity: DisciplinarySeverityEnum; - status: DisciplinaryStatusEnum; - expiryDate?: Date; - attachments: string[]; - creationTime: Date; - lastModificationTime: Date; +export interface HrDisciplinaryAction { + // İnsan Kaynakları Disiplin Cezası + id: string + employeeId: string + employee?: HrEmployee + actionType: DisciplinaryActionTypeEnum + reason: string + description: string + actionDate: Date + issuedBy: string + severity: DisciplinarySeverityEnum + status: DisciplinaryStatusEnum + expiryDate?: Date + attachments: string[] + creationTime: Date + lastModificationTime: Date } -export interface HrEmergencyContact { // İnsan Kaynakları Acil Durum İletişim - name: string; - relationship: string; - phone: string; - email?: string; - address?: Address; -} - -export interface HrEmploymentType { // İnsan Kaynakları İstihdam Türü - id: string; - name: string; - count?: number; - creationTime: Date; - lastModificationTime: Date; +export interface HrEmergencyContact { + // İnsan Kaynakları Acil Durum İletişim + name: string + relationship: string + phone: string + email?: string + address?: Address } -export interface HrOvertime { // İnsan Kaynakları Fazla Mesai - id: string; - employeeId: string; - employee?: HrEmployee; - date: Date; - startTime: string; - endTime: string; - totalHours: number; - reason: string; - status: LeaveStatusEnum; - approvedBy?: string; - approver?: HrEmployee; - rate?: number; - amount?: number; - creationTime: Date; - lastModificationTime: Date; +export interface HrEmploymentType { + // İnsan Kaynakları İstihdam Türü + id: string + name: string + count?: number + creationTime: Date + lastModificationTime: Date } -export interface HrPayroll { // İnsan Kaynakları Maaş Bordrosu - id: string; - employeeId: string; - employee?: HrEmployee; - period: string; - baseSalary: number; - allowances: HrPayrollAllowance[]; - deductions: HrPayrollDeduction[]; - overtime: number; - bonus: number; - grossSalary: number; - netSalary: number; - tax: number; - socialSecurity: number; - status: PayrollStatusEnum; - paymentDate?: Date; - creationTime: Date; - lastModificationTime: Date; +export interface HrOvertime { + // İnsan Kaynakları Fazla Mesai + id: string + employeeId: string + employee?: HrEmployee + date: Date + startTime: string + endTime: string + totalHours: number + reason: string + status: LeaveStatusEnum + approvedBy?: string + approver?: HrEmployee + rate?: number + amount?: number + creationTime: Date + lastModificationTime: Date } -export interface HrPayrollAllowance { // İnsan Kaynakları Maaş Ek Ödemesi - id: string; - name: string; - amount: number; - taxable: boolean; +export interface HrPayroll { + // İnsan Kaynakları Maaş Bordrosu + id: string + employeeId: string + employee?: HrEmployee + period: string + baseSalary: number + allowances: HrPayrollAllowance[] + deductions: HrPayrollDeduction[] + overtime: number + bonus: number + grossSalary: number + netSalary: number + tax: number + socialSecurity: number + status: PayrollStatusEnum + paymentDate?: Date + creationTime: Date + lastModificationTime: Date } -export interface HrPayrollDeduction { // İnsan Kaynakları Maaş Kesintisi - id: string; - name: string; - amount: number; - mandatory: boolean; +export interface HrPayrollAllowance { + // İnsan Kaynakları Maaş Ek Ödemesi + id: string + name: string + amount: number + taxable: boolean } -export interface HrBadge { // İnsan Kaynakları Rozeti - id: string; - code: string; - name: string; - description: string; - icon: string; - color: string; - backgroundColor: string; - category: BadgeCategoryEnum; - criteria: string; - points: number; - rarity: BadgeRarityEnum; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; +export interface HrPayrollDeduction { + // İnsan Kaynakları Maaş Kesintisi + id: string + name: string + amount: number + mandatory: boolean } -export interface HrOrganizationChart { // İnsan Kaynakları Organizasyon Şeması - id: string; - employeeId: string; - employee?: HrEmployee; - parentId?: string; - parent?: HrOrganizationChart; - children?: HrOrganizationChart[]; - level: number; - position: string; - isActive: boolean; +export interface HrBadge { + // İnsan Kaynakları Rozeti + id: string + code: string + name: string + description: string + icon: string + color: string + backgroundColor: string + category: BadgeCategoryEnum + criteria: string + points: number + rarity: BadgeRarityEnum + isActive: boolean + creationTime: Date + lastModificationTime: Date } -export interface HrEmployeeBadge { // İnsan Kaynakları Çalışan Rozeti - id: string; - employeeId: string; - employee?: HrEmployee; - badgeId: string; - badge?: HrBadge; - earnedDate: Date; - expiryDate?: Date; - reason?: string; - notes?: string; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; +export interface HrOrganizationChart { + // İnsan Kaynakları Organizasyon Şeması + id: string + employeeId: string + employee?: HrEmployee + parentId?: string + parent?: HrOrganizationChart + children?: HrOrganizationChart[] + level: number + position: string + isActive: boolean } -export interface HrEvaluation360Template { // İnsan Kaynakları 360 Derece Değerlendirme Şablonu - id: string; - name: string; - description: string; - isActive: boolean; - questionGroups: HrQuestionGroup[]; - applicablePositions: string[]; // JobPosition ID'leri - applicableDepartments: string[]; // Department ID'leri - assessorTypes: AssessorTypeEnum[]; // Değerlendiriciler - creationTime: Date; - lastModificationTime: Date; +export interface HrEmployeeBadge { + // İnsan Kaynakları Çalışan Rozeti + id: string + employeeId: string + employee?: HrEmployee + badgeId: string + badge?: HrBadge + earnedDate: Date + expiryDate?: Date + reason?: string + notes?: string + isActive: boolean + creationTime: Date + lastModificationTime: Date } -export interface HrQuestionGroup { // İnsan Kaynakları Soru Grubu - id: string; - templateId: string; - groupName: string; - description?: string; - weight: number; // Bu grubun toplam puandaki ağırlığı (%) - order: number; - questions: HrEvaluationQuestion[]; -} - -export interface HrEvaluationQuestion { // İnsan Kaynakları Değerlendirme Sorusu - id: string; - groupId: string; - questionText: string; - questionType: QuestionTypeEnum; - isRequired: boolean; - weight: number; // Bu sorunun grup içindeki ağırlığı (%) - order: number; - options?: HrQuestionOption[]; // Çoktan seçmeli sorular için - minRating?: number; - maxRating?: number; - ratingLabels?: string[]; // Rating için etiketler (örn: ["Zayıf", "Orta", "İyi", "Mükemmel"]) +export interface HrEvaluation360Template { + // İnsan Kaynakları 360 Derece Değerlendirme Şablonu + id: string + name: string + description: string + isActive: boolean + questionGroups: HrQuestionGroup[] + applicablePositions: string[] // JobPosition ID'leri + applicableDepartments: string[] // Department ID'leri + assessorTypes: AssessorTypeEnum[] // Değerlendiriciler + creationTime: Date + lastModificationTime: Date } -export interface HrQuestionOption { // İnsan Kaynakları Soru Seçeneği - id: string; - questionId: string; - optionText: string; - value: number; - order: number; +export interface HrQuestionGroup { + // İnsan Kaynakları Soru Grubu + id: string + templateId: string + groupName: string + description?: string + weight: number // Bu grubun toplam puandaki ağırlığı (%) + order: number + questions: HrEvaluationQuestion[] } -export interface HrEvaluation360 { // İnsan Kaynakları 360 Derece Değerlendirme Kampanyası - id: string; - name: string; - description: string; - templateId: string; - template?: HrEvaluation360Template; - evaluationPeriod: string; - startDate: Date; - endDate: Date; - status: CampaignStatusEnum; - departmentId?: string; // Hedef departman - targetEmployees: string[]; // Değerlendirilecek Employee ID'leri - settings: HrEvaluation360Settings; - creationTime: Date; - lastModificationTime: Date; +export interface HrEvaluationQuestion { + // İnsan Kaynakları Değerlendirme Sorusu + id: string + groupId: string + questionText: string + questionType: QuestionTypeEnum + isRequired: boolean + weight: number // Bu sorunun grup içindeki ağırlığı (%) + order: number + options?: HrQuestionOption[] // Çoktan seçmeli sorular için + minRating?: number + maxRating?: number + ratingLabels?: string[] // Rating için etiketler (örn: ["Zayıf", "Orta", "İyi", "Mükemmel"]) } -export interface HrEvaluation360Settings { // İnsan Kaynakları 360 Derece Değerlendirme Ayarları - allowSelfEvaluation: boolean; - requireManagerEvaluation: boolean; - minPeerEvaluations: number; - minSubordinateEvaluations: number; - allowAnonymousFeedback: boolean; - sendReminderEmails: boolean; - reminderIntervalDays: number; +export interface HrQuestionOption { + // İnsan Kaynakları Soru Seçeneği + id: string + questionId: string + optionText: string + value: number + order: number } -export interface HrEvaluation360Participant { // İnsan Kaynakları 360 Derece Değerlendirme Katılımcısı - id: string; - campaignId: string; - evaluatedEmployeeId: string; // Değerlendirilen kişi - evaluatedEmployee?: HrEmployee; - evaluatorId: string; // Değerlendiren kişi - evaluator?: HrEmployee; - evaluatorType: AssessorTypeEnum; - status: ParticipantStatusEnum; - invitedDate: Date; - startedDate?: Date; - completedDate?: Date; - responses: HrEvaluation360Response[]; - overallScore?: number; - notes?: string; +export interface HrEvaluation360 { + // İnsan Kaynakları 360 Derece Değerlendirme Kampanyası + id: string + name: string + description: string + templateId: string + template?: HrEvaluation360Template + evaluationPeriod: string + startDate: Date + endDate: Date + status: CampaignStatusEnum + departmentId?: string // Hedef departman + targetEmployees: string[] // Değerlendirilecek Employee ID'leri + settings: HrEvaluation360Settings + creationTime: Date + lastModificationTime: Date } -export interface HrEvaluation360Response { // İnsan Kaynakları 360 Derece Değerlendirme Cevabı - id: string; - participantId: string; - questionId: string; - question?: HrEvaluationQuestion; - responseValue: string | number; // Cevap değeri - responseText?: string; // Metin cevaplar için - score: number; // Hesaplanan puan - submittedDate: Date; -} - -export interface HrEvaluation360Result { // İnsan Kaynakları 360 Derece Değerlendirme Sonucu - id: string; - campaignId: string; - employeeId: string; - employee?: HrEmployee; - participants: HrEvaluation360Participant[]; // Bu sonuca katkıda bulunan değerlendiriciler - overallScore: number; - maxPossibleScore: number; - scorePercentage: number; - groupScores: HrGroupScore[]; - assessorTypeScores: HrAssessorTypeScore[]; - strengths: string[]; - developmentAreas: string[]; - actionPlan: string[]; - managerComments?: string; - hrComments?: string; - status: ResultStatusEnum; - generatedDate: Date; - approvedBy?: string; - approvedDate?: Date; +export interface HrEvaluation360Settings { + // İnsan Kaynakları 360 Derece Değerlendirme Ayarları + allowSelfEvaluation: boolean + requireManagerEvaluation: boolean + minPeerEvaluations: number + minSubordinateEvaluations: number + allowAnonymousFeedback: boolean + sendReminderEmails: boolean + reminderIntervalDays: number } -export interface HrGroupScore { // İnsan Kaynakları Grup Puanı - groupId: string; - groupName: string; - score: number; - maxScore: number; - percentage: number; - responseCount: number; +export interface HrEvaluation360Participant { + // İnsan Kaynakları 360 Derece Değerlendirme Katılımcısı + id: string + campaignId: string + evaluatedEmployeeId: string // Değerlendirilen kişi + evaluatedEmployee?: HrEmployee + evaluatorId: string // Değerlendiren kişi + evaluator?: HrEmployee + evaluatorType: AssessorTypeEnum + status: ParticipantStatusEnum + invitedDate: Date + startedDate?: Date + completedDate?: Date + responses: HrEvaluation360Response[] + overallScore?: number + notes?: string } -export interface HrAssessorTypeScore { // İnsan Kaynakları Değerlendirici Türü Puanı - assessorType: AssessorTypeEnum; - assessorCount: number; - averageScore: number; - maxScore: number; - percentage: number; +export interface HrEvaluation360Response { + // İnsan Kaynakları 360 Derece Değerlendirme Cevabı + id: string + participantId: string + questionId: string + question?: HrEvaluationQuestion + responseValue: string | number // Cevap değeri + responseText?: string // Metin cevaplar için + score: number // Hesaplanan puan + submittedDate: Date } -export enum PayrollStatusEnum { // Maaş Durumu - Draft = "DRAFT", // Taslak - Calculated = "CALCULATED", // Hesaplandı - Approved = "APPROVED", // Onaylandı - Paid = "PAID", // Ödendi - Cancelled = "CANCELLED", // İptal edildi +export interface HrEvaluation360Result { + // İnsan Kaynakları 360 Derece Değerlendirme Sonucu + id: string + campaignId: string + employeeId: string + employee?: HrEmployee + participants: HrEvaluation360Participant[] // Bu sonuca katkıda bulunan değerlendiriciler + overallScore: number + maxPossibleScore: number + scorePercentage: number + groupScores: HrGroupScore[] + assessorTypeScores: HrAssessorTypeScore[] + strengths: string[] + developmentAreas: string[] + actionPlan: string[] + managerComments?: string + hrComments?: string + status: ResultStatusEnum + generatedDate: Date + approvedBy?: string + approvedDate?: Date } -export enum GoalStatusEnum { // Hedef Durumu - NotStarted = "NOT_STARTED", // Başlanmadı - InProgress = "IN_PROGRESS", // Devam Ediyor - Completed = "COMPLETED", // Tamamlandı - Overdue = "OVERDUE", // Geçmiş - Cancelled = "CANCELLED", // İptal edildi +export interface HrGroupScore { + // İnsan Kaynakları Grup Puanı + groupId: string + groupName: string + score: number + maxScore: number + percentage: number + responseCount: number } -export enum BadgeCategoryEnum { // Rozet Kategorisi - Performance = "PERFORMANCE", // Performans - Leadership = "LEADERSHIP", // Liderlik - Innovation = "INNOVATION", // Yenilik - Teamwork = "TEAMWORK", // Takım Çalışması - Customer = "CUSTOMER", // Müşteri - Safety = "SAFETY", // Güvenlik - Attendance = "ATTENDANCE", // Devamsızlık - Training = "TRAINING", // Eğitim - Project = "PROJECT", // Proje - Special = "SPECIAL", // Özel +export interface HrAssessorTypeScore { + // İnsan Kaynakları Değerlendirici Türü Puanı + assessorType: AssessorTypeEnum + assessorCount: number + averageScore: number + maxScore: number + percentage: number } -export enum BadgeRarityEnum { // Rozet Nadirliği - Common = "COMMON", // Orta - Uncommon = "UNCOMMON", // Yaygın olmayan - Rare = "RARE", // Nadir - Epic = "EPIC", // Epik - Legendary = "LEGENDARY", // Efsanevi +export enum PayrollStatusEnum { + // Maaş Durumu + Draft = 'DRAFT', // Taslak + Calculated = 'CALCULATED', // Hesaplandı + Approved = 'APPROVED', // Onaylandı + Paid = 'PAID', // Ödendi + Cancelled = 'CANCELLED', // İptal edildi } -export enum ResultStatusEnum { // Sonuç Durumu - Pending = "PENDING", // Beklemede - InReview = "IN_REVIEW", // İnceleniyor - Approved = "APPROVED", // Onaylandı - Published = "PUBLISHED", // Yayınlandı +export enum GoalStatusEnum { + // Hedef Durumu + NotStarted = 'NOT_STARTED', // Başlanmadı + InProgress = 'IN_PROGRESS', // Devam Ediyor + Completed = 'COMPLETED', // Tamamlandı + Overdue = 'OVERDUE', // Geçmiş + Cancelled = 'CANCELLED', // İptal edildi } -export enum GenderEnum { // Cinsiyet - Male = "MALE", // Erkek - Female = "FEMALE", // Kadın - Other = "OTHER", // Diğer +export enum BadgeCategoryEnum { + // Rozet Kategorisi + Performance = 'PERFORMANCE', // Performans + Leadership = 'LEADERSHIP', // Liderlik + Innovation = 'INNOVATION', // Yenilik + Teamwork = 'TEAMWORK', // Takım Çalışması + Customer = 'CUSTOMER', // Müşteri + Safety = 'SAFETY', // Güvenlik + Attendance = 'ATTENDANCE', // Devamsızlık + Training = 'TRAINING', // Eğitim + Project = 'PROJECT', // Proje + Special = 'SPECIAL', // Özel } -export enum MaritalStatusEnum { // Medeni Durum - Single = "SINGLE", // Bekar - Married = "MARRIED", // Evli - Divorced = "DIVORCED", // Boşanmış - Widowed = "WIDOWED", // Dul +export enum BadgeRarityEnum { + // Rozet Nadirliği + Common = 'COMMON', // Orta + Uncommon = 'UNCOMMON', // Yaygın olmayan + Rare = 'RARE', // Nadir + Epic = 'EPIC', // Epik + Legendary = 'LEGENDARY', // Efsanevi } -export enum CostCenterType { // Masraf Merkezi Türü - Revenue = "REVENUE", // Gelir - Standard = "STANDARD", // Standart - Discretionary = "DISCRETIONARY", // İsteğe bağlı - Investment = "INVESTMENT", // Yatırım - Service = "SERVICE", // Hizmet - Production = "PRODUCTION", // Üretim - Support = "SUPPORT", // Destek - Administrative = "ADMINISTRATIVE", // İdari +export enum ResultStatusEnum { + // Sonuç Durumu + Pending = 'PENDING', // Beklemede + InReview = 'IN_REVIEW', // İnceleniyor + Approved = 'APPROVED', // Onaylandı + Published = 'PUBLISHED', // Yayınlandı } -export enum EmploymentTypeEnum { // İstihdam Türü - FullTime = "FULL_TIME", // Tam Zamanlı - PartTime = "PART_TIME", // Yarı Zamanlı - Contract = "CONTRACT", // Sözleşmeli - Intern = "INTERN", // Stajyer - Temporary = "TEMPORARY", // Geçici - Consultant = "CONSULTANT", // Danışman +export enum GenderEnum { + // Cinsiyet + Male = 'MALE', // Erkek + Female = 'FEMALE', // Kadın + Other = 'OTHER', // Diğer } -export enum EmployeeStatusEnum { // Çalışan Durumu - Active = "ACTIVE", // Aktif - Inactive = "INACTIVE", // Pasif - OnLeave = "ON_LEAVE", // İzinli - Suspended = "SUSPENDED", // Askıya Alındı - Terminated = "TERMINATED", // İşten Ayrıldı +export enum MaritalStatusEnum { + // Medeni Durum + Single = 'SINGLE', // Bekar + Married = 'MARRIED', // Evli + Divorced = 'DIVORCED', // Boşanmış + Widowed = 'WIDOWED', // Dul } -export enum JobLevelEnum { // İş Seviyesi - Entry = "ENTRY", // Giriş - Junior = "JUNIOR", // Junior - Mid = "MID", // Orta - Senior = "SENIOR", // Kıdemli - Lead = "LEAD", // Lider - Manager = "MANAGER", // Yönetici - Director = "DIRECTOR", // Direktör - Executive = "EXECUTIVE", // İcra +export enum CostCenterType { + // Masraf Merkezi Türü + Revenue = 'REVENUE', // Gelir + Standard = 'STANDARD', // Standart + Discretionary = 'DISCRETIONARY', // İsteğe bağlı + Investment = 'INVESTMENT', // Yatırım + Service = 'SERVICE', // Hizmet + Production = 'PRODUCTION', // Üretim + Support = 'SUPPORT', // Destek + Administrative = 'ADMINISTRATIVE', // İdari } -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 EmploymentTypeEnum { + // İstihdam Türü + FullTime = 'FULL_TIME', // Tam Zamanlı + PartTime = 'PART_TIME', // Yarı Zamanlı + Contract = 'CONTRACT', // Sözleşmeli + Intern = 'INTERN', // Stajyer + Temporary = 'TEMPORARY', // Geçici + Consultant = 'CONSULTANT', // Danışman } -export enum LeaveStatusEnum { // İzin Durumu - Pending = "PENDING", // Beklemede - Approved = "APPROVED", // Onaylandı - Rejected = "REJECTED", // Reddedildi - Cancelled = "CANCELLED", // İptal edildi +export enum EmployeeStatusEnum { + // Çalışan Durumu + Active = 'ACTIVE', // Aktif + Inactive = 'INACTIVE', // Pasif + OnLeave = 'ON_LEAVE', // İzinli + Suspended = 'SUSPENDED', // Askıya Alındı + Terminated = 'TERMINATED', // İşten Ayrıldı } -export enum EvaluationStatusEnum { // Değerlendirme Durumu - NotStarted = "NOT_STARTED", // Başlanmadı - InProgress = "IN_PROGRESS", // Devam Ediyor - PendingReview = "PENDING_REVIEW", // İnceleme Bekliyor - Completed = "COMPLETED", // Tamamlandı - Overdue = "OVERDUE", // Geçmiş +export enum JobLevelEnum { + // İş Seviyesi + Entry = 'ENTRY', // Giriş + Junior = 'JUNIOR', // Junior + Mid = 'MID', // Orta + Senior = 'SENIOR', // Kıdemli + Lead = 'LEAD', // Lider + Manager = 'MANAGER', // Yönetici + Director = 'DIRECTOR', // Direktör + Executive = 'EXECUTIVE', // İcra } -export enum TrainingTypeEnum { // Eğitim Türü - Technical = "TECHNICAL", // Teknik - Soft_Skills = "SOFT_SKILLS", // Yumuşak Beceriler - Leadership = "LEADERSHIP", // Liderlik - Compliance = "COMPLIANCE", // Uyum - Safety = "SAFETY", // Güvenlik - Product = "PRODUCT", // Ürün - Process = "PROCESS", // Süreç +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 TrainingStatusEnum { // Eğitim Durumu - Planned = "PLANNED", // Planlandı - Open = "OPEN", // Açık - InProgress = "IN_PROGRESS", // Devam Ediyor - Completed = "COMPLETED", // Tamamlandı - Cancelled = "CANCELLED", // İptal Edildi +export enum LeaveStatusEnum { + // İzin Durumu + Pending = 'PENDING', // Beklemede + Approved = 'APPROVED', // Onaylandı + Rejected = 'REJECTED', // Reddedildi + Cancelled = 'CANCELLED', // İptal edildi } -export enum ParticipationStatusEnum { // Katılım Durumu - Enrolled = "ENROLLED", // Kayıtlı - InProgress = "IN_PROGRESS", // Devam Ediyor - Completed = "COMPLETED", // Tamamlandı - Failed = "FAILED", // Başarısız - Withdrawn = "WITHDRAWN", // Çekildi +export enum EvaluationStatusEnum { + // Değerlendirme Durumu + NotStarted = 'NOT_STARTED', // Başlanmadı + InProgress = 'IN_PROGRESS', // Devam Ediyor + PendingReview = 'PENDING_REVIEW', // İnceleme Bekliyor + Completed = 'COMPLETED', // Tamamlandı + Overdue = 'OVERDUE', // Geçmiş } -export enum DisciplinaryActionTypeEnum { // Disiplin Cezası Türü - Verbal_Warning = "VERBAL_WARNING", // Sözlü Uyarı - Written_Warning = "WRITTEN_WARNING", // Yazılı Uyarı - Final_Warning = "FINAL_WARNING", // Son Uyarı - Suspension = "SUSPENSION", // Askıya Alma - Termination = "TERMINATION", // İşten Çıkarma - Demotion = "DEMOTION", // Aşağı Alma +export enum TrainingTypeEnum { + // Eğitim Türü + Technical = 'TECHNICAL', // Teknik + Soft_Skills = 'SOFT_SKILLS', // Yumuşak Beceriler + Leadership = 'LEADERSHIP', // Liderlik + Compliance = 'COMPLIANCE', // Uyum + Safety = 'SAFETY', // Güvenlik + Product = 'PRODUCT', // Ürün + Process = 'PROCESS', // Süreç } -export enum DisciplinarySeverityEnum { // Disiplin Cezası Şiddeti - Minor = "MINOR", // Hafif - Major = "MAJOR", // Ağır - Severe = "SEVERE", // Ciddi +export enum TrainingStatusEnum { + // Eğitim Durumu + Planned = 'PLANNED', // Planlandı + Open = 'OPEN', // Açık + InProgress = 'IN_PROGRESS', // Devam Ediyor + Completed = 'COMPLETED', // Tamamlandı + Cancelled = 'CANCELLED', // İptal Edildi } -export enum DisciplinaryStatusEnum { // Disiplin Cezası Durumu - Active = "ACTIVE", // Aktif - Resolved = "RESOLVED", // Çözüldü - Expired = "EXPIRED", // Süresi Dolmuş - Appealed = "APPEALED", // İtiraz Edilmiş +export enum ParticipationStatusEnum { + // Katılım Durumu + Enrolled = 'ENROLLED', // Kayıtlı + InProgress = 'IN_PROGRESS', // Devam Ediyor + Completed = 'COMPLETED', // Tamamlandı + Failed = 'FAILED', // Başarısız + Withdrawn = 'WITHDRAWN', // Çekildi } -export enum AssessorTypeEnum { // Değerlendirici Türü - Self = "SELF", // Kendi - Manager = "MANAGER", // Yönetici - Peer = "PEER", // Meslektaş - Subordinate = "SUBORDINATE", // Ast - Customer = "CUSTOMER", // Müşteri - OtherDepartment = "OTHER_DEPARTMENT", // Diğer Departman - HRUpperManagement = "HR_UPPER_MANAGEMENT", // İK/Üst Yönetim - External = "EXTERNAL", // Dış paydaş değerlendirmesi (mevcut) +export enum DisciplinaryActionTypeEnum { + // Disiplin Cezası Türü + Verbal_Warning = 'VERBAL_WARNING', // Sözlü Uyarı + Written_Warning = 'WRITTEN_WARNING', // Yazılı Uyarı + Final_Warning = 'FINAL_WARNING', // Son Uyarı + Suspension = 'SUSPENSION', // Askıya Alma + Termination = 'TERMINATION', // İşten Çıkarma + Demotion = 'DEMOTION', // Aşağı Alma } -export enum EvaluationTypeEnum { // Değerlendirme Türü - Annual = "ANNUAL", // Yıllık - Quarterly = "QUARTERLY", // Çeyrek - Probation = "PROBATION", // Deneme Süresi - Project = "PROJECT", // Proje - Competency = "COMPETENCY", // Yeterlilik - Leadership = "LEADERSHIP", // Liderlik - Degree360 = "DEGREE_360", // 360° Derece değerlendirme +export enum DisciplinarySeverityEnum { + // Disiplin Cezası Şiddeti + Minor = 'MINOR', // Hafif + Major = 'MAJOR', // Ağır + Severe = 'SEVERE', // Ciddi } -export enum CampaignStatusEnum { // Kampanya Durumu - Draft = "DRAFT", // Taslak - Active = "ACTIVE", // Aktif - Completed = "COMPLETED", // Tamamlandı - Cancelled = "CANCELLED", // İptal Edildi +export enum DisciplinaryStatusEnum { + // Disiplin Cezası Durumu + Active = 'ACTIVE', // Aktif + Resolved = 'RESOLVED', // Çözüldü + Expired = 'EXPIRED', // Süresi Dolmuş + Appealed = 'APPEALED', // İtiraz Edilmiş } -export enum ParticipantStatusEnum { // Katılımcı Durumu - Invited = "INVITED", // Davet Edildi - Started = "STARTED", // Başladı - Completed = "COMPLETED", // Tamamlandı - Expired = "EXPIRED", // Süresi Dolmuş - Declined = "DECLINED", // Reddedildi +export enum AssessorTypeEnum { + // Değerlendirici Türü + Self = 'SELF', // Kendi + Manager = 'MANAGER', // Yönetici + Peer = 'PEER', // Meslektaş + Subordinate = 'SUBORDINATE', // Ast + Customer = 'CUSTOMER', // Müşteri + OtherDepartment = 'OTHER_DEPARTMENT', // Diğer Departman + HRUpperManagement = 'HR_UPPER_MANAGEMENT', // İK/Üst Yönetim + External = 'EXTERNAL', // Dış paydaş değerlendirmesi (mevcut) } -export enum QuestionTypeEnum { // Soru Türü - Rating = "RATING", // 1-5 puan verme - MultipleChoice = "MULTIPLE_CHOICE", // Çoktan seçmeli - Text = "TEXT", // Metin cevap - YesNo = "YES_NO", // Evet/Hayır - Scale = "SCALE", // Ölçek (1-10 gibi) +export enum EvaluationTypeEnum { + // Değerlendirme Türü + Annual = 'ANNUAL', // Yıllık + Quarterly = 'QUARTERLY', // Çeyrek + Probation = 'PROBATION', // Deneme Süresi + Project = 'PROJECT', // Proje + Competency = 'COMPETENCY', // Yeterlilik + Leadership = 'LEADERSHIP', // Liderlik + Degree360 = 'DEGREE_360', // 360° Derece değerlendirme +} + +export enum CampaignStatusEnum { + // Kampanya Durumu + Draft = 'DRAFT', // Taslak + Active = 'ACTIVE', // Aktif + Completed = 'COMPLETED', // Tamamlandı + Cancelled = 'CANCELLED', // İptal Edildi +} + +export enum ParticipantStatusEnum { + // Katılımcı Durumu + Invited = 'INVITED', // Davet Edildi + Started = 'STARTED', // Başladı + Completed = 'COMPLETED', // Tamamlandı + Expired = 'EXPIRED', // Süresi Dolmuş + Declined = 'DECLINED', // Reddedildi +} + +export enum QuestionTypeEnum { + // Soru Türü + Rating = 'RATING', // 1-5 puan verme + MultipleChoice = 'MULTIPLE_CHOICE', // Çoktan seçmeli + Text = 'TEXT', // Metin cevap + YesNo = 'YES_NO', // Evet/Hayır + Scale = 'SCALE', // Ölçek (1-10 gibi) } diff --git a/ui/src/types/mm.ts b/ui/src/types/mm.ts index d3801dc5..165b37da 100644 --- a/ui/src/types/mm.ts +++ b/ui/src/types/mm.ts @@ -1,662 +1,711 @@ -import { Address, BusinessParty, PaymentTerms, PriorityEnum } from "./common"; -import { HrDepartment } from "./hr"; -import { WmWarehouse, WmZone, WmLocation } from "./wm"; +import { Address, BusinessParty, PaymentTerms, PriorityEnum } from './common' +import { HrDepartment } from './hr' +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 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 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 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 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; - additionalCost: number; - isActive: boolean; +export interface MmMaterialVariant { + // Varyant + id: string + materialId: string + variantCode: string + variantName: string + specifications: Record + additionalCost: number + isActive: boolean } -export interface MmMaterialSpecification { // Özellik - id: string; - materialId: string; - specificationName: string; - specificationValue: string; - unitId: string; - unit?: MmUnit; - isRequired: 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 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 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 MmUnit { + // Birim + id: string + code: string + name: string + description?: string + 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 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 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 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 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 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 MmPurchaseRequisition { +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; + 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 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 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 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 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 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 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 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; + 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 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 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 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 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 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 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?: HrDepartment; - requestType: RequestTypeEnum; - amountThreshold: number; - approvalLevels: MmApprovalWorkflowLevel[]; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; +export interface MmApprovalWorkflow { + // Onay İş Akışı + id: string + name: string + departmentId: string + department?: HrDepartment + 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 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 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 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 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 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 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ü - Material = "MATERIAL", // Malzeme - Service = "SERVICE", // Hizmet - Both = "BOTH", // Her ikisi +export enum SupplierTypeEnum { + // Tedarikçi Türü + Material = 'MATERIAL', // Malzeme + Service = 'SERVICE', // Hizmet + Both = 'BOTH', // Her ikisi } -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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 + +export enum SerialStatusEnum { + // Seri Numarası Durumu + Available = 'AVAILABLE', // Kullanılabilir + InUse = 'IN_USE', // Kullanımda + Maintenance = 'MAINTENANCE', // Bakımda + Disposed = 'DISPOSED', // İmha Edildi } diff --git a/ui/src/types/mrp.ts b/ui/src/types/mrp.ts index e1bc7508..f46bd80d 100644 --- a/ui/src/types/mrp.ts +++ b/ui/src/types/mrp.ts @@ -1,457 +1,465 @@ -import { PmWorkCenter, WorkOrderStatusEnum } from "./pm"; -import { - MmMaterial, - MmMaterialSupplier, - QualityResultEnumEnum, - QualityStatusEnum, -} from "./mm"; -import { PriorityEnum } from "./common"; -import { CrmSalesOrder } from "./crm"; +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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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 + estimatedDuration: number // in hours resourceRequirements: { - workCenter: string; - capacity: number; - efficiency: number; - }[]; + 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; + 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; + 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; + 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; + 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; + 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[]; + 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; + 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; + id: string + toolId: string + toolName: string + quantity: number + isRequired: boolean } export interface MrpSkillRequirement { // Beceri Gereksinimi - id: string; - skillName: string; - level: number; - isRequired: boolean; + 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 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 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 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 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 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 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 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 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 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 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 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 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 +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 } diff --git a/ui/src/types/pm.ts b/ui/src/types/pm.ts index c1c17b62..1edfe444 100644 --- a/ui/src/types/pm.ts +++ b/ui/src/types/pm.ts @@ -1,278 +1,287 @@ -import { PriorityEnum } from "./common"; -import { HrDepartment } from "./hr"; -import { MmMaterial } from "./mm"; +import { PriorityEnum } from './common' +import { HrDepartment } from './hr' +import { MmMaterial } from './mm' -export type CalendarView = "month" | "week" | "day"; +export type CalendarView = 'month' | 'week' | 'day' export interface PmWorkCenter { // İş Merkezi / Ekipman - id: string; - code: string; - name: string; - description?: string; - workCenterId: string; - workCenterType?: PmWorkCenterType; - manufacturer?: string; - model?: string; - serialNumber?: string; - installationDate: Date; - warrantyExpiry?: Date; - location: string; - departmentId: string; - department?: HrDepartment; - status: WorkCenterStatusEnum; - criticality: CriticalityLevelEnum; - specifications: PmWorkCenterSpecification[]; - maintenancePlans: PmMaintenancePlan[]; - workOrders: PmMaintenanceWorkOrder[]; - downTimeHistory: PmDownTimeRecord[]; - capacity: number; - costPerHour: number; - setupTime: number; - machineType: string; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; + id: string + code: string + name: string + description?: string + workCenterId: string + workCenterType?: PmWorkCenterType + manufacturer?: string + model?: string + serialNumber?: string + installationDate: Date + warrantyExpiry?: Date + location: string + departmentId: string + department?: HrDepartment + status: WorkCenterStatusEnum + criticality: CriticalityLevelEnum + specifications: PmWorkCenterSpecification[] + maintenancePlans: PmMaintenancePlan[] + workOrders: PmMaintenanceWorkOrder[] + downTimeHistory: PmDownTimeRecord[] + capacity: number + costPerHour: number + setupTime: number + machineType: string + 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; + id: string + code: string + name: string + description?: string + category: string + isActive: boolean } export interface PmWorkCenterSpecification { // İş Merkezi / Ekipman Özelliği - id: string; - workCenterId: string; - specificationName: string; - specificationValue: string; - unit?: string; - isRequired: boolean; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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 + 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 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 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 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 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 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 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 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 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İ +export enum WorkCenterStatusEnum { + // İş Merkezi / Ekipman Durumu + Operational = 'OPERATIONAL', // OPERATİF + UnderMaintenance = 'UNDER_MAINTENANCE', // BAKIMDA + OutOfOrder = 'OUT_OF_ORDER', // ARIZALI + Retired = 'RETIRED', // ESKİ } diff --git a/ui/src/types/ps.ts b/ui/src/types/ps.ts index 7ad47dc5..5cca43aa 100644 --- a/ui/src/types/ps.ts +++ b/ui/src/types/ps.ts @@ -1,342 +1,356 @@ -import { BusinessParty, PriorityEnum } from "./common"; -import { HrEmployee } from "./hr"; +import { BusinessParty, PriorityEnum } from './common' +import { HrEmployee } from './hr' 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?: HrEmployee; - 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; + id: string + code: string + name: string + description?: string + projectType: ProjectTypeEnum + status: ProjectStatusEnum + priority: PriorityEnum + customerId?: string + customer?: BusinessParty + projectManagerId: string + projectManager?: HrEmployee + 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: string; + 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: string } 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?: HrEmployee; - startDate: Date; - endDate: Date; - actualStartDate?: Date; - actualEndDate?: Date; - estimatedHours: number; - actualHours: number; - progress: number; - activities: PsTaskActivity[]; - comments: PsTaskComment[]; - isActive: boolean; - creationTime: Date; - lastModificationTime: Date; + id: string + projectId: string + phaseId?: string + phase?: PsProjectPhase + taskCode: string + name: string + description?: string + taskType: TaskTypeEnum + status: TaskStatusEnum + priority: PriorityEnum + assignedTo?: string + assignee?: HrEmployee + 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; + 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; + 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; + 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; + 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; + 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: "ON_TRACK" | "AT_RISK" | "DELAYED" | "COMPLETED"; - currency: string; - lastUpdated: Date; + 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: 'ON_TRACK' | 'AT_RISK' | 'DELAYED' | 'COMPLETED' + currency: string + lastUpdated: Date } export interface PsTaskDailyUpdate { // Görev Günlük Güncellemesi - id: string; - taskId: string; - task?: PsProjectTask; - employeeId: string; - employee?: HrEmployee; - date: Date; - hoursWorked: number; - description: string; - workType: WorkTypeEnum; - progress: number; // percentage - challenges?: string; - nextSteps?: string; - status: DailyUpdateStatusEnum; - attachments?: string[]; - creationTime: Date; - lastModificationTime: Date; + id: string + taskId: string + task?: PsProjectTask + employeeId: string + employee?: HrEmployee + 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?: HrEmployee; - parentId?: string; - children?: PsGanttTask[]; - dependencies?: string[]; - priority: PriorityEnum; - status: TaskStatusEnum | ProjectStatusEnum | PhaseStatusEnum; - hoursWorked?: number; - estimatedHours?: number; - level: number; // indentation level + id: string + name: string + type: 'project' | 'phase' | 'task' + startDate: Date + endDate: Date + progress: number + assignee?: HrEmployee + 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 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 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 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 ProjectStatusEnum { + // Proje Durumu + Planning = 'PLANNING', // Planlama + Active = 'ACTIVE', // Aktif + OnHold = 'ON_HOLD', // Beklemede + Completed = 'COMPLETED', // Tamamlandı + Cancelled = 'CANCELLED', // İptal Edildi } -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 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 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 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 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 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 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 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 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 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 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 } diff --git a/ui/src/types/wm.ts b/ui/src/types/wm.ts index 13fd981c..01d3a3f0 100644 --- a/ui/src/types/wm.ts +++ b/ui/src/types/wm.ts @@ -1,246 +1,256 @@ -import { Address } from "./common"; -import { MmMaterial } from "./mm"; -import { SecurityLevelEnum } from "./admin/mrp"; +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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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; + 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 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 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 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 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 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 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 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 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 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 +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 } diff --git a/ui/src/views/crm/components/CustomerCards.tsx b/ui/src/views/crm/components/CustomerCards.tsx index de5e57a0..1010ac8c 100644 --- a/ui/src/views/crm/components/CustomerCards.tsx +++ b/ui/src/views/crm/components/CustomerCards.tsx @@ -31,6 +31,7 @@ import { getBusinessPartyStatusName, getCustomerSegmentName, } from '../../../utils/erp' +import { ROUTES_ENUM } from '@/routes/route.constant' const CustomerCards: React.FC = () => { const [searchTerm, setSearchTerm] = useState('') @@ -155,7 +156,7 @@ const CustomerCards: React.FC = () => { @@ -419,14 +420,14 @@ const CustomerCards: React.FC = () => {
@@ -463,7 +464,7 @@ const CustomerCards: React.FC = () => { Yeni müşteri ekleyerek başlayın veya arama kriterlerinizi değiştirin.

diff --git a/ui/src/views/crm/components/CustomerEdit.tsx b/ui/src/views/crm/components/CustomerEdit.tsx index 804d13a5..d647b01a 100644 --- a/ui/src/views/crm/components/CustomerEdit.tsx +++ b/ui/src/views/crm/components/CustomerEdit.tsx @@ -17,6 +17,7 @@ import { CustomerSegmentEnum, CustomerTypeEnum } from '../../../types/crm' import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties' import { BusinessParty, BusinessPartyStatusEnum, PaymentTerms } from '../../../types/common' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const CustomerEdit: React.FC = () => { const { id } = useParams<{ id: string }>() @@ -58,7 +59,7 @@ const CustomerEdit: React.FC = () => { queryClient.invalidateQueries({ queryKey: ['customers'] }) queryClient.invalidateQueries({ queryKey: ['customer', id] }) setIsDirty(false) - navigate(`/admin/crm/customers/${id}`) + navigate(ROUTES_ENUM.protected.crm.customersDetail.replace(':id', id || 'new')) }, }) @@ -104,10 +105,10 @@ const CustomerEdit: React.FC = () => { const handleCancel = () => { if (isDirty) { if (window.confirm('Değişiklikleriniz kaydedilmedi. Çıkmak istediğinizden emin misiniz?')) { - navigate(`/admin/crm/customers/${id}`) + navigate(ROUTES_ENUM.protected.crm.customersDetail.replace(':id', id!)) } } else { - navigate(`/admin/crm/customers/${id}`) + navigate(ROUTES_ENUM.protected.crm.customersDetail.replace(':id', id!)) } } @@ -144,7 +145,7 @@ const CustomerEdit: React.FC = () => {
-
+
diff --git a/ui/src/views/crm/components/CustomerForm.tsx b/ui/src/views/crm/components/CustomerForm.tsx index 68fac336..f3e54cf2 100644 --- a/ui/src/views/crm/components/CustomerForm.tsx +++ b/ui/src/views/crm/components/CustomerForm.tsx @@ -13,6 +13,7 @@ import LoadingSpinner from '../../../components/common/LoadingSpinner' import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties' import { BusinessParty } from '../../../types/common' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' interface ValidationErrors { [key: string]: string @@ -104,7 +105,7 @@ const CustomerForm: React.FC = () => { alert(isEdit ? 'Müşteri başarıyla güncellendi!' : 'Müşteri başarıyla oluşturuldu!') // Navigate back to list - navigate('/admin/crm') + navigate(ROUTES_ENUM.protected.crm.customers) } catch (error) { console.error('Error saving customer:', error) alert('Bir hata oluştu. Lütfen tekrar deneyin.') @@ -114,7 +115,7 @@ const CustomerForm: React.FC = () => { } const handleCancel = () => { - navigate('/admin/crm') + navigate(ROUTES_ENUM.protected.crm.customers) } if (loading) { diff --git a/ui/src/views/crm/components/CustomerFormNew.tsx b/ui/src/views/crm/components/CustomerFormNew.tsx index 1210018b..e52cf07d 100644 --- a/ui/src/views/crm/components/CustomerFormNew.tsx +++ b/ui/src/views/crm/components/CustomerFormNew.tsx @@ -13,6 +13,7 @@ import LoadingSpinner from '../../../components/common/LoadingSpinner' import { BusinessParty } from '../../../types/common' import { mockBusinessPartyNew } from '../../../mocks/mockBusinessParties' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' interface ValidationErrors { [key: string]: string @@ -102,7 +103,7 @@ const CustomerForm: React.FC = () => { alert(isEdit ? 'Müşteri başarıyla güncellendi!' : 'Müşteri başarıyla oluşturuldu!') // Navigate back to list - navigate('/admin/crm') + navigate(ROUTES_ENUM.protected.crm.customers) } catch (error) { console.error('Error saving customer:', error) alert('Bir hata oluştu. Lütfen tekrar deneyin.') @@ -112,7 +113,7 @@ const CustomerForm: React.FC = () => { } const handleCancel = () => { - navigate('/admin/crm') + navigate(ROUTES_ENUM.protected.crm.customers) } if (loading) { diff --git a/ui/src/views/crm/components/CustomerList.tsx b/ui/src/views/crm/components/CustomerList.tsx index 7c6bfd5e..89770cad 100644 --- a/ui/src/views/crm/components/CustomerList.tsx +++ b/ui/src/views/crm/components/CustomerList.tsx @@ -29,6 +29,7 @@ import { getCustomerSegmentColor, getCustomerSegmentName, } from '../../../utils/erp' +import { ROUTES_ENUM } from '@/routes/route.constant' const CustomerList: React.FC = () => { const [searchTerm, setSearchTerm] = useState('') @@ -124,7 +125,7 @@ const CustomerList: React.FC = () => { @@ -367,7 +368,7 @@ const CustomerList: React.FC = () => {
@@ -375,7 +376,7 @@ const CustomerList: React.FC = () => { @@ -396,7 +397,7 @@ const CustomerList: React.FC = () => {

Yeni müşteri ekleyerek başlayın.

diff --git a/ui/src/views/crm/components/CustomerView.tsx b/ui/src/views/crm/components/CustomerView.tsx index b85b570d..305fc5d7 100644 --- a/ui/src/views/crm/components/CustomerView.tsx +++ b/ui/src/views/crm/components/CustomerView.tsx @@ -35,6 +35,7 @@ import { } from '../../../utils/erp' import { BusinessPartyStatusEnum } from '../../../types/common' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const CustomerView: React.FC = () => { const { id } = useParams<{ id: string }>() @@ -105,7 +106,7 @@ const CustomerView: React.FC = () => {

Yeni Satış Ekibi

-

- Yeni satış ekibi oluşturun ve ekip üyelerini atayın -

+

Yeni satış ekibi oluşturun ve ekip üyelerini atayın

diff --git a/ui/src/views/crm/components/SalesTeamEdit.tsx b/ui/src/views/crm/components/SalesTeamEdit.tsx index 5e540eb1..b57b7ce9 100644 --- a/ui/src/views/crm/components/SalesTeamEdit.tsx +++ b/ui/src/views/crm/components/SalesTeamEdit.tsx @@ -14,6 +14,7 @@ import mockSalesTeams from '../../../mocks/mockSalesTeams' import { mockEmployees } from '../../../mocks/mockEmployees' import { Team, TeamMember, TeamRoleEnum } from '../../../types/common' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const SalesTeamEdit: React.FC = () => { const navigate = useNavigate() @@ -141,12 +142,12 @@ const SalesTeamEdit: React.FC = () => { console.log('Updating sales team:', updatedTeam) alert('Satış ekibi başarıyla güncellendi!') - navigate('/admin/crm/sales-teams') + navigate(ROUTES_ENUM.protected.crm.salesTeams) } const handleCancel = () => { if (confirm('Değişiklikler kaydedilmedi. Çıkmak istediğinizden emin misiniz?')) { - navigate('/admin/crm/sales-teams') + navigate(ROUTES_ENUM.protected.crm.salesTeams) } } @@ -170,7 +171,7 @@ const SalesTeamEdit: React.FC = () => { Aradığınız satış ekibi mevcut değil veya silinmiş olabilir.

@@ -448,7 +449,7 @@ const EmployeeList: React.FC = () => {

Yeni personel ekleyerek başlayın.

@@ -536,7 +537,7 @@ const EmployeeList: React.FC = () => { @@ -562,7 +563,7 @@ const EmployeeList: React.FC = () => {

Yeni personel ekleyerek başlayın.

diff --git a/ui/src/views/maintenance/components/WorkCenterForm.tsx b/ui/src/views/maintenance/components/WorkCenterForm.tsx index cdbeb89f..ddeca4b3 100644 --- a/ui/src/views/maintenance/components/WorkCenterForm.tsx +++ b/ui/src/views/maintenance/components/WorkCenterForm.tsx @@ -20,6 +20,7 @@ import { mockWorkCenters } from '../../../mocks/mockWorkCenters' import { mockDepartments } from '../../../mocks/mockDepartments' import { HrDepartment } from '../../../types/hr' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' interface ValidationErrors { [key: string]: string @@ -201,7 +202,7 @@ const WorkCenterForm: React.FC = () => { alert(isEdit ? 'İş Merkezi başarıyla güncellendi!' : 'İş Merkezi başarıyla oluşturuldu!') // Navigate back to list - navigate('/admin/maintenance') + navigate(ROUTES_ENUM.protected.maintenance.workcenters) } catch (error) { console.error('Error saving Workcenter:', error) alert('Bir hata oluştu. Lütfen tekrar deneyin.') @@ -211,7 +212,7 @@ const WorkCenterForm: React.FC = () => { } const handleCancel = () => { - navigate('/admin/maintenance') + navigate(ROUTES_ENUM.protected.maintenance.workcenters) } if (loading) { diff --git a/ui/src/views/maintenance/components/WorkCenterList.tsx b/ui/src/views/maintenance/components/WorkCenterList.tsx index 62f4e569..1ff71f20 100644 --- a/ui/src/views/maintenance/components/WorkCenterList.tsx +++ b/ui/src/views/maintenance/components/WorkCenterList.tsx @@ -28,6 +28,7 @@ import { getCriticalityLevelText, } from '../../../utils/erp' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const WorkCenterList: React.FC = () => { const [searchTerm, setSearchTerm] = useState('') @@ -119,7 +120,7 @@ const WorkCenterList: React.FC = () => { @@ -353,7 +354,10 @@ const WorkCenterList: React.FC = () => {
@@ -361,7 +365,7 @@ const WorkCenterList: React.FC = () => { @@ -390,7 +394,7 @@ const WorkCenterList: React.FC = () => {

Yeni iş merkezi ekleyerek başlayın.

diff --git a/ui/src/views/mrp/components/ProductionOrderForm.tsx b/ui/src/views/mrp/components/ProductionOrderForm.tsx index 25258659..06b742a6 100644 --- a/ui/src/views/mrp/components/ProductionOrderForm.tsx +++ b/ui/src/views/mrp/components/ProductionOrderForm.tsx @@ -25,6 +25,7 @@ import { import { mockMaterials } from '../../../mocks/mockMaterials' import { PriorityEnum } from '../../../types/common' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const ProductionOrderForm: React.FC = () => { const { id } = useParams() @@ -170,7 +171,7 @@ const ProductionOrderForm: React.FC = () => { console.log('Saving production order:', completeFormData) // Here you would normally call an API to save the data - navigate(`/admin/mrp/production-orders/${id || 'new'}`) + navigate(ROUTES_ENUM.protected.mrp.productionOrderDetail.replace(':id', id || 'new')) } // Format date for input fields @@ -199,7 +200,7 @@ const ProductionOrderForm: React.FC = () => {
@@ -407,7 +408,7 @@ const ProjectList: React.FC = () => {
@@ -415,7 +416,7 @@ const ProjectList: React.FC = () => { @@ -482,13 +483,13 @@ const ProjectList: React.FC = () => {
@@ -593,7 +594,7 @@ const ProjectList: React.FC = () => {

Yeni proje oluşturarak başlayın.

diff --git a/ui/src/views/project/components/ProjectView.tsx b/ui/src/views/project/components/ProjectView.tsx index 74f4b9a5..0d68aa15 100644 --- a/ui/src/views/project/components/ProjectView.tsx +++ b/ui/src/views/project/components/ProjectView.tsx @@ -35,6 +35,7 @@ import { getProjectTypeText, } from '../../../utils/erp' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const ProjectView: React.FC = () => { const { id } = useParams<{ id: string }>() @@ -53,7 +54,7 @@ const ProjectView: React.FC = () => {

Belirtilen ID ile proje mevcut değil.

@@ -88,7 +89,7 @@ const ProjectView: React.FC = () => {
@@ -347,7 +348,10 @@ const PurchaseRequisitionList: React.FC = () => {
@@ -356,7 +360,10 @@ const PurchaseRequisitionList: React.FC = () => { {requisition.status === RequisitionStatusEnum.Draft && ( @@ -382,7 +389,7 @@ const PurchaseRequisitionList: React.FC = () => {

diff --git a/ui/src/views/supplychain/components/QuotationForm.tsx b/ui/src/views/supplychain/components/QuotationForm.tsx index 2b88db3d..6f3dca54 100644 --- a/ui/src/views/supplychain/components/QuotationForm.tsx +++ b/ui/src/views/supplychain/components/QuotationForm.tsx @@ -21,6 +21,7 @@ import { import { mockMaterials } from '../../../mocks/mockMaterials' import { mockBusinessParties } from '../../../mocks/mockBusinessParties' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const QuotationForm: React.FC = () => { const { id } = useParams<{ id: string }>() @@ -130,11 +131,11 @@ const QuotationForm: React.FC = () => { e.preventDefault() // TODO: Implement save logic console.log('Saving quotation:', formData) - navigate('/admin/supplychain/quotations') + navigate(ROUTES_ENUM.protected.supplychain.quotations) } const handleCancel = () => { - navigate('/admin/supplychain/quotations') + navigate(ROUTES_ENUM.protected.supplychain.quotations) } const isReadOnly = isView diff --git a/ui/src/views/supplychain/components/QuotationManagement.tsx b/ui/src/views/supplychain/components/QuotationManagement.tsx index 14546a49..b54e2a68 100644 --- a/ui/src/views/supplychain/components/QuotationManagement.tsx +++ b/ui/src/views/supplychain/components/QuotationManagement.tsx @@ -26,6 +26,7 @@ import { getRequestTypeText, } from '../../../utils/erp' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const QuotationManagement: React.FC = () => { const navigate = useNavigate() @@ -60,7 +61,7 @@ const QuotationManagement: React.FC = () => { } const handleAddQuotation = () => { - navigate('/admin/supplychain/quotations/new') + navigate(ROUTES_ENUM.protected.supplychain.quotationsNew) } const handleBulkQuotation = () => { @@ -82,11 +83,11 @@ const QuotationManagement: React.FC = () => { } const handleEdit = (quotation: MmQuotation) => { - navigate(`/admin/supplychain/quotations/edit/${quotation.id}`) + navigate(ROUTES_ENUM.protected.supplychain.quotationsEdit.replace(':id', quotation.id)) } const handleView = (quotation: MmQuotation) => { - navigate(`/admin/supplychain/quotations/view/${quotation.id}`) + navigate(ROUTES_ENUM.protected.supplychain.quotationsView.replace(':id', quotation.id)) } const handleSelectQuotation = (quotationId: string) => { diff --git a/ui/src/views/supplychain/components/SupplierForm.tsx b/ui/src/views/supplychain/components/SupplierForm.tsx index 54508bb6..02394ba9 100644 --- a/ui/src/views/supplychain/components/SupplierForm.tsx +++ b/ui/src/views/supplychain/components/SupplierForm.tsx @@ -15,6 +15,7 @@ import LoadingSpinner from '../../../components/common/LoadingSpinner' import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties' import { BusinessParty } from '../../../types/common' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' interface ValidationErrors { [key: string]: string @@ -130,7 +131,7 @@ const SupplierForm: React.FC = () => { alert(isEdit ? 'Tedarikçi başarıyla güncellendi!' : 'Tedarikçi başarıyla oluşturuldu!') // Navigate back to list - navigate('/admin/supplychain') + navigate(ROUTES_ENUM.protected.supplychain.suppliers) } catch (error) { console.error('Error saving supplier:', error) alert('Bir hata oluştu. Lütfen tekrar deneyin.') @@ -140,7 +141,7 @@ const SupplierForm: React.FC = () => { } const handleCancel = () => { - navigate('/admin/supplychain') + navigate(ROUTES_ENUM.protected.supplychain.suppliers) } if (loading) { diff --git a/ui/src/views/supplychain/components/SupplierList.tsx b/ui/src/views/supplychain/components/SupplierList.tsx index f4b983ba..e8cab76c 100644 --- a/ui/src/views/supplychain/components/SupplierList.tsx +++ b/ui/src/views/supplychain/components/SupplierList.tsx @@ -24,6 +24,7 @@ import { mockBusinessParties } from '../../../mocks/mockBusinessParties' import { PartyType } from '../../../types/common' import { getSupplierTypeColor, getSupplierTypeText, getRatingColor } from '../../../utils/erp' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const SupplierList: React.FC = () => { const [searchTerm, setSearchTerm] = useState('') @@ -115,7 +116,7 @@ const SupplierList: React.FC = () => { @@ -367,7 +368,10 @@ const SupplierList: React.FC = () => {
@@ -375,7 +379,10 @@ const SupplierList: React.FC = () => { @@ -396,7 +403,7 @@ const SupplierList: React.FC = () => {

Yeni tedarikçi ekleyerek başlayın.

diff --git a/ui/src/views/warehouse/components/WarehouseForm.tsx b/ui/src/views/warehouse/components/WarehouseForm.tsx index cc6a8d5c..8cda20bd 100644 --- a/ui/src/views/warehouse/components/WarehouseForm.tsx +++ b/ui/src/views/warehouse/components/WarehouseForm.tsx @@ -6,6 +6,7 @@ import { WmWarehouse, WarehouseTypeEnum } from '../../../types/wm' import { SecurityLevelEnum } from '../../../types/mrp' import { mockWarehouses } from '../../../mocks/mockWarehouses' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' interface ValidationErrors { [key: string]: string @@ -139,7 +140,7 @@ const WarehouseForm: React.FC = () => { alert(isEdit ? 'Depo başarıyla güncellendi!' : 'Depo başarıyla oluşturuldu!') // Navigate back to list - navigate('/admin/warehouse') + navigate(ROUTES_ENUM.protected.warehouse.warehouses) } catch (error) { console.error('Error saving warehouse:', error) alert('Bir hata oluştu. Lütfen tekrar deneyin.') @@ -149,7 +150,7 @@ const WarehouseForm: React.FC = () => { } const handleCancel = () => { - navigate('/admin/warehouse') + navigate(ROUTES_ENUM.protected.warehouse.warehouses) } if (loading) { diff --git a/ui/src/views/warehouse/components/WarehouseList.tsx b/ui/src/views/warehouse/components/WarehouseList.tsx index 1b0b09c0..4676add5 100644 --- a/ui/src/views/warehouse/components/WarehouseList.tsx +++ b/ui/src/views/warehouse/components/WarehouseList.tsx @@ -20,6 +20,7 @@ import { WarehouseTypeEnum } from '../../../types/wm' import { mockWarehouses } from '../../../mocks/mockWarehouses' import { getWarehouseTypeColor, getWarehouseTypeText } from '../../../utils/erp' import { Container } from '@/components/shared' +import { ROUTES_ENUM } from '@/routes/route.constant' const WarehouseList: React.FC = () => { const [searchTerm, setSearchTerm] = useState('') @@ -115,7 +116,7 @@ const WarehouseList: React.FC = () => { @@ -364,7 +365,10 @@ const WarehouseList: React.FC = () => {
@@ -372,7 +376,10 @@ const WarehouseList: React.FC = () => { @@ -394,7 +401,7 @@ const WarehouseList: React.FC = () => {

Yeni depo ekleyerek başlayın.