Static Navigate Url kaldırıldı
This commit is contained in:
parent
48881eecad
commit
c6d2fbf30a
46 changed files with 3162 additions and 2937 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
1242
ui/src/types/hr.ts
1242
ui/src/types/hr.ts
File diff suppressed because it is too large
Load diff
1171
ui/src/types/mm.ts
1171
ui/src/types/mm.ts
File diff suppressed because it is too large
Load diff
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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İ
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to="/admin/crm/customers/new"
|
||||
to={ROUTES_ENUM.protected.crm.customersNew}
|
||||
className="flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={14} className="mr-2" />
|
||||
|
|
@ -419,14 +420,14 @@ const CustomerCards: React.FC = () => {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="flex space-x-2">
|
||||
<Link
|
||||
to={`/admin/crm/customers/${customer.id}`}
|
||||
to={ROUTES_ENUM.protected.crm.customersDetail.replace(':id', customer.id)}
|
||||
className="p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all duration-200 hover:scale-105"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
<FaEye className="w-4 h-4" />
|
||||
</Link>
|
||||
<Link
|
||||
to={`/admin/crm/customers/edit/${customer.id}`}
|
||||
to={ROUTES_ENUM.protected.crm.customersEdit.replace(':id', customer.id)}
|
||||
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-all duration-200 hover:scale-105"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -463,7 +464,7 @@ const CustomerCards: React.FC = () => {
|
|||
Yeni müşteri ekleyerek başlayın veya arama kriterlerinizi değiştirin.
|
||||
</p>
|
||||
<Link
|
||||
to="/admin/crm/customers/new"
|
||||
to={ROUTES_ENUM.protected.crm.customersNew}
|
||||
className="inline-flex items-center px-4 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
</div>
|
||||
<div className="mt-4">
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/customers')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.customers)}
|
||||
className="inline-flex items-center px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="w-4 h-4 mr-2" />
|
||||
|
|
@ -173,11 +174,14 @@ const CustomerEdit: React.FC = () => {
|
|||
<div className="mx-auto px-4 py-3">
|
||||
{/* Breadcrumb */}
|
||||
<div className="flex items-center space-x-2 text-xs text-gray-500 mb-3">
|
||||
<Link to="/admin/crm/customers" className="hover:text-blue-600">
|
||||
<Link to={ROUTES_ENUM.protected.crm.customers} className="hover:text-blue-600">
|
||||
Müşteriler
|
||||
</Link>
|
||||
<span>/</span>
|
||||
<Link to={`/admin/crm/customers/${id}`} className="hover:text-blue-600">
|
||||
<Link
|
||||
to={ROUTES_ENUM.protected.crm.customersDetail.replace(':id', id || 'new')}
|
||||
className="hover:text-blue-600"
|
||||
>
|
||||
{customer.name}
|
||||
</Link>
|
||||
<span>/</span>
|
||||
|
|
@ -196,7 +200,7 @@ const CustomerEdit: React.FC = () => {
|
|||
</button>
|
||||
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className="w-12 h-12 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center text-white shadow-lg">
|
||||
<div className="w-12 h-12 bg-gradient-to-br from-blue-500 to-blue-600 rounded-lg flex items-center justify-center text-white shadow-lg">
|
||||
<FaBuilding className="w-8 h-8" />
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to="/admin/crm/customers/new"
|
||||
to={ROUTES_ENUM.protected.crm.customersNew}
|
||||
className="flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={14} className="mr-2" />
|
||||
|
|
@ -367,7 +368,7 @@ const CustomerList: React.FC = () => {
|
|||
<td className="px-4 py-3 text-right">
|
||||
<div className="flex items-center justify-end space-x-2">
|
||||
<Link
|
||||
to={`/admin/crm/customers/${customer.id}`}
|
||||
to={ROUTES_ENUM.protected.crm.customersDetail.replace(':id', customer.id)}
|
||||
className="p-2 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
|
|
@ -375,7 +376,7 @@ const CustomerList: React.FC = () => {
|
|||
</Link>
|
||||
|
||||
<Link
|
||||
to={`/admin/crm/customers/edit/${customer.id}`}
|
||||
to={ROUTES_ENUM.protected.crm.customersEdit.replace(':id', customer.id)}
|
||||
className="p-2 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -396,7 +397,7 @@ const CustomerList: React.FC = () => {
|
|||
<p className="mt-1 text-xs text-gray-500">Yeni müşteri ekleyerek başlayın.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/crm/customers/new"
|
||||
to={ROUTES_ENUM.protected.crm.customersNew}
|
||||
className="inline-flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
</div>
|
||||
<div className="mt-4">
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/customers')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.customers)}
|
||||
className="inline-flex items-center px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="w-4 h-4 mr-2" />
|
||||
|
|
@ -133,7 +134,7 @@ const CustomerView: React.FC = () => {
|
|||
<div className="mx-auto px-4 py-3">
|
||||
{/* Breadcrumb */}
|
||||
<div className="flex items-center space-x-2 text-xs text-gray-500 mb-3">
|
||||
<Link to="/admin/crm/customers" className="hover:text-blue-600">
|
||||
<Link to={ROUTES_ENUM.protected.crm.customers} className="hover:text-blue-600">
|
||||
Müşteriler
|
||||
</Link>
|
||||
<span>/</span>
|
||||
|
|
@ -144,7 +145,7 @@ const CustomerView: React.FC = () => {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center space-x-4">
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/customers')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.customers)}
|
||||
className="p-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="w-5 h-5" />
|
||||
|
|
@ -192,7 +193,7 @@ const CustomerView: React.FC = () => {
|
|||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Link
|
||||
to={`/admin/crm/customers/edit/${customer.id}`}
|
||||
to={ROUTES_ENUM.protected.crm.customersEdit.replace(':id', customer.id)}
|
||||
className="inline-flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaEdit className="w-4 h-4 mr-2" />
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import { mockMaterials } from '../../../mocks/mockMaterials'
|
|||
import { mockSalesOrders } from '../../../mocks/mockSalesOrders'
|
||||
import { BusinessParty, PaymentTerms } from '../../../types/common'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const SalesOrderForm: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -235,7 +236,7 @@ const SalesOrderForm: React.FC = () => {
|
|||
console.log('Saving sales order:', formData)
|
||||
|
||||
// Navigate back to sales orders list
|
||||
navigate('/admin/crm/sales-orders')
|
||||
navigate(ROUTES_ENUM.protected.crm.salesOrders)
|
||||
} catch (error) {
|
||||
console.error('Error saving sales order:', error)
|
||||
alert('Sipariş kaydedilirken bir hata oluştu!')
|
||||
|
|
@ -258,7 +259,7 @@ const SalesOrderForm: React.FC = () => {
|
|||
<div className="flex gap-2">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => navigate('/admin/crm/sales-orders')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesOrders)}
|
||||
className="flex items-center gap-2 px-3 py-1.5 text-sm border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50 transition-colors"
|
||||
>
|
||||
<FaTimes className="w-4 h-4" />
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import {
|
|||
getSaleOrderStatusText,
|
||||
} from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const SalesOrderView: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -62,7 +63,7 @@ const SalesOrderView: React.FC = () => {
|
|||
<h2 className="text-xl font-semibold text-gray-900 mb-2">Sipariş Bulunamadı</h2>
|
||||
<p className="text-gray-600 mb-4">Belirtilen sipariş mevcut değil.</p>
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/sales-orders')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesOrders)}
|
||||
className="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
Sipariş Listesine Dön
|
||||
|
|
@ -79,7 +80,7 @@ const SalesOrderView: React.FC = () => {
|
|||
<div className="flex items-center justify-between mb-4">
|
||||
<div className="flex items-center space-x-4">
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/sales-orders')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesOrders)}
|
||||
className="flex items-center text-gray-600 hover:text-gray-800 transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="mr-2" />
|
||||
|
|
@ -104,7 +105,9 @@ const SalesOrderView: React.FC = () => {
|
|||
{getSaleOrderStatusText(order.status)}
|
||||
</span>
|
||||
<button
|
||||
onClick={() => navigate(`/admin/crm/sales-orders/edit/${order.id}`)}
|
||||
onClick={() =>
|
||||
navigate(ROUTES_ENUM.protected.crm.salesOrdersEdit.replace(':id', order.id))
|
||||
}
|
||||
className="bg-blue-600 text-white px-3 py-1.5 text-sm rounded-lg hover:bg-blue-700 transition-colors flex items-center"
|
||||
>
|
||||
<FaEdit className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import { BusinessParty } from '../../../types/common'
|
|||
import Widget from '../../../components/common/Widget'
|
||||
import { getSaleOrderStatusColor, getSaleOrderStatusText } from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const SalesOrders: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -28,11 +29,11 @@ const SalesOrders: React.FC = () => {
|
|||
const [selectedCustomer, setSelectedCustomer] = useState<string>('all')
|
||||
|
||||
const handleAdd = () => {
|
||||
navigate('/admin/crm/sales-orders/new')
|
||||
navigate(ROUTES_ENUM.protected.crm.salesOrdersNew)
|
||||
}
|
||||
|
||||
const handleEdit = (order: CrmSalesOrder) => {
|
||||
navigate(`/admin/crm/sales-orders/edit/${order.id}`)
|
||||
navigate(ROUTES_ENUM.protected.crm.salesOrdersEdit.replace(':id', order.id))
|
||||
}
|
||||
|
||||
const handleDelete = (id: string) => {
|
||||
|
|
@ -41,7 +42,7 @@ const SalesOrders: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleViewDetails = (order: CrmSalesOrder) => {
|
||||
navigate(`/admin/crm/sales-orders/${order.id}`)
|
||||
navigate(ROUTES_ENUM.protected.crm.salesOrdersDetail.replace(':id', order.id))
|
||||
}
|
||||
|
||||
const filteredOrders = salesOrders.filter((order) => {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { CrmTerritory } from '../../../types/crm'
|
|||
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 SalesTeamCreate: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -122,12 +123,12 @@ const SalesTeamCreate: React.FC = () => {
|
|||
|
||||
console.log('Creating new sales team:', newTeam)
|
||||
alert('Satış ekibi başarıyla oluşturuldu!')
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -138,16 +139,14 @@ const SalesTeamCreate: React.FC = () => {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-4">
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/sales-teams')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesTeams)}
|
||||
className="p-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="w-5 h-5" />
|
||||
</button>
|
||||
<div>
|
||||
<h2 className="text-2xl font-bold text-gray-900">Yeni Satış Ekibi</h2>
|
||||
<p className="text-gray-600">
|
||||
Yeni satış ekibi oluşturun ve ekip üyelerini atayın
|
||||
</p>
|
||||
<p className="text-gray-600">Yeni satış ekibi oluşturun ve ekip üyelerini atayın</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
</p>
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/sales-teams')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesTeams)}
|
||||
className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
Geri Dön
|
||||
|
|
@ -186,7 +187,7 @@ const SalesTeamEdit: React.FC = () => {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-4">
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/sales-teams')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesTeams)}
|
||||
className="p-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="w-5 h-5" />
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import dayjs from 'dayjs'
|
|||
import { Team, TeamRoleEnum } from '../../../types/common'
|
||||
import { getTeamRoleText } from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const SalesTeamView: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -38,14 +39,14 @@ const SalesTeamView: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleEdit = () => {
|
||||
navigate(`/admin/crm/sales-teams/edit/${id}`)
|
||||
navigate(ROUTES_ENUM.protected.crm.salesTeamsEdit.replace(':id', id!))
|
||||
}
|
||||
|
||||
const handleDelete = () => {
|
||||
if (confirm(`${team?.name} ekibini silmek istediğinizden emin misiniz?`)) {
|
||||
console.log('Delete sales team:', id)
|
||||
alert('Ekip silindi (mock)')
|
||||
navigate('/admin/crm/sales-teams')
|
||||
navigate(ROUTES_ENUM.protected.crm.salesTeams)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ const SalesTeamView: React.FC = () => {
|
|||
Aradığınız satış ekibi mevcut değil veya silinmiş olabilir.
|
||||
</p>
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/sales-teams')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesTeams)}
|
||||
className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
Geri Dön
|
||||
|
|
@ -77,7 +78,7 @@ const SalesTeamView: React.FC = () => {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-4">
|
||||
<button
|
||||
onClick={() => navigate('/admin/crm/sales-teams')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.crm.salesTeams)}
|
||||
className="p-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="w-5 h-5" />
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import mockSalesTeams from '../../../mocks/mockSalesTeams'
|
|||
import Widget from '../../../components/common/Widget'
|
||||
import { Team } from '../../../types/common'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const SalesTeams: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -28,11 +29,11 @@ const SalesTeams: React.FC = () => {
|
|||
const [filterStatus, setFilterStatus] = useState<'all' | 'active' | 'inactive'>('all')
|
||||
|
||||
const handleAdd = () => {
|
||||
navigate('/admin/crm/sales-teams/new')
|
||||
navigate(ROUTES_ENUM.protected.crm.salesTeamsNew)
|
||||
}
|
||||
|
||||
const handleEdit = (team: Team) => {
|
||||
navigate(`/admin/crm/sales-teams/edit/${team.id}`)
|
||||
navigate(ROUTES_ENUM.protected.crm.salesTeamsEdit.replace(':id', team.id))
|
||||
}
|
||||
|
||||
const handleDelete = (id: string) => {
|
||||
|
|
@ -45,7 +46,7 @@ const SalesTeams: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleViewDetails = (team: Team) => {
|
||||
navigate(`/admin/crm/sales-teams/${team.id}`)
|
||||
navigate(ROUTES_ENUM.protected.crm.salesTeamsDetail.replace(':id', team.id))
|
||||
}
|
||||
|
||||
// Calculate team performance based on targets
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import {
|
|||
} from '../../../types/hr'
|
||||
import { mockEmployees } from '../../../mocks/mockEmployees'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
interface ValidationErrors {
|
||||
[key: string]: string
|
||||
|
|
@ -213,7 +214,7 @@ const EmployeeForm: React.FC = () => {
|
|||
alert(isEdit ? 'Personel başarıyla güncellendi!' : 'Personel başarıyla oluşturuldu!')
|
||||
|
||||
// Navigate back to list
|
||||
navigate('/admin/hr')
|
||||
navigate(ROUTES_ENUM.protected.hr.employees)
|
||||
} catch (error) {
|
||||
console.error('Error saving employee:', error)
|
||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||
|
|
@ -223,7 +224,7 @@ const EmployeeForm: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleCancel = () => {
|
||||
navigate('/admin/hr')
|
||||
navigate(ROUTES_ENUM.protected.hr.employees)
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ import {
|
|||
getEmployeeStatusText,
|
||||
} from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const EmployeeList: React.FC = () => {
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
|
|
@ -80,7 +81,7 @@ const EmployeeList: React.FC = () => {
|
|||
const handleEditFromView = (employee: HrEmployee) => {
|
||||
setIsViewModalOpen(false)
|
||||
// Navigate to edit page - you can replace this with a modal if preferred
|
||||
window.location.href = `/admin/hr/employees/edit/${employee.id}`
|
||||
window.location.href = ROUTES_ENUM.protected.hr.employeesEdit.replace('::id', employee.id)
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
|
|
@ -182,7 +183,7 @@ const EmployeeList: React.FC = () => {
|
|||
|
||||
{/* Add New Employee */}
|
||||
<Link
|
||||
to="/admin/hr/employees/new"
|
||||
to={ROUTES_ENUM.protected.hr.employeesNew}
|
||||
className="flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
@ -417,7 +418,7 @@ const EmployeeList: React.FC = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to={`/admin/hr/employees/edit/${employee.id}`}
|
||||
to={ROUTES_ENUM.protected.hr.employeesEdit.replace('::id', employee.id)}
|
||||
className="p-1 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -448,7 +449,7 @@ const EmployeeList: React.FC = () => {
|
|||
<p className="mt-1 text-xs text-gray-500">Yeni personel ekleyerek başlayın.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/hr/employees/new"
|
||||
to={ROUTES_ENUM.protected.hr.employeesNew}
|
||||
className="inline-flex items-center px-3 py-1 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
@ -536,7 +537,7 @@ const EmployeeList: React.FC = () => {
|
|||
<FaEye className="w-4 h-4" />
|
||||
</button>
|
||||
<Link
|
||||
to={`/admin/hr/employees/edit/${employee.id}`}
|
||||
to={ROUTES_ENUM.protected.hr.employeesEdit.replace('::id', employee.id)}
|
||||
className="p-1 text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -562,7 +563,7 @@ const EmployeeList: React.FC = () => {
|
|||
<p className="mt-1 text-xs text-gray-500">Yeni personel ekleyerek başlayın.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/hr/employees/new"
|
||||
to={ROUTES_ENUM.protected.hr.employeesNew}
|
||||
className="inline-flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to="/admin/maintenance/equipment/new"
|
||||
to={ROUTES_ENUM.protected.maintenance.equipmentNew}
|
||||
className="flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
@ -353,7 +354,10 @@ const WorkCenterList: React.FC = () => {
|
|||
<td className="px-4 py-3 text-right">
|
||||
<div className="flex items-center justify-end space-x-1">
|
||||
<Link
|
||||
to={`/admin/maintenance/equipment/${eq.id}`}
|
||||
to={ROUTES_ENUM.protected.maintenance.equipmentDetail.replace(
|
||||
':id',
|
||||
eq.id,
|
||||
)}
|
||||
className="p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
|
|
@ -361,7 +365,7 @@ const WorkCenterList: React.FC = () => {
|
|||
</Link>
|
||||
|
||||
<Link
|
||||
to={`/admin/maintenance/equipment/edit/${eq.id}`}
|
||||
to={ROUTES_ENUM.protected.maintenance.equipmentEdit.replace(':id', eq.id)}
|
||||
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -390,7 +394,7 @@ const WorkCenterList: React.FC = () => {
|
|||
<p className="mt-1 text-sm text-gray-500">Yeni iş merkezi ekleyerek başlayın.</p>
|
||||
<div className="mt-4">
|
||||
<Link
|
||||
to="/admin/maintenance/equipment/new"
|
||||
to={ROUTES_ENUM.protected.maintenance.equipmentNew}
|
||||
className="inline-flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center space-x-3">
|
||||
<button
|
||||
onClick={() => navigate('/admin/mrp/production-orders')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.mrp.productionOrders)}
|
||||
className="inline-flex items-center px-3 py-2 bg-white text-gray-700 font-medium rounded-lg hover:bg-gray-50 transition-all duration-200 shadow-sm border border-gray-200"
|
||||
>
|
||||
<FaArrowLeft className="mr-2 text-sm" />
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import {
|
|||
} from '../../../utils/erp'
|
||||
import { WorkOrderStatusEnum } from '../../../types/pm'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const ProductionOrderList: React.FC = () => {
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
|
|
@ -212,9 +213,7 @@ const ProductionOrderList: React.FC = () => {
|
|||
return (
|
||||
<div className="space-y-2">
|
||||
<h3 className="text-lg font-semibold text-gray-900">Açık Satış Siparişleri (Step 1)</h3>
|
||||
<p className="text-gray-600">
|
||||
Üretim emri oluşturmak için malzeme satırlarını seçin.
|
||||
</p>
|
||||
<p className="text-gray-600">Üretim emri oluşturmak için malzeme satırlarını seçin.</p>
|
||||
|
||||
<div className="max-h-80 overflow-y-auto space-y-2">
|
||||
{openSalesOrders.map((order) => (
|
||||
|
|
@ -955,7 +954,10 @@ const ProductionOrderList: React.FC = () => {
|
|||
<td className="px-4 py-3 text-right">
|
||||
<div className="flex items-center justify-end space-x-2">
|
||||
<Link
|
||||
to={`/admin/mrp/production-orders/${order.id}`}
|
||||
to={ROUTES_ENUM.protected.mrp.productionOrderDetail.replace(
|
||||
':id',
|
||||
order.id,
|
||||
)}
|
||||
className="p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
|
|
@ -963,7 +965,7 @@ const ProductionOrderList: React.FC = () => {
|
|||
</Link>
|
||||
|
||||
<Link
|
||||
to={`/admin/mrp/production-orders/${order.id}/edit`}
|
||||
to={`${ROUTES_ENUM.protected.mrp.productionOrderEdit.replace(':id', order.id)}/edit`}
|
||||
className="p-2 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -994,7 +996,7 @@ const ProductionOrderList: React.FC = () => {
|
|||
<p className="mt-1 text-sm text-gray-500">Yeni üretim emri oluşturarak başlayın.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/mrp/production-orders/new"
|
||||
to={ROUTES_ENUM.protected.mrp.productionOrderNew}
|
||||
className="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import {
|
|||
import StatusBadge from '../../../components/common/StatusBadge'
|
||||
import { getPriorityColor } from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const ProductionOrderView: React.FC = () => {
|
||||
const { id } = useParams()
|
||||
|
|
@ -57,7 +58,7 @@ const ProductionOrderView: React.FC = () => {
|
|||
İstenen üretim emri mevcut değil veya silinmiş olabilir.
|
||||
</p>
|
||||
<button
|
||||
onClick={() => navigate('/admin/mrp/production-orders')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.mrp.productionOrders)}
|
||||
className="inline-flex items-center px-6 py-3 bg-gradient-to-r from-blue-600 to-blue-700 text-white font-medium rounded-lg hover:from-blue-700 hover:to-blue-800 transition-all duration-200 shadow-lg hover:shadow-xl"
|
||||
>
|
||||
<FaArrowLeft className="mr-2" />
|
||||
|
|
@ -81,7 +82,7 @@ const ProductionOrderView: React.FC = () => {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center space-x-3">
|
||||
<button
|
||||
onClick={() => navigate('/admin/mrp/production-orders')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.mrp.productionOrders)}
|
||||
className="inline-flex items-center px-3 py-2 bg-white text-gray-700 font-medium rounded-lg hover:bg-gray-50 transition-all duration-200 shadow-sm border border-gray-200"
|
||||
>
|
||||
<FaArrowLeft className="mr-2 text-sm" />
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ import {
|
|||
getProjectTypeText,
|
||||
} from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
// Custom styles for the slider
|
||||
const sliderStyles = `
|
||||
|
|
@ -299,7 +300,7 @@ const ProjectForm: React.FC = () => {
|
|||
|
||||
alert(isEdit ? 'Proje başarıyla güncellendi!' : 'Proje başarıyla oluşturuldu!')
|
||||
|
||||
navigate('/admin/projects')
|
||||
navigate(ROUTES_ENUM.protected.projects.list)
|
||||
} catch (error) {
|
||||
console.error('Error saving project:', error)
|
||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||
|
|
@ -309,7 +310,7 @@ const ProjectForm: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleCancel = () => {
|
||||
navigate('/admin/projects')
|
||||
navigate(ROUTES_ENUM.protected.projects.list)
|
||||
}
|
||||
|
||||
// Phase modal handlers
|
||||
|
|
@ -619,7 +620,7 @@ const ProjectForm: React.FC = () => {
|
|||
<div className="flex items-center justify-between h-12">
|
||||
<div className="flex items-center">
|
||||
<Link
|
||||
to="/admin/projects"
|
||||
to={ROUTES_ENUM.protected.projects.list}
|
||||
className="flex items-center px-2.5 py-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors mr-2"
|
||||
>
|
||||
<FaArrowLeft className="w-4 h-4 mr-2" />
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import {
|
|||
getProgressColor,
|
||||
} from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const ProjectList: React.FC = () => {
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
|
|
@ -147,7 +148,7 @@ const ProjectList: React.FC = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to="/admin/projects/new"
|
||||
to={ROUTES_ENUM.protected.projects.new}
|
||||
className="flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
@ -407,7 +408,7 @@ const ProjectList: React.FC = () => {
|
|||
<td className="px-3 py-2 text-right">
|
||||
<div className="flex items-center justify-end space-x-1">
|
||||
<Link
|
||||
to={`/admin/projects/${project.id}`}
|
||||
to={ROUTES_ENUM.protected.projects.detail.replace(':id', project.id)}
|
||||
className="p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
|
|
@ -415,7 +416,7 @@ const ProjectList: React.FC = () => {
|
|||
</Link>
|
||||
|
||||
<Link
|
||||
to={`/admin/projects/edit/${project.id}`}
|
||||
to={ROUTES_ENUM.protected.projects.edit.replace(':id', project.id)}
|
||||
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -482,13 +483,13 @@ const ProjectList: React.FC = () => {
|
|||
</div>
|
||||
<div className="flex space-x-1">
|
||||
<Link
|
||||
to={`/admin/projects/${project.id}`}
|
||||
to={ROUTES_ENUM.protected.projects.detail.replace(':id', project.id)}
|
||||
className="p-1.5 text-gray-400 hover:text-blue-600 hover:bg-blue-50 rounded-md transition-colors"
|
||||
>
|
||||
<FaEye className="w-4 h-4" />
|
||||
</Link>
|
||||
<Link
|
||||
to={`/admin/projects/edit/${project.id}`}
|
||||
to={ROUTES_ENUM.protected.projects.edit.replace(':id', project.id)}
|
||||
className="p-1.5 text-gray-400 hover:text-yellow-600 hover:bg-yellow-50 rounded-md transition-colors"
|
||||
>
|
||||
<FaEdit className="w-4 h-4" />
|
||||
|
|
@ -593,7 +594,7 @@ const ProjectList: React.FC = () => {
|
|||
<p className="mt-1 text-sm text-gray-500">Yeni proje oluşturarak başlayın.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/projects/new"
|
||||
to={ROUTES_ENUM.protected.projects.new}
|
||||
className="inline-flex items-center px-3 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
<p className="mt-1 text-sm text-gray-500">Belirtilen ID ile proje mevcut değil.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/projects"
|
||||
to={ROUTES_ENUM.protected.projects.list}
|
||||
className="inline-flex items-center px-3 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors text-sm"
|
||||
>
|
||||
<FaArrowLeft className="mr-2 h-4 w-4" />
|
||||
|
|
@ -88,7 +89,7 @@ const ProjectView: React.FC = () => {
|
|||
<div className="flex items-center justify-between h-12">
|
||||
<div className="flex items-center space-x-2">
|
||||
<button
|
||||
onClick={() => navigate('/admin/projects')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.projects.list)}
|
||||
className="flex items-center px-2 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
<FaArrowLeft className="w-4 h-4 mr-2" />
|
||||
|
|
@ -115,7 +116,7 @@ const ProjectView: React.FC = () => {
|
|||
<span className="ml-2">{getProjectStatusText(project.status)}</span>
|
||||
</span>
|
||||
<Link
|
||||
to={`/admin/projects/edit/${project.id}`}
|
||||
to={ROUTES_ENUM.protected.projects.edit.replace(':id', project.id)}
|
||||
className="inline-flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaEdit className="w-4 h-4 mr-2" />
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import { mockMaterials } from '../../../mocks/mockMaterials'
|
|||
import classNames from 'classnames'
|
||||
import { InfoItem, InfoSection } from '../../../components/common/InfoSection'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const MaterialCard: React.FC = () => {
|
||||
const { id } = useParams()
|
||||
|
|
@ -72,14 +73,22 @@ const MaterialCard: React.FC = () => {
|
|||
</div>
|
||||
<div className="flex items-center space-x-1.5">
|
||||
<button
|
||||
onClick={() => navigate(`/admin/supplychain/materials/edit/${material.id}`)}
|
||||
onClick={() =>
|
||||
navigate(
|
||||
ROUTES_ENUM.protected.supplychain.materialsEdit.replace(':id', material.id),
|
||||
)
|
||||
}
|
||||
className="px-3 py-2 text-sm border border-gray-300 bg-white text-gray-700 rounded-md hover:bg-gray-50 transition-colors flex items-center"
|
||||
>
|
||||
<FaEdit size={14} className="mr-1.5 inline" />
|
||||
Düzenle
|
||||
</button>
|
||||
<button
|
||||
onClick={() => navigate(`/admin/warehouse/movements/${material.id}`)}
|
||||
onClick={() =>
|
||||
navigate(
|
||||
ROUTES_ENUM.protected.warehouse.movementDetail.replace(':id', material.id),
|
||||
)
|
||||
}
|
||||
className="px-3 py-2 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center"
|
||||
>
|
||||
<FaEye size={14} className="mr-1.5 inline" />
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import { mockWarehouses } from '../../../mocks/mockWarehouses'
|
|||
import { mockZones } from '../../../mocks/mockZones'
|
||||
import { mockLocations } from '../../../mocks/mockLocations'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const validationSchema = Yup.object({
|
||||
materialCode: Yup.string()
|
||||
|
|
@ -189,7 +190,7 @@ const MaterialForm: React.FC = () => {
|
|||
console.log('Saving material:', finalData)
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000))
|
||||
|
||||
navigate('/admin/supplychain/materials')
|
||||
navigate(ROUTES_ENUM.protected.supplychain.materials)
|
||||
} catch (error) {
|
||||
console.error('Error saving material:', error)
|
||||
}
|
||||
|
|
@ -339,7 +340,7 @@ const MaterialForm: React.FC = () => {
|
|||
<div className="flex items-center space-x-1.5">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => navigate('/admin/supplychain/materials')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.supplychain.materials)}
|
||||
className="px-2.5 py-1 text-sm border border-gray-300 bg-white text-gray-700 rounded-md hover:bg-gray-50 transition-colors flex items-center"
|
||||
>
|
||||
<FaTimes size={14} className="mr-1.5 inline" />
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import StatusBadge from '../../../components/common/StatusBadge'
|
|||
import { MmMaterial } from '../../../types/mm'
|
||||
import { mockMaterials } from '../../../mocks/mockMaterials'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
export interface MaterialSearchFilters {
|
||||
materialCode?: string
|
||||
|
|
@ -162,11 +163,11 @@ const MaterialList: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleView = (material: MmMaterial) => {
|
||||
navigate(`/admin/supplychain/materials/detail/${material.id}`)
|
||||
navigate(ROUTES_ENUM.protected.supplychain.materialsDetail.replace(':id', material.id))
|
||||
}
|
||||
|
||||
const handleEdit = (material: MmMaterial) => {
|
||||
navigate(`/admin/supplychain/materials/edit/${material.id}`)
|
||||
navigate(ROUTES_ENUM.protected.supplychain.materialsEdit.replace(':id', material.id))
|
||||
}
|
||||
|
||||
const handleDelete = async (material: MmMaterial) => {
|
||||
|
|
@ -374,7 +375,7 @@ const MaterialList: React.FC = () => {
|
|||
</button>
|
||||
|
||||
<button
|
||||
onClick={() => navigate('/admin/supplychain/materials/new')}
|
||||
onClick={() => navigate(ROUTES_ENUM.protected.supplychain.materialsNew)}
|
||||
className="flex items-center px-2.5 py-1 text-sm bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={14} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import {
|
|||
getRequestTypeText,
|
||||
} from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const OrderManagement: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -75,15 +76,15 @@ const OrderManagement: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleAddOrder = () => {
|
||||
navigate('/admin/supplychain/orders/new')
|
||||
navigate(ROUTES_ENUM.protected.supplychain.ordersNew)
|
||||
}
|
||||
|
||||
const handleEdit = (order: MmPurchaseOrder) => {
|
||||
navigate(`/admin/supplychain/orders/edit/${order.id}`)
|
||||
navigate(ROUTES_ENUM.protected.supplychain.ordersEdit.replace(':id', order.id))
|
||||
}
|
||||
|
||||
const handleView = (order: MmPurchaseOrder) => {
|
||||
navigate(`/admin/supplychain/orders/view/${order.id}`)
|
||||
navigate(ROUTES_ENUM.protected.supplychain.ordersView.replace(':id', order.id))
|
||||
}
|
||||
|
||||
const handleSelectOrder = (orderId: string) => {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import { mockBusinessParties } from '../../../mocks/mockBusinessParties'
|
|||
import { mockPurchaseOrders } from '../../../mocks/mockPurchaseOrders'
|
||||
import { Address, PaymentTerms } from '../../../types/common'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const OrderManagementForm: React.FC = () => {
|
||||
const { id } = useParams<{ id: string }>()
|
||||
|
|
@ -170,11 +171,11 @@ const OrderManagementForm: React.FC = () => {
|
|||
e.preventDefault()
|
||||
// TODO: Implement save logic
|
||||
console.log('Saving purchase order:', formData)
|
||||
navigate('/admin/supplychain/orders')
|
||||
navigate(ROUTES_ENUM.protected.supplychain.orders)
|
||||
}
|
||||
|
||||
const handleCancel = () => {
|
||||
navigate('/admin/supplychain/orders')
|
||||
navigate(ROUTES_ENUM.protected.supplychain.orders)
|
||||
}
|
||||
|
||||
const isReadOnly = isView
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { mockMaterials } from '../../../mocks/mockMaterials'
|
|||
import { mockPurchaseRequests } from '../../../mocks/mockPurchaseRequests'
|
||||
import { PriorityEnum } from '../../../types/common'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const PurchaseRequestForm: React.FC = () => {
|
||||
const { id } = useParams<{ id: string }>()
|
||||
|
|
@ -113,11 +114,11 @@ const PurchaseRequestForm: React.FC = () => {
|
|||
e.preventDefault()
|
||||
// TODO: Implement save logic
|
||||
console.log('Saving purchase request:', formData)
|
||||
navigate('/admin/supplychain/requests')
|
||||
navigate(ROUTES_ENUM.protected.supplychain.requests)
|
||||
}
|
||||
|
||||
const handleCancel = () => {
|
||||
navigate('/admin/supplychain/requests')
|
||||
navigate(ROUTES_ENUM.protected.supplychain.requests)
|
||||
}
|
||||
|
||||
const isReadOnly = isView
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import {
|
|||
getRequestStatusText,
|
||||
} from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const PurchaseRequests: React.FC = () => {
|
||||
const navigate = useNavigate()
|
||||
|
|
@ -49,15 +50,15 @@ const PurchaseRequests: React.FC = () => {
|
|||
}
|
||||
|
||||
const handleEdit = (request: MmPurchaseRequest) => {
|
||||
navigate(`/admin/supplychain/requests/edit/${request.id}`)
|
||||
navigate(ROUTES_ENUM.protected.supplychain.requestsEdit.replace(':id', request.id))
|
||||
}
|
||||
|
||||
const handleAddNew = () => {
|
||||
navigate('/admin/supplychain/requests/new')
|
||||
navigate(ROUTES_ENUM.protected.supplychain.requestsNew)
|
||||
}
|
||||
|
||||
const handleViewDetails = (request: MmPurchaseRequest) => {
|
||||
navigate(`/admin/supplychain/requests/view/${request.id}`)
|
||||
navigate(ROUTES_ENUM.protected.supplychain.requestsView.replace(':id', request.id))
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import {
|
|||
getRequisitionStatusText,
|
||||
} from '../../../utils/erp'
|
||||
import { Container } from '@/components/shared'
|
||||
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||
|
||||
const PurchaseRequisitionList: React.FC = () => {
|
||||
const [searchTerm, setSearchTerm] = useState('')
|
||||
|
|
@ -119,7 +120,7 @@ const PurchaseRequisitionList: React.FC = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to="/admin/supplychain/requisitions/new"
|
||||
to={ROUTES_ENUM.protected.supplychain.requisitionsNew}
|
||||
className="flex items-center px-3 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
@ -347,7 +348,10 @@ const PurchaseRequisitionList: React.FC = () => {
|
|||
<td className="px-4 py-3 text-right">
|
||||
<div className="flex items-center justify-end space-x-2">
|
||||
<Link
|
||||
to={`/admin/supplychain/requisitions/${requisition.id}`}
|
||||
to={ROUTES_ENUM.protected.supplychain.requisitionsDetail.replace(
|
||||
':id',
|
||||
requisition.id,
|
||||
)}
|
||||
className="p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
|
|
@ -356,7 +360,10 @@ const PurchaseRequisitionList: React.FC = () => {
|
|||
|
||||
{requisition.status === RequisitionStatusEnum.Draft && (
|
||||
<Link
|
||||
to={`/admin/supplychain/requisitions/edit/${requisition.id}`}
|
||||
to={ROUTES_ENUM.protected.supplychain.requisitionsEdit.replace(
|
||||
':id',
|
||||
requisition.id,
|
||||
)}
|
||||
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -382,7 +389,7 @@ const PurchaseRequisitionList: React.FC = () => {
|
|||
</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/supplychain/requisitions/new"
|
||||
to={ROUTES_ENUM.protected.supplychain.requisitionsNew}
|
||||
className="inline-flex items-center px-3 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to="/admin/supplychain/suppliers/new"
|
||||
to={ROUTES_ENUM.protected.supplychain.suppliersNew}
|
||||
className="flex items-center px-3 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
@ -367,7 +368,10 @@ const SupplierList: React.FC = () => {
|
|||
<td className="px-4 py-3 text-right">
|
||||
<div className="flex items-center justify-end space-x-2">
|
||||
<Link
|
||||
to={`/admin/supplychain/suppliers/${supplier.id}`}
|
||||
to={ROUTES_ENUM.protected.supplychain.suppliersDetail.replace(
|
||||
':id',
|
||||
supplier.id,
|
||||
)}
|
||||
className="p-1.5 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
|
|
@ -375,7 +379,10 @@ const SupplierList: React.FC = () => {
|
|||
</Link>
|
||||
|
||||
<Link
|
||||
to={`/admin/supplychain/suppliers/edit/${supplier.id}`}
|
||||
to={ROUTES_ENUM.protected.supplychain.suppliersEdit.replace(
|
||||
':id',
|
||||
supplier.id,
|
||||
)}
|
||||
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -396,7 +403,7 @@ const SupplierList: React.FC = () => {
|
|||
<p className="mt-1 text-sm text-gray-500">Yeni tedarikçi ekleyerek başlayın.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/supplychain/suppliers/new"
|
||||
to={ROUTES_ENUM.protected.supplychain.suppliersNew}
|
||||
className="inline-flex items-center px-3 py-1.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
</button>
|
||||
|
||||
<Link
|
||||
to="/admin/warehouse/new"
|
||||
to={ROUTES_ENUM.protected.warehouse.warehouseNew}
|
||||
className="flex items-center px-3 py-1.5 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={14} className="mr-2" />
|
||||
|
|
@ -364,7 +365,10 @@ const WarehouseList: React.FC = () => {
|
|||
<td className="px-4 py-3 text-right">
|
||||
<div className="flex items-center justify-end space-x-2">
|
||||
<Link
|
||||
to={`/admin/warehouse/warehouses/${warehouse.id}`}
|
||||
to={ROUTES_ENUM.protected.warehouse.warehouseDetail.replace(
|
||||
'::id',
|
||||
warehouse.id,
|
||||
)}
|
||||
className="p-2 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||
title="Detayları Görüntüle"
|
||||
>
|
||||
|
|
@ -372,7 +376,10 @@ const WarehouseList: React.FC = () => {
|
|||
</Link>
|
||||
|
||||
<Link
|
||||
to={`/admin/warehouse/edit/${warehouse.id}`}
|
||||
to={ROUTES_ENUM.protected.warehouse.warehouseEdit.replace(
|
||||
'::id',
|
||||
warehouse.id,
|
||||
)}
|
||||
className="p-2 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||
title="Düzenle"
|
||||
>
|
||||
|
|
@ -394,7 +401,7 @@ const WarehouseList: React.FC = () => {
|
|||
<p className="mt-1 text-sm text-gray-500">Yeni depo ekleyerek başlayın.</p>
|
||||
<div className="mt-6">
|
||||
<Link
|
||||
to="/admin/warehouse/new"
|
||||
to={ROUTES_ENUM.protected.warehouse.warehouseNew}
|
||||
className="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors"
|
||||
>
|
||||
<FaPlus size={16} className="mr-2" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue