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 {
|
import {
|
||||||
CrmActivity,
|
CrmActivity,
|
||||||
CustomerSegmentEnum,
|
CustomerSegmentEnum,
|
||||||
|
|
@ -7,216 +7,217 @@ import {
|
||||||
CrmSalesOrder,
|
CrmSalesOrder,
|
||||||
CrmSalesTarget,
|
CrmSalesTarget,
|
||||||
CrmTerritory,
|
CrmTerritory,
|
||||||
} from "./admin/crm";
|
} from './crm'
|
||||||
import { HrEmployee } from "./hr";
|
import { HrEmployee } from './hr'
|
||||||
import {
|
import { SupplierCardTypeEnum, MmSupplierPerformance, SupplierTypeEnum } from './mm'
|
||||||
SupplierCardTypeEnum,
|
|
||||||
MmSupplierPerformance,
|
|
||||||
SupplierTypeEnum,
|
|
||||||
} from "./mm";
|
|
||||||
|
|
||||||
export interface DashboardStats {
|
export interface DashboardStats {
|
||||||
// Gösterge Paneli İstatistikleri
|
// Gösterge Paneli İstatistikleri
|
||||||
totalMaterials: number;
|
totalMaterials: number
|
||||||
criticalStock: number;
|
criticalStock: number
|
||||||
lowStock: number;
|
lowStock: number
|
||||||
pendingOrders: number;
|
pendingOrders: number
|
||||||
maintenanceDue: number;
|
maintenanceDue: number
|
||||||
activeProjects: number;
|
activeProjects: number
|
||||||
totalRevenue: number;
|
totalRevenue: number
|
||||||
monthlyGrowth: number;
|
monthlyGrowth: number
|
||||||
totalEmployees: number;
|
totalEmployees: number
|
||||||
openOpportunities: number;
|
openOpportunities: number
|
||||||
pendingPurchaseRequests: number;
|
pendingPurchaseRequests: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BusinessParty {
|
export interface BusinessParty {
|
||||||
// İş Ortağı (Müşteri/Satıcı)
|
// İş Ortağı (Müşteri/Satıcı)
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
address?: Address;
|
address?: Address
|
||||||
taxNumber?: string;
|
taxNumber?: string
|
||||||
paymentTerms: PaymentTerms;
|
paymentTerms: PaymentTerms
|
||||||
currency: string;
|
currency: string
|
||||||
creditLimit: number;
|
creditLimit: number
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
partyType: PartyType;
|
partyType: PartyType
|
||||||
primaryContact?: Contact;
|
primaryContact?: Contact
|
||||||
contacts?: Contact[];
|
contacts?: Contact[]
|
||||||
industry?: string;
|
industry?: string
|
||||||
email?: string;
|
email?: string
|
||||||
phone?: string;
|
phone?: string
|
||||||
website?: string;
|
website?: string
|
||||||
lastOrderDate?: Date;
|
lastOrderDate?: Date
|
||||||
status?: BusinessPartyStatusEnum;
|
status?: BusinessPartyStatusEnum
|
||||||
|
|
||||||
//Customer’a özgü alanlar
|
//Customer’a özgü alanlar
|
||||||
customerType?: CustomerTypeEnum;
|
customerType?: CustomerTypeEnum
|
||||||
registrationNumber?: string;
|
registrationNumber?: string
|
||||||
customerSegment?: CustomerSegmentEnum;
|
customerSegment?: CustomerSegmentEnum
|
||||||
assignedSalesRep?: string;
|
assignedSalesRep?: string
|
||||||
teamId?: string;
|
teamId?: string
|
||||||
team?: Team;
|
team?: Team
|
||||||
totalRevenue?: number;
|
totalRevenue?: number
|
||||||
averageOrderValue?: number;
|
averageOrderValue?: number
|
||||||
lifetimeValue?: number;
|
lifetimeValue?: number
|
||||||
opportunities?: CrmOpportunity[];
|
opportunities?: CrmOpportunity[]
|
||||||
orders?: CrmSalesOrder[];
|
orders?: CrmSalesOrder[]
|
||||||
activities?: CrmActivity[];
|
activities?: CrmActivity[]
|
||||||
|
|
||||||
// Supplier’a özgü alanlar
|
// Supplier’a özgü alanlar
|
||||||
supplierType?: SupplierTypeEnum;
|
supplierType?: SupplierTypeEnum
|
||||||
cardNumber?: string;
|
cardNumber?: string
|
||||||
cardType?: SupplierCardTypeEnum;
|
cardType?: SupplierCardTypeEnum
|
||||||
validFrom?: Date;
|
validFrom?: Date
|
||||||
validTo?: Date;
|
validTo?: Date
|
||||||
currentBalance?: number;
|
currentBalance?: number
|
||||||
discountRate?: number;
|
discountRate?: number
|
||||||
specialConditions?: string[];
|
specialConditions?: string[]
|
||||||
performanceMetrics?: MmSupplierPerformance;
|
performanceMetrics?: MmSupplierPerformance
|
||||||
certifications?: string[];
|
certifications?: string[]
|
||||||
bankAccounts?: BankAccount[];
|
bankAccounts?: BankAccount[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum BusinessPartyStatusEnum { // İş Ortağı Durumu
|
export enum BusinessPartyStatusEnum {
|
||||||
Prospect = "PROSPECT", // Potansiyel
|
// İş Ortağı Durumu
|
||||||
Active = "ACTIVE", // Aktif
|
Prospect = 'PROSPECT', // Potansiyel
|
||||||
Inactive = "INACTIVE", // Pasif
|
Active = 'ACTIVE', // Aktif
|
||||||
Blocked = "BLOCKED", // Engellenmiş
|
Inactive = 'INACTIVE', // Pasif
|
||||||
|
Blocked = 'BLOCKED', // Engellenmiş
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Team {
|
export interface Team {
|
||||||
// Takım
|
// Takım
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
managerId: string;
|
managerId: string
|
||||||
manager?: HrEmployee;
|
manager?: HrEmployee
|
||||||
members: TeamMember[];
|
members: TeamMember[]
|
||||||
territories?: CrmTerritory[];
|
territories?: CrmTerritory[]
|
||||||
targets?: CrmSalesTarget[];
|
targets?: CrmSalesTarget[]
|
||||||
specializations?: string[];
|
specializations?: string[]
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TeamMember {
|
export interface TeamMember {
|
||||||
// Takım Üyesi
|
// Takım Üyesi
|
||||||
id: string;
|
id: string
|
||||||
teamId: string;
|
teamId: string
|
||||||
employeeId: string;
|
employeeId: string
|
||||||
employee?: HrEmployee;
|
employee?: HrEmployee
|
||||||
role: TeamRoleEnum;
|
role: TeamRoleEnum
|
||||||
joinDate: Date;
|
joinDate: Date
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Contact {
|
export interface Contact {
|
||||||
// İletişim
|
// İletişim
|
||||||
id: string;
|
id: string
|
||||||
customerId?: string;
|
customerId?: string
|
||||||
firstName: string;
|
firstName: string
|
||||||
lastName: string;
|
lastName: string
|
||||||
fullName: string;
|
fullName: string
|
||||||
title?: string;
|
title?: string
|
||||||
department?: string;
|
department?: string
|
||||||
email: string;
|
email: string
|
||||||
phone?: string;
|
phone?: string
|
||||||
mobile?: string;
|
mobile?: string
|
||||||
isPrimary: boolean;
|
isPrimary: boolean
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Address {
|
export interface Address {
|
||||||
// Adres
|
// Adres
|
||||||
street: string;
|
street: string
|
||||||
city: string;
|
city: string
|
||||||
state: string;
|
state: string
|
||||||
postalCode: string;
|
postalCode: string
|
||||||
country: string;
|
country: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bank Management Types
|
// Bank Management Types
|
||||||
export interface BankAccount {
|
export interface BankAccount {
|
||||||
// Banka Hesabı
|
// Banka Hesabı
|
||||||
id: string;
|
id: string
|
||||||
accountCode: string;
|
accountCode: string
|
||||||
bankName: string;
|
bankName: string
|
||||||
branchName: string;
|
branchName: string
|
||||||
accountNumber: string;
|
accountNumber: string
|
||||||
iban: string;
|
iban: string
|
||||||
accountType: BankAccountTypeEnum;
|
accountType: BankAccountTypeEnum
|
||||||
currency: string;
|
currency: string
|
||||||
balance: number;
|
balance: number
|
||||||
overdraftLimit: number;
|
overdraftLimit: number
|
||||||
dailyTransferLimit: number;
|
dailyTransferLimit: number
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
contactPerson?: string;
|
contactPerson?: string
|
||||||
phone?: string;
|
phone?: string
|
||||||
swiftCode?: string;
|
swiftCode?: string
|
||||||
isDefault: boolean;
|
isDefault: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WidgetGroupDto {
|
export interface WidgetGroupDto {
|
||||||
// Widget Grubu
|
// Widget Grubu
|
||||||
colGap?: number;
|
colGap?: number
|
||||||
colSpan?: number;
|
colSpan?: number
|
||||||
className?: string;
|
className?: string
|
||||||
items: WidgetEditDto[];
|
items: WidgetEditDto[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WidgetEditDto {
|
export interface WidgetEditDto {
|
||||||
// Widget Düzenleme
|
// Widget Düzenleme
|
||||||
colGap: number;
|
colGap: number
|
||||||
colSpan: number;
|
colSpan: number
|
||||||
sqlQuery?: string;
|
sqlQuery?: string
|
||||||
className?: string;
|
className?: string
|
||||||
title: string;
|
title: string
|
||||||
value: string;
|
value: string
|
||||||
valueClassName: string;
|
valueClassName: string
|
||||||
color: string;
|
color: string
|
||||||
icon: string;
|
icon: string
|
||||||
subTitle: string;
|
subTitle: string
|
||||||
onClick: string;
|
onClick: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TeamRoleEnum { // Takım Rolü
|
export enum TeamRoleEnum {
|
||||||
Member = "MEMBER", // Üye
|
// Takım Rolü
|
||||||
Lead = "LEAD", // Lider
|
Member = 'MEMBER', // Üye
|
||||||
Manager = "MANAGER", // Yönetici
|
Lead = 'LEAD', // Lider
|
||||||
Specialist = "SPECIALIST", // Uzman
|
Manager = 'MANAGER', // Yönetici
|
||||||
|
Specialist = 'SPECIALIST', // Uzman
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PartyType { // İş Ortağı Türü
|
export enum PartyType {
|
||||||
Customer = "CUSTOMER", // Müşteri
|
// İş Ortağı Türü
|
||||||
Supplier = "SUPPLIER", // Tedarikçi
|
Customer = 'CUSTOMER', // Müşteri
|
||||||
Both = "BOTH", // Her İkisi
|
Supplier = 'SUPPLIER', // Tedarikçi
|
||||||
Other = "OTHER", // Diğer
|
Both = 'BOTH', // Her İkisi
|
||||||
|
Other = 'OTHER', // Diğer
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PaymentTerms { // Ödeme Koşulları
|
export enum PaymentTerms {
|
||||||
Net15 = "NET15", // 15 Gün
|
// Ödeme Koşulları
|
||||||
Net30 = "NET30", // 30 Gün
|
Net15 = 'NET15', // 15 Gün
|
||||||
Net45 = "NET45", // 45 Gün
|
Net30 = 'NET30', // 30 Gün
|
||||||
Net60 = "NET60", // 60 Gün
|
Net45 = 'NET45', // 45 Gün
|
||||||
Net90 = "NET90", // 90 Gün
|
Net60 = 'NET60', // 60 Gün
|
||||||
COD = "COD", // Kapıda Ödeme
|
Net90 = 'NET90', // 90 Gün
|
||||||
Prepaid = "PREPAID", // Peşin
|
COD = 'COD', // Kapıda Ödeme
|
||||||
Cash = "CASH", // Nakit
|
Prepaid = 'PREPAID', // Peşin
|
||||||
|
Cash = 'CASH', // Nakit
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PriorityEnum { // Öncelik
|
export enum PriorityEnum {
|
||||||
Low = "LOW", // Düşük
|
// Öncelik
|
||||||
Normal = "NORMAL", // Normal
|
Low = 'LOW', // Düşük
|
||||||
High = "HIGH", // Yüksek
|
Normal = 'NORMAL', // Normal
|
||||||
Urgent = "URGENT", // Acil
|
High = 'HIGH', // Yüksek
|
||||||
|
Urgent = 'URGENT', // Acil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,269 +1,275 @@
|
||||||
import {
|
import { Address, BusinessParty, Contact, PaymentTerms, PriorityEnum } from './common'
|
||||||
Address,
|
import { HrEmployee } from './hr'
|
||||||
BusinessParty,
|
import { MmDelivery, MmMaterial, MmUnit } from './mm'
|
||||||
Contact,
|
|
||||||
PaymentTerms,
|
|
||||||
PriorityEnum,
|
|
||||||
} from "./common";
|
|
||||||
import { HrEmployee } from "./hr";
|
|
||||||
import { MmDelivery, MmMaterial, MmUnit } from "./mm";
|
|
||||||
|
|
||||||
export interface CrmSalesOrder {
|
export interface CrmSalesOrder {
|
||||||
// Satış Siparişi
|
// Satış Siparişi
|
||||||
id: string;
|
id: string
|
||||||
orderNumber: string;
|
orderNumber: string
|
||||||
customerId: string;
|
customerId: string
|
||||||
customer?: BusinessParty;
|
customer?: BusinessParty
|
||||||
orderDate: Date;
|
orderDate: Date
|
||||||
requestedDeliveryDate: Date;
|
requestedDeliveryDate: Date
|
||||||
confirmedDeliveryDate?: Date;
|
confirmedDeliveryDate?: Date
|
||||||
status: SaleOrderStatusEnum;
|
status: SaleOrderStatusEnum
|
||||||
subtotal: number;
|
subtotal: number
|
||||||
taxAmount: number;
|
taxAmount: number
|
||||||
discountAmount: number;
|
discountAmount: number
|
||||||
totalAmount: number;
|
totalAmount: number
|
||||||
currency: string;
|
currency: string
|
||||||
paymentTerms: PaymentTerms;
|
paymentTerms: PaymentTerms
|
||||||
deliveryTerms?: string;
|
deliveryTerms?: string
|
||||||
deliveryAddress: Address;
|
deliveryAddress: Address
|
||||||
billingAddress: Address;
|
billingAddress: Address
|
||||||
exchangeRate?: number;
|
exchangeRate?: number
|
||||||
discountRate?: number;
|
discountRate?: number
|
||||||
taxRate?: number;
|
taxRate?: number
|
||||||
specialInstructions?: string;
|
specialInstructions?: string
|
||||||
items: CrmSalesOrderItem[];
|
items: CrmSalesOrderItem[]
|
||||||
deliveries: MmDelivery[];
|
deliveries: MmDelivery[]
|
||||||
notes?: string;
|
notes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CrmSalesOrderItem {
|
export interface CrmSalesOrderItem {
|
||||||
// Satış Sipariş Kalemi
|
// Satış Sipariş Kalemi
|
||||||
id: string;
|
id: string
|
||||||
orderId: string;
|
orderId: string
|
||||||
materialId?: string;
|
materialId?: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
description: string;
|
description: string
|
||||||
quantity: number;
|
quantity: number
|
||||||
deliveredQuantity: number;
|
deliveredQuantity: number
|
||||||
unitPrice: number;
|
unitPrice: number
|
||||||
totalAmount: number;
|
totalAmount: number
|
||||||
unitId: string;
|
unitId: string
|
||||||
unit?: MmUnit;
|
unit?: MmUnit
|
||||||
discountRate?: number;
|
discountRate?: number
|
||||||
discountAmount?: number;
|
discountAmount?: number
|
||||||
taxRate?: number;
|
taxRate?: number
|
||||||
taxAmount?: number;
|
taxAmount?: number
|
||||||
notes?: string;
|
notes?: string
|
||||||
requestedDate: Date;
|
requestedDate: Date
|
||||||
confirmedDate?: Date;
|
confirmedDate?: Date
|
||||||
status: SaleOrderItemStatusEnum;
|
status: SaleOrderItemStatusEnum
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CrmTerritory {
|
export interface CrmTerritory {
|
||||||
// Sales Bölgesi
|
// Sales Bölgesi
|
||||||
id: string;
|
id: string
|
||||||
territoryCode: string;
|
territoryCode: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
region: string;
|
region: string
|
||||||
countries: string[];
|
countries: string[]
|
||||||
cities: string[];
|
cities: string[]
|
||||||
assignedTeamId?: string;
|
assignedTeamId?: string
|
||||||
assignedSalesRep?: string;
|
assignedSalesRep?: string
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CrmOpportunity {
|
export interface CrmOpportunity {
|
||||||
// Fırsat
|
// Fırsat
|
||||||
id: string;
|
id: string
|
||||||
opportunityNumber: string;
|
opportunityNumber: string
|
||||||
title: string;
|
title: string
|
||||||
description?: string;
|
description?: string
|
||||||
customerId: string;
|
customerId: string
|
||||||
customer?: BusinessParty;
|
customer?: BusinessParty
|
||||||
contactId?: string;
|
contactId?: string
|
||||||
contact?: Contact;
|
contact?: Contact
|
||||||
stage: OpportunityStageEnum;
|
stage: OpportunityStageEnum
|
||||||
probability: number;
|
probability: number
|
||||||
estimatedValue: number;
|
estimatedValue: number
|
||||||
currency: string;
|
currency: string
|
||||||
expectedCloseDate: Date;
|
expectedCloseDate: Date
|
||||||
actualCloseDate?: Date;
|
actualCloseDate?: Date
|
||||||
assignedTo: string;
|
assignedTo: string
|
||||||
assigned?: HrEmployee;
|
assigned?: HrEmployee
|
||||||
teamId?: string;
|
teamId?: string
|
||||||
leadSource: LeadSourceEnum;
|
leadSource: LeadSourceEnum
|
||||||
campaignId?: string;
|
campaignId?: string
|
||||||
status: OpportunityStatusEnum;
|
status: OpportunityStatusEnum
|
||||||
lostReason?: CrmLostReason;
|
lostReason?: CrmLostReason
|
||||||
activities: CrmActivity[];
|
activities: CrmActivity[]
|
||||||
competitors: CrmCompetitor[];
|
competitors: CrmCompetitor[]
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CrmActivity {
|
export interface CrmActivity {
|
||||||
// Aktivite
|
// Aktivite
|
||||||
id: string;
|
id: string
|
||||||
activityType: CrmActivityTypeEnum;
|
activityType: CrmActivityTypeEnum
|
||||||
subject: string;
|
subject: string
|
||||||
description?: string;
|
description?: string
|
||||||
customerId?: string;
|
customerId?: string
|
||||||
customer?: BusinessParty;
|
customer?: BusinessParty
|
||||||
opportunityId?: string;
|
opportunityId?: string
|
||||||
opportunity?: CrmOpportunity;
|
opportunity?: CrmOpportunity
|
||||||
contactId?: string;
|
contactId?: string
|
||||||
contact?: Contact;
|
contact?: Contact
|
||||||
activityDate: Date;
|
activityDate: Date
|
||||||
startTime?: Date;
|
startTime?: Date
|
||||||
endTime?: Date;
|
endTime?: Date
|
||||||
duration?: number; // minutes
|
duration?: number // minutes
|
||||||
assignedTo: string;
|
assignedTo: string
|
||||||
assigned?: HrEmployee;
|
assigned?: HrEmployee
|
||||||
participants: string[];
|
participants: string[]
|
||||||
status: ActivityStatusEnum;
|
status: ActivityStatusEnum
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
followUpDate?: Date;
|
followUpDate?: Date
|
||||||
followUpActivity?: string;
|
followUpActivity?: string
|
||||||
outcome?: string;
|
outcome?: string
|
||||||
nextSteps?: string;
|
nextSteps?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CrmCompetitor {
|
export interface CrmCompetitor {
|
||||||
// Rakip
|
// Rakip
|
||||||
id: string;
|
id: string
|
||||||
name: string;
|
name: string
|
||||||
website?: string;
|
website?: string
|
||||||
strengths: string[];
|
strengths: string[]
|
||||||
weaknesses: string[];
|
weaknesses: string[]
|
||||||
marketShare?: number;
|
marketShare?: number
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CrmLostReason {
|
export interface CrmLostReason {
|
||||||
// Kaybedilme Nedeni
|
// Kaybedilme Nedeni
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
category: LostReasonCategoryEnum;
|
category: LostReasonCategoryEnum
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CrmSalesTarget {
|
export interface CrmSalesTarget {
|
||||||
// Satış Hedefi
|
// Satış Hedefi
|
||||||
id: string;
|
id: string
|
||||||
teamId?: string;
|
teamId?: string
|
||||||
employeeId?: string;
|
employeeId?: string
|
||||||
targetPeriod: string;
|
targetPeriod: string
|
||||||
targetType: TargetTypeEnum;
|
targetType: TargetTypeEnum
|
||||||
targetValue: number;
|
targetValue: number
|
||||||
actualValue: number;
|
actualValue: number
|
||||||
currency: string;
|
currency: string
|
||||||
startDate: Date;
|
startDate: Date
|
||||||
endDate: Date;
|
endDate: Date
|
||||||
status: TargetStatusEnum;
|
status: TargetStatusEnum
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CustomerTypeEnum { // Müşteri Türü
|
export enum CustomerTypeEnum {
|
||||||
Individual = "INDIVIDUAL", // Bireysel
|
// Müşteri Türü
|
||||||
Company = "COMPANY", // Şirket
|
Individual = 'INDIVIDUAL', // Bireysel
|
||||||
Government = "GOVERNMENT", // Devlet
|
Company = 'COMPANY', // Şirket
|
||||||
NonProfit = "NON_PROFIT", // Kar Amacı Gütmeyen
|
Government = 'GOVERNMENT', // Devlet
|
||||||
|
NonProfit = 'NON_PROFIT', // Kar Amacı Gütmeyen
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CustomerSegmentEnum { // Müşteri Segmenti
|
export enum CustomerSegmentEnum {
|
||||||
Enterprise = "ENTERPRISE", // Kurumsal
|
// Müşteri Segmenti
|
||||||
SMB = "SMB", // KOBİ
|
Enterprise = 'ENTERPRISE', // Kurumsal
|
||||||
Startup = "STARTUP", // Yeni Kuruluş
|
SMB = 'SMB', // KOBİ
|
||||||
Government = "GOVERNMENT", // Devlet
|
Startup = 'STARTUP', // Yeni Kuruluş
|
||||||
|
Government = 'GOVERNMENT', // Devlet
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum OpportunityStageEnum { // Fırsat Aşaması
|
export enum OpportunityStageEnum {
|
||||||
Qualification = "QUALIFICATION", // Nitelik
|
// Fırsat Aşaması
|
||||||
NeedsAnalysis = "NEEDS_ANALYSIS", // İhtiyaç Analizi
|
Qualification = 'QUALIFICATION', // Nitelik
|
||||||
Proposal = "PROPOSAL", // Teklif
|
NeedsAnalysis = 'NEEDS_ANALYSIS', // İhtiyaç Analizi
|
||||||
Negotiation = "NEGOTIATION", // Müzakere
|
Proposal = 'PROPOSAL', // Teklif
|
||||||
ClosedWon = "CLOSED_WON", // Kazanıldı
|
Negotiation = 'NEGOTIATION', // Müzakere
|
||||||
ClosedLost = "CLOSED_LOST", // Kaybedildi
|
ClosedWon = 'CLOSED_WON', // Kazanıldı
|
||||||
|
ClosedLost = 'CLOSED_LOST', // Kaybedildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum OpportunityStatusEnum { // Fırsat Durumu
|
export enum OpportunityStatusEnum {
|
||||||
Open = "OPEN", // Açık
|
// Fırsat Durumu
|
||||||
Won = "WON", // Kazanıldı
|
Open = 'OPEN', // Açık
|
||||||
Lost = "LOST", // Kaybedildi
|
Won = 'WON', // Kazanıldı
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
Lost = 'LOST', // Kaybedildi
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LeadSourceEnum { // Lead Kaynağı
|
export enum LeadSourceEnum {
|
||||||
Website = "WEBSITE", // Web Sitesi
|
// Lead Kaynağı
|
||||||
Referral = "REFERRAL", // Tavsiye
|
Website = 'WEBSITE', // Web Sitesi
|
||||||
Campaign = "CAMPAIGN", // Kampanya
|
Referral = 'REFERRAL', // Tavsiye
|
||||||
Trade_Show = "TRADE_SHOW", // Fuar
|
Campaign = 'CAMPAIGN', // Kampanya
|
||||||
Cold_Call = "COLD_CALL", // Soğuk Arama
|
Trade_Show = 'TRADE_SHOW', // Fuar
|
||||||
Social_Media = "SOCIAL_MEDIA", // Sosyal Medya
|
Cold_Call = 'COLD_CALL', // Soğuk Arama
|
||||||
Partner = "PARTNER", // İş Ortağı
|
Social_Media = 'SOCIAL_MEDIA', // Sosyal Medya
|
||||||
|
Partner = 'PARTNER', // İş Ortağı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SaleOrderStatusEnum { // Satış Siparişi Durumu
|
export enum SaleOrderStatusEnum {
|
||||||
Draft = "DRAFT", // Taslak
|
// Satış Siparişi Durumu
|
||||||
Confirmed = "CONFIRMED", // Onaylandı
|
Draft = 'DRAFT', // Taslak
|
||||||
InProduction = "IN_PRODUCTION", // Üretimde
|
Confirmed = 'CONFIRMED', // Onaylandı
|
||||||
Ready = "READY", // Hazır
|
InProduction = 'IN_PRODUCTION', // Üretimde
|
||||||
Shipped = "SHIPPED", // Gönderildi
|
Ready = 'READY', // Hazır
|
||||||
Delivered = "DELIVERED", // Teslim Edildi
|
Shipped = 'SHIPPED', // Gönderildi
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
Delivered = 'DELIVERED', // Teslim Edildi
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SaleOrderItemStatusEnum { // Satış Sipariş Kalemi Durumu
|
export enum SaleOrderItemStatusEnum {
|
||||||
Pending = "PENDING", // Beklemede
|
// Satış Sipariş Kalemi Durumu
|
||||||
Confirmed = "CONFIRMED", // Onaylandı
|
Pending = 'PENDING', // Beklemede
|
||||||
InProduction = "IN_PRODUCTION", // Üretimde
|
Confirmed = 'CONFIRMED', // Onaylandı
|
||||||
Ready = "READY", // Hazır
|
InProduction = 'IN_PRODUCTION', // Üretimde
|
||||||
Shipped = "SHIPPED", // Gönderildi
|
Ready = 'READY', // Hazır
|
||||||
Delivered = "DELIVERED", // Teslim Edildi
|
Shipped = 'SHIPPED', // Gönderildi
|
||||||
|
Delivered = 'DELIVERED', // Teslim Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CrmActivityTypeEnum { // Aktivite Türü
|
export enum CrmActivityTypeEnum {
|
||||||
Call = "CALL", // Telefon
|
// Aktivite Türü
|
||||||
Email = "EMAIL", // E-posta
|
Call = 'CALL', // Telefon
|
||||||
Meeting = "MEETING", // Toplantı
|
Email = 'EMAIL', // E-posta
|
||||||
Task = "TASK", // Görev
|
Meeting = 'MEETING', // Toplantı
|
||||||
Note = "NOTE", // Not
|
Task = 'TASK', // Görev
|
||||||
Demo = "DEMO", // Demo
|
Note = 'NOTE', // Not
|
||||||
Proposal = "PROPOSAL", // Teklif
|
Demo = 'DEMO', // Demo
|
||||||
|
Proposal = 'PROPOSAL', // Teklif
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ActivityStatusEnum { // Aktivite Durumu
|
export enum ActivityStatusEnum {
|
||||||
Planned = "PLANNED", // Planlandı
|
// Aktivite Durumu
|
||||||
InProgress = "IN_PROGRESS", // Devam Ediyor
|
Planned = 'PLANNED', // Planlandı
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
InProgress = 'IN_PROGRESS', // Devam Ediyor
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LostReasonCategoryEnum { // Kaybedilme Nedeni Kategorisi
|
export enum LostReasonCategoryEnum {
|
||||||
Price = "PRICE", // Fiyat
|
// Kaybedilme Nedeni Kategorisi
|
||||||
Product = "PRODUCT", // Ürün
|
Price = 'PRICE', // Fiyat
|
||||||
Service = "SERVICE", // Hizmet
|
Product = 'PRODUCT', // Ürün
|
||||||
Competitor = "COMPETITOR", // Rakip
|
Service = 'SERVICE', // Hizmet
|
||||||
Timing = "TIMING", // Zamanlama
|
Competitor = 'COMPETITOR', // Rakip
|
||||||
Budget = "BUDGET", // Bütçe
|
Timing = 'TIMING', // Zamanlama
|
||||||
|
Budget = 'BUDGET', // Bütçe
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TargetTypeEnum { // Hedef Türü
|
export enum TargetTypeEnum {
|
||||||
Revenue = "REVENUE", // Gelir
|
// Hedef Türü
|
||||||
Units = "UNITS", // Birimler
|
Revenue = 'REVENUE', // Gelir
|
||||||
Opportunities = "OPPORTUNITIES", // Fırsatlar
|
Units = 'UNITS', // Birimler
|
||||||
Customers = "CUSTOMERS", // Müşteriler
|
Opportunities = 'OPPORTUNITIES', // Fırsatlar
|
||||||
|
Customers = 'CUSTOMERS', // Müşteriler
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TargetStatusEnum { // Hedef Durumu
|
export enum TargetStatusEnum {
|
||||||
Active = "ACTIVE", // Aktif
|
// Hedef Durumu
|
||||||
Achieved = "ACHIEVED", // Gerçekleşti
|
Active = 'ACTIVE', // Aktif
|
||||||
Missed = "MISSED", // Kaçırıldı
|
Achieved = 'ACHIEVED', // Gerçekleşti
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
Missed = 'MISSED', // Kaçırıldı
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,362 +1,362 @@
|
||||||
import { BankAccount, BusinessParty } from "./common";
|
import { BankAccount, BusinessParty } from './common'
|
||||||
import { MmMaterial } from "./mm";
|
import { MmMaterial } from './mm'
|
||||||
|
|
||||||
export interface FiCurrentAccount {
|
export interface FiCurrentAccount {
|
||||||
// Cari Hesabı
|
// Cari Hesabı
|
||||||
id: string;
|
id: string
|
||||||
accountCode: string;
|
accountCode: string
|
||||||
businessPartyId: string;
|
businessPartyId: string
|
||||||
businessParty?: BusinessParty;
|
businessParty?: BusinessParty
|
||||||
type: AccountTypeEnum;
|
type: AccountTypeEnum
|
||||||
contactPerson?: string;
|
contactPerson?: string
|
||||||
phone?: string;
|
phone?: string
|
||||||
email?: string;
|
email?: string
|
||||||
address?: string;
|
address?: string
|
||||||
taxNumber?: string;
|
taxNumber?: string
|
||||||
taxOffice?: string;
|
taxOffice?: string
|
||||||
creditLimit: number;
|
creditLimit: number
|
||||||
balance: number;
|
balance: number
|
||||||
currency: string;
|
currency: string
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
riskGroup: RiskGroupEnum;
|
riskGroup: RiskGroupEnum
|
||||||
paymentTerm: number;
|
paymentTerm: number
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
lastTransactionDate?: Date;
|
lastTransactionDate?: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiCurrentAccountMovement {
|
export interface FiCurrentAccountMovement {
|
||||||
// Cari Hesap Hareketi
|
// Cari Hesap Hareketi
|
||||||
id: string;
|
id: string
|
||||||
accountId: string;
|
accountId: string
|
||||||
account?: FiCurrentAccount;
|
account?: FiCurrentAccount
|
||||||
transactionDate: Date;
|
transactionDate: Date
|
||||||
description: string;
|
description: string
|
||||||
referenceNumber?: string;
|
referenceNumber?: string
|
||||||
documentType: FiDocumentTypeEnum;
|
documentType: FiDocumentTypeEnum
|
||||||
documentNumber?: string;
|
documentNumber?: string
|
||||||
debitAmount: number;
|
debitAmount: number
|
||||||
creditAmount: number;
|
creditAmount: number
|
||||||
balance: number;
|
balance: number
|
||||||
currency: string;
|
currency: string
|
||||||
invoiceId?: string;
|
invoiceId?: string
|
||||||
paymentId?: string;
|
paymentId?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiInvoice {
|
export interface FiInvoice {
|
||||||
// Fatura
|
// Fatura
|
||||||
id: string;
|
id: string
|
||||||
invoiceNumber: string;
|
invoiceNumber: string
|
||||||
invoiceType: InvoiceTypeEnum;
|
invoiceType: InvoiceTypeEnum
|
||||||
currentAccountId: string;
|
currentAccountId: string
|
||||||
currentAccount?: FiCurrentAccount;
|
currentAccount?: FiCurrentAccount
|
||||||
invoiceDate: Date;
|
invoiceDate: Date
|
||||||
dueDate: Date;
|
dueDate: Date
|
||||||
deliveryDate?: Date;
|
deliveryDate?: Date
|
||||||
subtotal: number;
|
subtotal: number
|
||||||
taxAmount: number;
|
taxAmount: number
|
||||||
discountAmount: number;
|
discountAmount: number
|
||||||
totalAmount: number;
|
totalAmount: number
|
||||||
paidAmount: number;
|
paidAmount: number
|
||||||
remainingAmount: number;
|
remainingAmount: number
|
||||||
currency: string;
|
currency: string
|
||||||
status: InvoiceStatusEnum;
|
status: InvoiceStatusEnum
|
||||||
paymentStatus: PaymentStatusEnum;
|
paymentStatus: PaymentStatusEnum
|
||||||
items: FiInvoiceItem[];
|
items: FiInvoiceItem[]
|
||||||
waybillNumber?: string;
|
waybillNumber?: string
|
||||||
waybillDate?: Date;
|
waybillDate?: Date
|
||||||
notes?: string;
|
notes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiInvoiceItem {
|
export interface FiInvoiceItem {
|
||||||
// Fatura Kalemi
|
// Fatura Kalemi
|
||||||
id: string;
|
id: string
|
||||||
invoiceId: string;
|
invoiceId: string
|
||||||
materialId?: string;
|
materialId?: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
description: string;
|
description: string
|
||||||
quantity: number;
|
quantity: number
|
||||||
unit: string;
|
unit: string
|
||||||
unitPrice: number;
|
unitPrice: number
|
||||||
lineTotal: number;
|
lineTotal: number
|
||||||
discountRate: number;
|
discountRate: number
|
||||||
discountAmount: number;
|
discountAmount: number
|
||||||
taxRate: number;
|
taxRate: number
|
||||||
taxAmount: number;
|
taxAmount: number
|
||||||
netAmount: number;
|
netAmount: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiWaybill {
|
export interface FiWaybill {
|
||||||
// İrsaliye
|
// İrsaliye
|
||||||
id: string;
|
id: string
|
||||||
waybillNumber: string;
|
waybillNumber: string
|
||||||
waybillType: WaybillTypeEnum;
|
waybillType: WaybillTypeEnum
|
||||||
currentAccountId: string;
|
currentAccountId: string
|
||||||
currentAccount?: FiCurrentAccount;
|
currentAccount?: FiCurrentAccount
|
||||||
waybillDate: Date;
|
waybillDate: Date
|
||||||
deliveryDate?: Date;
|
deliveryDate?: Date
|
||||||
subtotal: number;
|
subtotal: number
|
||||||
taxAmount: number;
|
taxAmount: number
|
||||||
discountAmount: number;
|
discountAmount: number
|
||||||
totalAmount: number;
|
totalAmount: number
|
||||||
currency: string;
|
currency: string
|
||||||
status: WaybillStatusEnum;
|
status: WaybillStatusEnum
|
||||||
isInvoiced: boolean;
|
isInvoiced: boolean
|
||||||
invoiceId?: string;
|
invoiceId?: string
|
||||||
items: FiWaybillItem[];
|
items: FiWaybillItem[]
|
||||||
deliveryAddress?: string;
|
deliveryAddress?: string
|
||||||
receiverName?: string;
|
receiverName?: string
|
||||||
receiverPhone?: string;
|
receiverPhone?: string
|
||||||
carrierCompany?: string;
|
carrierCompany?: string
|
||||||
trackingNumber?: string;
|
trackingNumber?: string
|
||||||
notes?: string;
|
notes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiWaybillItem {
|
export interface FiWaybillItem {
|
||||||
// İrsaliye Kalemi
|
// İrsaliye Kalemi
|
||||||
id: string;
|
id: string
|
||||||
waybillId: string;
|
waybillId: string
|
||||||
materialId?: string;
|
materialId?: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
description: string;
|
description: string
|
||||||
quantity: number;
|
quantity: number
|
||||||
unit: string;
|
unit: string
|
||||||
unitPrice: number;
|
unitPrice: number
|
||||||
lineTotal: number;
|
lineTotal: number
|
||||||
discountRate: number;
|
discountRate: number
|
||||||
discountAmount: number;
|
discountAmount: number
|
||||||
taxRate: number;
|
taxRate: number
|
||||||
taxAmount: number;
|
taxAmount: number
|
||||||
netAmount: number;
|
netAmount: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiCashAccount {
|
export interface FiCashAccount {
|
||||||
// Kasa Hesabı
|
// Kasa Hesabı
|
||||||
id: string;
|
id: string
|
||||||
accountCode: string;
|
accountCode: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
currency: string;
|
currency: string
|
||||||
balance: number;
|
balance: number
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiCashMovement {
|
export interface FiCashMovement {
|
||||||
// Kasa Hareketi
|
// Kasa Hareketi
|
||||||
id: string;
|
id: string
|
||||||
cashAccountId: string;
|
cashAccountId: string
|
||||||
cashAccount?: FiCashAccount;
|
cashAccount?: FiCashAccount
|
||||||
transactionDate: Date;
|
transactionDate: Date
|
||||||
description: string;
|
description: string
|
||||||
referenceNumber?: string;
|
referenceNumber?: string
|
||||||
movementType: CashMovementTypeEnum;
|
movementType: CashMovementTypeEnum
|
||||||
amount: number;
|
amount: number
|
||||||
currency: string;
|
currency: string
|
||||||
documentType?: FiDocumentTypeEnum;
|
documentType?: FiDocumentTypeEnum
|
||||||
documentNumber?: string;
|
documentNumber?: string
|
||||||
currentAccountId?: string;
|
currentAccountId?: string
|
||||||
currentAccount?: FiCurrentAccount;
|
currentAccount?: FiCurrentAccount
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiBankMovement {
|
export interface FiBankMovement {
|
||||||
// Banka Hareketi
|
// Banka Hareketi
|
||||||
id: string;
|
id: string
|
||||||
bankAccountId: string;
|
bankAccountId: string
|
||||||
bankAccount?: BankAccount;
|
bankAccount?: BankAccount
|
||||||
transactionDate: Date;
|
transactionDate: Date
|
||||||
valueDate: Date;
|
valueDate: Date
|
||||||
description: string;
|
description: string
|
||||||
referenceNumber?: string;
|
referenceNumber?: string
|
||||||
transactionType: BankTransactionTypeEnum;
|
transactionType: BankTransactionTypeEnum
|
||||||
amount: number;
|
amount: number
|
||||||
currency: string;
|
currency: string
|
||||||
recipientName?: string;
|
recipientName?: string
|
||||||
recipientIban?: string;
|
recipientIban?: string
|
||||||
recipientBank?: string;
|
recipientBank?: string
|
||||||
documentType?: FiDocumentTypeEnum;
|
documentType?: FiDocumentTypeEnum
|
||||||
documentNumber?: string;
|
documentNumber?: string
|
||||||
currentAccountId?: string;
|
currentAccountId?: string
|
||||||
currentAccount?: FiCurrentAccount;
|
currentAccount?: FiCurrentAccount
|
||||||
status: TransactionStatusEnum;
|
status: TransactionStatusEnum
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FiCheck {
|
export interface FiCheck {
|
||||||
// Çek
|
// Çek
|
||||||
id: string;
|
id: string
|
||||||
checkNumber: string;
|
checkNumber: string
|
||||||
bankName: string;
|
bankName: string
|
||||||
branchName: string;
|
branchName: string
|
||||||
accountNumber: string;
|
accountNumber: string
|
||||||
drawerName: string;
|
drawerName: string
|
||||||
payeeName: string;
|
payeeName: string
|
||||||
currentAccountId?: string;
|
currentAccountId?: string
|
||||||
currentAccount?: FiCurrentAccount;
|
currentAccount?: FiCurrentAccount
|
||||||
issueDate: Date;
|
issueDate: Date
|
||||||
dueDate: Date;
|
dueDate: Date
|
||||||
amount: number;
|
amount: number
|
||||||
currency: string;
|
currency: string
|
||||||
status: CheckStatusEnum;
|
status: CheckStatusEnum
|
||||||
type: CheckTypeEnum;
|
type: CheckTypeEnum
|
||||||
bankingDate?: Date;
|
bankingDate?: Date
|
||||||
collectionDate?: Date;
|
collectionDate?: Date
|
||||||
endorsedTo?: string;
|
endorsedTo?: string
|
||||||
notes?: string;
|
notes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PromissoryNote {
|
export interface PromissoryNote {
|
||||||
// Senet
|
// Senet
|
||||||
id: string;
|
id: string
|
||||||
noteNumber: string;
|
noteNumber: string
|
||||||
drawerName: string;
|
drawerName: string
|
||||||
payeeName: string;
|
payeeName: string
|
||||||
currentAccountId?: string;
|
currentAccountId?: string
|
||||||
currentAccount?: FiCurrentAccount;
|
currentAccount?: FiCurrentAccount
|
||||||
issueDate: Date;
|
issueDate: Date
|
||||||
dueDate: Date;
|
dueDate: Date
|
||||||
amount: number;
|
amount: number
|
||||||
currency: string;
|
currency: string
|
||||||
status: NoteStatusEnum;
|
status: NoteStatusEnum
|
||||||
type: NoteTypeEnum; // Received or Issued
|
type: NoteTypeEnum // Received or Issued
|
||||||
collectionDate?: Date;
|
collectionDate?: Date
|
||||||
endorsedTo?: string;
|
endorsedTo?: string
|
||||||
location?: string;
|
location?: string
|
||||||
notes?: string;
|
notes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enums
|
// Enums
|
||||||
export enum AccountTypeEnum {
|
export enum AccountTypeEnum {
|
||||||
Customer = "CUSTOMER", // Müşteri
|
Customer = 'CUSTOMER', // Müşteri
|
||||||
Supplier = "SUPPLIER", // Tedarikçi
|
Supplier = 'SUPPLIER', // Tedarikçi
|
||||||
Both = "BOTH", // Her İkisi de
|
Both = 'BOTH', // Her İkisi de
|
||||||
Other = "OTHER", // Diğer
|
Other = 'OTHER', // Diğer
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RiskGroupEnum {
|
export enum RiskGroupEnum {
|
||||||
Low = "LOW", // Düşük
|
Low = 'LOW', // Düşük
|
||||||
Medium = "MEDIUM", // Orta
|
Medium = 'MEDIUM', // Orta
|
||||||
High = "HIGH", // Yüksek
|
High = 'HIGH', // Yüksek
|
||||||
Blocked = "BLOCKED", // Bloke
|
Blocked = 'BLOCKED', // Bloke
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum FiDocumentTypeEnum {
|
export enum FiDocumentTypeEnum {
|
||||||
Invoice = "INVOICE", // Fatura
|
Invoice = 'INVOICE', // Fatura
|
||||||
Waybill = "WAYBILL", // İrsaliye
|
Waybill = 'WAYBILL', // İrsaliye
|
||||||
Receipt = "RECEIPT", // Makbuz
|
Receipt = 'RECEIPT', // Makbuz
|
||||||
Payment = "PAYMENT", // Ödeme
|
Payment = 'PAYMENT', // Ödeme
|
||||||
BankTransfer = "BANK_TRANSFER", // Banka Transferi
|
BankTransfer = 'BANK_TRANSFER', // Banka Transferi
|
||||||
CashMovement = "CASH_MOVEMENT", // Kasa Hareketi
|
CashMovement = 'CASH_MOVEMENT', // Kasa Hareketi
|
||||||
Check = "CHECK", // Çek
|
Check = 'CHECK', // Çek
|
||||||
PromissoryNote = "PROMISSORY_NOTE", // Senet
|
PromissoryNote = 'PROMISSORY_NOTE', // Senet
|
||||||
Other = "OTHER", //Diğer
|
Other = 'OTHER', //Diğer
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum InvoiceTypeEnum {
|
export enum InvoiceTypeEnum {
|
||||||
Sales = "SALES", // Satış
|
Sales = 'SALES', // Satış
|
||||||
Purchase = "PURCHASE", // Satın Alma
|
Purchase = 'PURCHASE', // Satın Alma
|
||||||
Return = "RETURN", // İade
|
Return = 'RETURN', // İade
|
||||||
Proforma = "PROFORMA", // Proforma
|
Proforma = 'PROFORMA', // Proforma
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum InvoiceStatusEnum {
|
export enum InvoiceStatusEnum {
|
||||||
Draft = "DRAFT", // Taslak
|
Draft = 'DRAFT', // Taslak
|
||||||
Sent = "SENT", // Gönderildi
|
Sent = 'SENT', // Gönderildi
|
||||||
Approved = "APPROVED", // Onaylandı
|
Approved = 'APPROVED', // Onaylandı
|
||||||
Cancelled = "CANCELLED", // İptal
|
Cancelled = 'CANCELLED', // İptal
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PaymentStatusEnum {
|
export enum PaymentStatusEnum {
|
||||||
Unpaid = "UNPAID", // Ödenmemiş
|
Unpaid = 'UNPAID', // Ödenmemiş
|
||||||
PartiallyPaid = "PARTIALLY_PAID", // Kısmen Ödenmiş
|
PartiallyPaid = 'PARTIALLY_PAID', // Kısmen Ödenmiş
|
||||||
Paid = "PAID", // Ödenmiş
|
Paid = 'PAID', // Ödenmiş
|
||||||
Overdue = "OVERDUE", // Vadesi Geçmiş
|
Overdue = 'OVERDUE', // Vadesi Geçmiş
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CashMovementTypeEnum {
|
export enum CashMovementTypeEnum {
|
||||||
Income = "INCOME", // Gelir
|
Income = 'INCOME', // Gelir
|
||||||
Expense = "EXPENSE", // Gider
|
Expense = 'EXPENSE', // Gider
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum BankAccountTypeEnum {
|
export enum BankAccountTypeEnum {
|
||||||
Current = "CURRENT", // Vadesiz
|
Current = 'CURRENT', // Vadesiz
|
||||||
Deposit = "DEPOSIT", // Vadeli
|
Deposit = 'DEPOSIT', // Vadeli
|
||||||
Credit = "CREDIT", // Kredi
|
Credit = 'CREDIT', // Kredi
|
||||||
Foreign = "FOREIGN", // Yabancı Para
|
Foreign = 'FOREIGN', // Yabancı Para
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum BankTransactionTypeEnum {
|
export enum BankTransactionTypeEnum {
|
||||||
Deposit = "DEPOSIT", // PARA YATIRMA
|
Deposit = 'DEPOSIT', // PARA YATIRMA
|
||||||
Withdrawal = "WITHDRAWAL", // PARA ÇEKME
|
Withdrawal = 'WITHDRAWAL', // PARA ÇEKME
|
||||||
Transfer = "TRANSFER", // HAVALE
|
Transfer = 'TRANSFER', // HAVALE
|
||||||
EFT = "EFT", // EFT
|
EFT = 'EFT', // EFT
|
||||||
Fee = "FEE", // MASRAF
|
Fee = 'FEE', // MASRAF
|
||||||
Interest = "INTEREST", // FAİZ
|
Interest = 'INTEREST', // FAİZ
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TransactionStatusEnum {
|
export enum TransactionStatusEnum {
|
||||||
Pending = "PENDING", // BEKLEMEDE
|
Pending = 'PENDING', // BEKLEMEDE
|
||||||
Completed = "COMPLETED", // TAMAMLANDI
|
Completed = 'COMPLETED', // TAMAMLANDI
|
||||||
Failed = "FAILED", // BAŞARISIZ
|
Failed = 'FAILED', // BAŞARISIZ
|
||||||
Cancelled = "CANCELLED", // İPTAL EDİLDİ
|
Cancelled = 'CANCELLED', // İPTAL EDİLDİ
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CheckStatusEnum {
|
export enum CheckStatusEnum {
|
||||||
InHand = "IN_HAND", // CÜZDANDA
|
InHand = 'IN_HAND', // CÜZDANDA
|
||||||
Deposited = "DEPOSITED", // HESABA YATIRILDI
|
Deposited = 'DEPOSITED', // HESABA YATIRILDI
|
||||||
Collected = "COLLECTED", // TAHSİL EDİLDİ
|
Collected = 'COLLECTED', // TAHSİL EDİLDİ
|
||||||
Bounced = "BOUNCED", // İADE OLDU
|
Bounced = 'BOUNCED', // İADE OLDU
|
||||||
Endorsed = "ENDORSED", // CIRO EDİLDİ
|
Endorsed = 'ENDORSED', // CIRO EDİLDİ
|
||||||
Cancelled = "CANCELLED", // İPTAL EDİLDİ
|
Cancelled = 'CANCELLED', // İPTAL EDİLDİ
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CheckTypeEnum {
|
export enum CheckTypeEnum {
|
||||||
Received = "RECEIVED", // ALINAN
|
Received = 'RECEIVED', // ALINAN
|
||||||
Issued = "ISSUED", // VERİLEN
|
Issued = 'ISSUED', // VERİLEN
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum NoteStatusEnum {
|
export enum NoteStatusEnum {
|
||||||
InHand = "IN_HAND", // CÜZDANDA
|
InHand = 'IN_HAND', // CÜZDANDA
|
||||||
Collected = "COLLECTED", // TAHSİL EDİLDİ
|
Collected = 'COLLECTED', // TAHSİL EDİLDİ
|
||||||
Overdue = "OVERDUE", // VADESİ GEÇMİŞ
|
Overdue = 'OVERDUE', // VADESİ GEÇMİŞ
|
||||||
Endorsed = "ENDORSED", // CIRO EDİLDİ
|
Endorsed = 'ENDORSED', // CIRO EDİLDİ
|
||||||
Cancelled = "CANCELLED", // İPTAL EDİLDİ
|
Cancelled = 'CANCELLED', // İPTAL EDİLDİ
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum NoteTypeEnum {
|
export enum NoteTypeEnum {
|
||||||
Received = "RECEIVED", // Alınan
|
Received = 'RECEIVED', // Alınan
|
||||||
Issued = "ISSUED", // Verilen
|
Issued = 'ISSUED', // Verilen
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WaybillTypeEnum {
|
export enum WaybillTypeEnum {
|
||||||
Outgoing = "outgoing", // Çıkış İrsaliyesi
|
Outgoing = 'outgoing', // Çıkış İrsaliyesi
|
||||||
Incoming = "incoming", // Giriş İrsaliyesi
|
Incoming = 'incoming', // Giriş İrsaliyesi
|
||||||
Transfer = "transfer", // Transfer İrsaliyesi
|
Transfer = 'transfer', // Transfer İrsaliyesi
|
||||||
Return = "return", // İade İrsaliyesi
|
Return = 'return', // İade İrsaliyesi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WaybillStatusEnum {
|
export enum WaybillStatusEnum {
|
||||||
Draft = "draft", // Taslak
|
Draft = 'draft', // Taslak
|
||||||
Confirmed = "confirmed", // Onaylandı
|
Confirmed = 'confirmed', // Onaylandı
|
||||||
Delivered = "delivered", // Teslim Edildi
|
Delivered = 'delivered', // Teslim Edildi
|
||||||
Cancelled = "cancelled", // İptal
|
Cancelled = 'cancelled', // İptal
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PaymentMethodEnum {
|
export enum PaymentMethodEnum {
|
||||||
Cash = "cash", // Nakit
|
Cash = 'cash', // Nakit
|
||||||
BankTransfer = "bank_transfer", // Banka Transferi
|
BankTransfer = 'bank_transfer', // Banka Transferi
|
||||||
CreditCard = "credit_card", // Kredi Kartı
|
CreditCard = 'credit_card', // Kredi Kartı
|
||||||
Check = "check", // Çek
|
Check = 'check', // Çek
|
||||||
PromissoryNote = "promissory_note", // Senet
|
PromissoryNote = 'promissory_note', // Senet
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1230
ui/src/types/hr.ts
1230
ui/src/types/hr.ts
File diff suppressed because it is too large
Load diff
1163
ui/src/types/mm.ts
1163
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 { PmWorkCenter, WorkOrderStatusEnum } from './pm'
|
||||||
import {
|
import { MmMaterial, MmMaterialSupplier, QualityResultEnumEnum, QualityStatusEnum } from './mm'
|
||||||
MmMaterial,
|
import { PriorityEnum } from './common'
|
||||||
MmMaterialSupplier,
|
import { CrmSalesOrder } from './crm'
|
||||||
QualityResultEnumEnum,
|
|
||||||
QualityStatusEnum,
|
|
||||||
} from "./mm";
|
|
||||||
import { PriorityEnum } from "./common";
|
|
||||||
import { CrmSalesOrder } from "./crm";
|
|
||||||
|
|
||||||
export interface MrpProductionOrder {
|
export interface MrpProductionOrder {
|
||||||
// Üretim Emri
|
// Üretim Emri
|
||||||
id: string;
|
id: string
|
||||||
orderNumber: string;
|
orderNumber: string
|
||||||
orderType: ProductionOrderTypeEnum;
|
orderType: ProductionOrderTypeEnum
|
||||||
customerRequirement?: string;
|
customerRequirement?: string
|
||||||
plannedStartDate: Date;
|
plannedStartDate: Date
|
||||||
plannedEndDate: Date;
|
plannedEndDate: Date
|
||||||
actualStartDate?: Date;
|
actualStartDate?: Date
|
||||||
actualEndDate?: Date;
|
actualEndDate?: Date
|
||||||
status: ProductionOrderStatusEnum;
|
status: ProductionOrderStatusEnum
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
plannedQuantity: number; //Planlanan Miktar
|
plannedQuantity: number //Planlanan Miktar
|
||||||
confirmedQuantity: number; //Üretilen Miktar
|
confirmedQuantity: number //Üretilen Miktar
|
||||||
requiredQuantity: number; //Gereken Miktar
|
requiredQuantity: number //Gereken Miktar
|
||||||
scrapQuantity: number; //Fire
|
scrapQuantity: number //Fire
|
||||||
unitId: string;
|
unitId: string
|
||||||
plannedCost: number;
|
plannedCost: number
|
||||||
actualCost: number;
|
actualCost: number
|
||||||
currency: string;
|
currency: string
|
||||||
materials: MrpProductionOrderMaterial[];
|
materials: MrpProductionOrderMaterial[]
|
||||||
workOrders: MrpWorkOrder[];
|
workOrders: MrpWorkOrder[]
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpProductionOrderMaterial {
|
export interface MrpProductionOrderMaterial {
|
||||||
// Üretim Emri Malzemesi
|
// Üretim Emri Malzemesi
|
||||||
id: string;
|
id: string
|
||||||
productionOrderId: string;
|
productionOrderId: string
|
||||||
salesOrderId?: string;
|
salesOrderId?: string
|
||||||
salesOrder?: CrmSalesOrder;
|
salesOrder?: CrmSalesOrder
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
customerRequirement?: string;
|
customerRequirement?: string
|
||||||
plannedQuantity: number; //Planlanan Miktar
|
plannedQuantity: number //Planlanan Miktar
|
||||||
confirmedQuantity: number; //Üretilen Miktar
|
confirmedQuantity: number //Üretilen Miktar
|
||||||
requiredQuantity: number; //Gereken Miktar
|
requiredQuantity: number //Gereken Miktar
|
||||||
scrapQuantity: number; //Fire
|
scrapQuantity: number //Fire
|
||||||
unitId: string;
|
unitId: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpWorkOrder {
|
export interface MrpWorkOrder {
|
||||||
// İş Emri
|
// İş Emri
|
||||||
id: string;
|
id: string
|
||||||
workOrderNumber: string;
|
workOrderNumber: string
|
||||||
productionOrderId: string;
|
productionOrderId: string
|
||||||
productionOrder?: MrpProductionOrder;
|
productionOrder?: MrpProductionOrder
|
||||||
operationId: string;
|
operationId: string
|
||||||
operation?: MrpOperation;
|
operation?: MrpOperation
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
sequence: number;
|
sequence: number
|
||||||
plannedStartDate: Date;
|
plannedStartDate: Date
|
||||||
plannedEndDate: Date;
|
plannedEndDate: Date
|
||||||
actualStartDate?: Date;
|
actualStartDate?: Date
|
||||||
actualEndDate?: Date;
|
actualEndDate?: Date
|
||||||
plannedQuantity: number;
|
plannedQuantity: number
|
||||||
confirmedQuantity: number;
|
confirmedQuantity: number
|
||||||
scrapQuantity: number;
|
scrapQuantity: number
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workCenter?: PmWorkCenter;
|
workCenter?: PmWorkCenter
|
||||||
assignedOperators: string[];
|
assignedOperators: string[]
|
||||||
setupTime: number; // minutes
|
setupTime: number // minutes
|
||||||
processTime: number; // minutes
|
processTime: number // minutes
|
||||||
actualSetupTime?: number;
|
actualSetupTime?: number
|
||||||
actualProcessTime?: number;
|
actualProcessTime?: number
|
||||||
status: WorkOrderStatusEnum;
|
status: WorkOrderStatusEnum
|
||||||
confirmations: MrpWorkOrderConfirmation[];
|
confirmations: MrpWorkOrderConfirmation[]
|
||||||
qualityChecks: MrpWorkOrderQualityCheck[];
|
qualityChecks: MrpWorkOrderQualityCheck[]
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpWorkOrderConfirmation {
|
export interface MrpWorkOrderConfirmation {
|
||||||
// İş Emri Onayı
|
// İş Emri Onayı
|
||||||
id: string;
|
id: string
|
||||||
workOrderId: string;
|
workOrderId: string
|
||||||
confirmationDate: Date;
|
confirmationDate: Date
|
||||||
confirmedQuantity: number;
|
confirmedQuantity: number
|
||||||
scrapQuantity: number;
|
scrapQuantity: number
|
||||||
actualSetupTime: number;
|
actualSetupTime: number
|
||||||
actualProcessTime: number;
|
actualProcessTime: number
|
||||||
confirmedBy: string;
|
confirmedBy: string
|
||||||
notes?: string;
|
notes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpWorkOrderQualityCheck {
|
export interface MrpWorkOrderQualityCheck {
|
||||||
// Kalite Kontrol
|
// Kalite Kontrol
|
||||||
id: string;
|
id: string
|
||||||
checkNumber: string;
|
checkNumber: string
|
||||||
workOrderId?: string;
|
workOrderId?: string
|
||||||
productionOrderId?: string;
|
productionOrderId?: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
checkType: QualityCheckTypeEnum;
|
checkType: QualityCheckTypeEnum
|
||||||
checkDate: Date;
|
checkDate: Date
|
||||||
checkedBy: string;
|
checkedBy: string
|
||||||
status: QualityStatusEnum;
|
status: QualityStatusEnum
|
||||||
overallResult: QualityResultEnumEnum;
|
overallResult: QualityResultEnumEnum
|
||||||
checkpoints: MrpWorkOrderQualityCheckpoint[];
|
checkpoints: MrpWorkOrderQualityCheckpoint[]
|
||||||
nonConformanceActions: MrpNonConformanceAction[];
|
nonConformanceActions: MrpNonConformanceAction[]
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpWorkOrderQualityCheckpoint {
|
export interface MrpWorkOrderQualityCheckpoint {
|
||||||
// Kalite Kontrol Noktası
|
// Kalite Kontrol Noktası
|
||||||
id: string;
|
id: string
|
||||||
qualityCheckId: string;
|
qualityCheckId: string
|
||||||
checkpointName: string;
|
checkpointName: string
|
||||||
specification: string;
|
specification: string
|
||||||
measuredValue: string;
|
measuredValue: string
|
||||||
result: QualityResultEnumEnum;
|
result: QualityResultEnumEnum
|
||||||
notes?: string;
|
notes?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpNonConformanceAction {
|
export interface MrpNonConformanceAction {
|
||||||
// Uygunsuzluk Eylemi
|
// Uygunsuzluk Eylemi
|
||||||
id: string;
|
id: string
|
||||||
qualityCheckId: string;
|
qualityCheckId: string
|
||||||
actionType: NonConformanceActionTypeEnum;
|
actionType: NonConformanceActionTypeEnum
|
||||||
description: string;
|
description: string
|
||||||
assignedTo: string;
|
assignedTo: string
|
||||||
dueDate: Date;
|
dueDate: Date
|
||||||
status: ActionStatusEnum;
|
status: ActionStatusEnum
|
||||||
completedDate?: Date;
|
completedDate?: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpMaterialRequirement {
|
export interface MrpMaterialRequirement {
|
||||||
// Malzeme Gereksinimi
|
// Malzeme Gereksinimi
|
||||||
id: string;
|
id: string
|
||||||
mrpRunId: string;
|
mrpRunId: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
grossRequirement: number;
|
grossRequirement: number
|
||||||
scheduledReceipts: number;
|
scheduledReceipts: number
|
||||||
projectedAvailable: number;
|
projectedAvailable: number
|
||||||
netRequirement: number;
|
netRequirement: number
|
||||||
plannedOrderReceipt: number;
|
plannedOrderReceipt: number
|
||||||
plannedOrderRelease: number;
|
plannedOrderRelease: number
|
||||||
requirementDate: Date;
|
requirementDate: Date
|
||||||
plannedReceiptDate: Date;
|
plannedReceiptDate: Date
|
||||||
plannedReleaseDate: Date;
|
plannedReleaseDate: Date
|
||||||
sourceType: RequirementSourceTypeEnum;
|
sourceType: RequirementSourceTypeEnum
|
||||||
sourceDocumentId?: string;
|
sourceDocumentId?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpRecommendation {
|
export interface MrpRecommendation {
|
||||||
// Tavsiye
|
// Tavsiye
|
||||||
id: string;
|
id: string
|
||||||
mrpRunId: string;
|
mrpRunId: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
recommendationType: RecommendationTypeEnum;
|
recommendationType: RecommendationTypeEnum
|
||||||
recommendedAction: string;
|
recommendedAction: string
|
||||||
quantity: number;
|
quantity: number
|
||||||
dueDate: Date;
|
dueDate: Date
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
reason: string;
|
reason: string
|
||||||
status: RecommendationStatusEnum;
|
status: RecommendationStatusEnum
|
||||||
implementedDate?: Date;
|
implementedDate?: Date
|
||||||
implementedBy?: string;
|
implementedBy?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpDemandForecast {
|
export interface MrpDemandForecast {
|
||||||
// Talep Tahmini
|
// Talep Tahmini
|
||||||
id: string;
|
id: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
forecastPeriod: string;
|
forecastPeriod: string
|
||||||
startDate: Date;
|
startDate: Date
|
||||||
endDate: Date;
|
endDate: Date
|
||||||
forecastMethod: ForecastMethodEnum;
|
forecastMethod: ForecastMethodEnum
|
||||||
forecastQuantity: number;
|
forecastQuantity: number
|
||||||
actualQuantity?: number;
|
actualQuantity?: number
|
||||||
accuracy?: number;
|
accuracy?: number
|
||||||
seasonalityFactor?: number;
|
seasonalityFactor?: number
|
||||||
trendFactor?: number;
|
trendFactor?: number
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
notes: string;
|
notes: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpPurchaseSuggestion extends MrpRecommendation {
|
export interface MrpPurchaseSuggestion extends MrpRecommendation {
|
||||||
// Satınalma Tavsiyesi
|
// Satınalma Tavsiyesi
|
||||||
supplierId: string;
|
supplierId: string
|
||||||
supplier?: MmMaterialSupplier;
|
supplier?: MmMaterialSupplier
|
||||||
estimatedCost: number;
|
estimatedCost: number
|
||||||
leadTime: number;
|
leadTime: number
|
||||||
minimumOrderQuantity: number;
|
minimumOrderQuantity: number
|
||||||
suggestedQuantity: number;
|
suggestedQuantity: number
|
||||||
economicOrderQuantity: number;
|
economicOrderQuantity: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpProductionSuggestion extends MrpRecommendation {
|
export interface MrpProductionSuggestion extends MrpRecommendation {
|
||||||
// Üretim Tavsiyesi
|
// Üretim Tavsiyesi
|
||||||
estimatedDuration: number; // in hours
|
estimatedDuration: number // in hours
|
||||||
resourceRequirements: {
|
resourceRequirements: {
|
||||||
workCenter: string;
|
workCenter: string
|
||||||
capacity: number;
|
capacity: number
|
||||||
efficiency: number;
|
efficiency: number
|
||||||
}[];
|
}[]
|
||||||
bom?: {
|
bom?: {
|
||||||
id: string;
|
id: string
|
||||||
version: string;
|
version: string
|
||||||
materialCount: number;
|
materialCount: number
|
||||||
totalCost: number;
|
totalCost: number
|
||||||
};
|
}
|
||||||
productionCost: number;
|
productionCost: number
|
||||||
setupTime: number;
|
setupTime: number
|
||||||
cycleTime: number;
|
cycleTime: number
|
||||||
suggestedStartDate: string;
|
suggestedStartDate: string
|
||||||
suggestedCompletionDate: string;
|
suggestedCompletionDate: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpOperationTypeDefinition {
|
export interface MrpOperationTypeDefinition {
|
||||||
// Operasyon Türü Tanımı
|
// Operasyon Türü Tanımı
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
category: OperationCategoryEnum;
|
category: OperationCategoryEnum
|
||||||
defaultDuration: number;
|
defaultDuration: number
|
||||||
requiresSetup: boolean;
|
requiresSetup: boolean
|
||||||
allowsParallelOperation: boolean;
|
allowsParallelOperation: boolean
|
||||||
qualityCheckRequired: boolean;
|
qualityCheckRequired: boolean
|
||||||
skillLevelRequired: number;
|
skillLevelRequired: number
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpOperation {
|
export interface MrpOperation {
|
||||||
// Operasyon
|
// Operasyon
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
operationTypeId?: string;
|
operationTypeId?: string
|
||||||
operationType?: MrpOperationTypeDefinition;
|
operationType?: MrpOperationTypeDefinition
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workCenter?: PmWorkCenter;
|
workCenter?: PmWorkCenter
|
||||||
standardTime: number; // minutes
|
standardTime: number // minutes
|
||||||
setupTime: number; // minutes
|
setupTime: number // minutes
|
||||||
laborCost: number;
|
laborCost: number
|
||||||
machineCost: number;
|
machineCost: number
|
||||||
overheadCost: number;
|
overheadCost: number
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
instructions?: string;
|
instructions?: string
|
||||||
qualityCheckRequired: boolean;
|
qualityCheckRequired: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpBOM {
|
export interface MrpBOM {
|
||||||
// Malzeme Listesi (BOM)
|
// Malzeme Listesi (BOM)
|
||||||
id: string;
|
id: string
|
||||||
bomCode: string;
|
bomCode: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
version: string;
|
version: string
|
||||||
validFrom: Date;
|
validFrom: Date
|
||||||
validTo?: Date;
|
validTo?: Date
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
bomType: BOMTypeEnum;
|
bomType: BOMTypeEnum
|
||||||
baseQuantity: number;
|
baseQuantity: number
|
||||||
components: MrpBOMComponent[];
|
components: MrpBOMComponent[]
|
||||||
operations: MrpBOMOperation[];
|
operations: MrpBOMOperation[]
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpBOMComponent {
|
export interface MrpBOMComponent {
|
||||||
// BOM Bileşeni
|
// BOM Bileşeni
|
||||||
id: string;
|
id: string
|
||||||
bomId: string;
|
bomId: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
quantity: number;
|
quantity: number
|
||||||
unitId: string;
|
unitId: string
|
||||||
scrapPercentage: number;
|
scrapPercentage: number
|
||||||
isPhantom: boolean;
|
isPhantom: boolean
|
||||||
position: number;
|
position: number
|
||||||
validFrom: Date;
|
validFrom: Date
|
||||||
validTo?: Date;
|
validTo?: Date
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpBOMOperation {
|
export interface MrpBOMOperation {
|
||||||
// BOM Operasyonu
|
// BOM Operasyonu
|
||||||
id: string;
|
id: string
|
||||||
bomId: string;
|
bomId: string
|
||||||
operationId: string;
|
operationId: string
|
||||||
operation?: MrpOperation;
|
operation?: MrpOperation
|
||||||
sequence: number;
|
sequence: number
|
||||||
setupTime: number;
|
setupTime: number
|
||||||
runTime: number;
|
runTime: number
|
||||||
waitTime: number;
|
waitTime: number
|
||||||
queueTime: number;
|
queueTime: number
|
||||||
moveTime: number;
|
moveTime: number
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workCenter?: PmWorkCenter;
|
workCenter?: PmWorkCenter
|
||||||
isParallel: boolean;
|
isParallel: boolean
|
||||||
prerequisites: string[];
|
prerequisites: string[]
|
||||||
qualityChecks: MrpBOMQualityCheck[];
|
qualityChecks: MrpBOMQualityCheck[]
|
||||||
tools: MrpToolRequirement[];
|
tools: MrpToolRequirement[]
|
||||||
skills: MrpSkillRequirement[];
|
skills: MrpSkillRequirement[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpBOMQualityCheck {
|
export interface MrpBOMQualityCheck {
|
||||||
// Kalite Kontrol Noktası
|
// Kalite Kontrol Noktası
|
||||||
id: string;
|
id: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
checkType: QualityCheckTypeEnum;
|
checkType: QualityCheckTypeEnum
|
||||||
parameter: string;
|
parameter: string
|
||||||
minValue?: number;
|
minValue?: number
|
||||||
maxValue?: number;
|
maxValue?: number
|
||||||
targetValue?: number;
|
targetValue?: number
|
||||||
tolerance?: number;
|
tolerance?: number
|
||||||
isRequired: boolean;
|
isRequired: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpToolRequirement {
|
export interface MrpToolRequirement {
|
||||||
// Araç Gereksinimi
|
// Araç Gereksinimi
|
||||||
id: string;
|
id: string
|
||||||
toolId: string;
|
toolId: string
|
||||||
toolName: string;
|
toolName: string
|
||||||
quantity: number;
|
quantity: number
|
||||||
isRequired: boolean;
|
isRequired: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MrpSkillRequirement {
|
export interface MrpSkillRequirement {
|
||||||
// Beceri Gereksinimi
|
// Beceri Gereksinimi
|
||||||
id: string;
|
id: string
|
||||||
skillName: string;
|
skillName: string
|
||||||
level: number;
|
level: number
|
||||||
isRequired: boolean;
|
isRequired: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ProductionOrderTypeEnum { // Üretim Emri Türü
|
export enum ProductionOrderTypeEnum {
|
||||||
Standard = "STANDARD", // Standart üretim emri
|
// Üretim Emri Türü
|
||||||
Rework = "REWORK", // Yeniden işleme emri
|
Standard = 'STANDARD', // Standart üretim emri
|
||||||
Maintenance = "MAINTENANCE", // Bakım emri
|
Rework = 'REWORK', // Yeniden işleme emri
|
||||||
Sample = "SAMPLE", // Numune üretim emri
|
Maintenance = 'MAINTENANCE', // Bakım emri
|
||||||
|
Sample = 'SAMPLE', // Numune üretim emri
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ProductionOrderStatusEnum { // Üretim Emri Durumu
|
export enum ProductionOrderStatusEnum {
|
||||||
Created = "CREATED", // Oluşturuldu
|
// Üretim Emri Durumu
|
||||||
Released = "RELEASED", // Serbest bırakıldı
|
Created = 'CREATED', // Oluşturuldu
|
||||||
InProgress = "IN_PROGRESS", // İşlemde
|
Released = 'RELEASED', // Serbest bırakıldı
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
InProgress = 'IN_PROGRESS', // İşlemde
|
||||||
Cancelled = "CANCELLED", // İptal edildi
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
OnHold = "ON_HOLD", // Beklemede
|
Cancelled = 'CANCELLED', // İptal edildi
|
||||||
|
OnHold = 'ON_HOLD', // Beklemede
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum QualityCheckTypeEnum { // Kalite Kontrol Türü
|
export enum QualityCheckTypeEnum {
|
||||||
Incoming = "INCOMING", // Giriş
|
// Kalite Kontrol Türü
|
||||||
InProcess = "IN_PROCESS", // Süreç içi
|
Incoming = 'INCOMING', // Giriş
|
||||||
Final = "FINAL", // Nihai
|
InProcess = 'IN_PROCESS', // Süreç içi
|
||||||
Random = "RANDOM", // Rastgele
|
Final = 'FINAL', // Nihai
|
||||||
Dimensional = "DIMENSIONAL", // Boyutsal
|
Random = 'RANDOM', // Rastgele
|
||||||
Visual = "VISUAL", // Görsel
|
Dimensional = 'DIMENSIONAL', // Boyutsal
|
||||||
Functional = "FUNCTIONAL", // Fonksiyonel
|
Visual = 'VISUAL', // Görsel
|
||||||
Material = "MATERIAL", // Malzeme
|
Functional = 'FUNCTIONAL', // Fonksiyonel
|
||||||
Electrical = "ELECTRICAL", // Elektriksel
|
Material = 'MATERIAL', // Malzeme
|
||||||
|
Electrical = 'ELECTRICAL', // Elektriksel
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum NonConformanceActionTypeEnum { // Uygunsuzluk Eylem Türü
|
export enum NonConformanceActionTypeEnum {
|
||||||
Rework = "REWORK", // Yeniden işleme
|
// Uygunsuzluk Eylem Türü
|
||||||
Scrap = "SCRAP", // Hurda
|
Rework = 'REWORK', // Yeniden işleme
|
||||||
UseAsIs = "USE_AS_IS", // Olduğu gibi kullan
|
Scrap = 'SCRAP', // Hurda
|
||||||
Return = "RETURN", // İade et
|
UseAsIs = 'USE_AS_IS', // Olduğu gibi kullan
|
||||||
|
Return = 'RETURN', // İade et
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ActionStatusEnum { // Eylem Durumu
|
export enum ActionStatusEnum {
|
||||||
Open = "OPEN", // Açık
|
// Eylem Durumu
|
||||||
InProgress = "IN_PROGRESS", // İşlemde
|
Open = 'OPEN', // Açık
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
InProgress = 'IN_PROGRESS', // İşlemde
|
||||||
Cancelled = "CANCELLED", // İptal edildi
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
|
Cancelled = 'CANCELLED', // İptal edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RequirementSourceTypeEnum { // Gereksinim Kaynak Türü
|
export enum RequirementSourceTypeEnum {
|
||||||
SalesOrder = "SALES_ORDER", // Satış Siparişi
|
// Gereksinim Kaynak Türü
|
||||||
Forecast = "FORECAST", // Tahmin
|
SalesOrder = 'SALES_ORDER', // Satış Siparişi
|
||||||
SafetyStock = "SAFETY_STOCK", // Güvenlik Stoku
|
Forecast = 'FORECAST', // Tahmin
|
||||||
ProductionOrder = "PRODUCTION_ORDER", // Üretim Emri
|
SafetyStock = 'SAFETY_STOCK', // Güvenlik Stoku
|
||||||
|
ProductionOrder = 'PRODUCTION_ORDER', // Üretim Emri
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RecommendationTypeEnum { // Tavsiye Türü
|
export enum RecommendationTypeEnum {
|
||||||
PlannedOrder = "PLANNED_ORDER", // Planlanan Sipariş
|
// Tavsiye Türü
|
||||||
PurchaseRequisition = "PURCHASE_REQUISITION", // Satınalma Talebi
|
PlannedOrder = 'PLANNED_ORDER', // Planlanan Sipariş
|
||||||
Reschedule = "RESCHEDULE", // Yeniden Planla
|
PurchaseRequisition = 'PURCHASE_REQUISITION', // Satınalma Talebi
|
||||||
Cancel = "CANCEL", // İptal Et
|
Reschedule = 'RESCHEDULE', // Yeniden Planla
|
||||||
|
Cancel = 'CANCEL', // İptal Et
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RecommendationStatusEnum { // Tavsiye Durumu
|
export enum RecommendationStatusEnum {
|
||||||
Open = "OPEN", // Açık
|
// Tavsiye Durumu
|
||||||
Implemented = "IMPLEMENTED", // Uygulandı
|
Open = 'OPEN', // Açık
|
||||||
Rejected = "REJECTED", // Reddedildi
|
Implemented = 'IMPLEMENTED', // Uygulandı
|
||||||
Expired = "EXPIRED", // Süresi Doldu
|
Rejected = 'REJECTED', // Reddedildi
|
||||||
|
Expired = 'EXPIRED', // Süresi Doldu
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ForecastMethodEnum { // Tahmin Yöntemi
|
export enum ForecastMethodEnum {
|
||||||
MovingAverage = "MOVING_AVERAGE", // Hareketli Ortalama
|
// Tahmin Yöntemi
|
||||||
ExponentialSmoothing = "EXPONENTIAL_SMOOTHING", // Üstel Yumuşatma
|
MovingAverage = 'MOVING_AVERAGE', // Hareketli Ortalama
|
||||||
LinearRegression = "LINEAR_REGRESSION", // Doğrusal Regresyon
|
ExponentialSmoothing = 'EXPONENTIAL_SMOOTHING', // Üstel Yumuşatma
|
||||||
Seasonal = "SEASONAL", // Mevsimsel
|
LinearRegression = 'LINEAR_REGRESSION', // Doğrusal Regresyon
|
||||||
|
Seasonal = 'SEASONAL', // Mevsimsel
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SecurityLevelEnum { // Güvenlik Seviyesi
|
export enum SecurityLevelEnum {
|
||||||
Low = "LOW", // Düşük
|
// Güvenlik Seviyesi
|
||||||
Medium = "MEDIUM", // Orta
|
Low = 'LOW', // Düşük
|
||||||
High = "HIGH", // Yüksek
|
Medium = 'MEDIUM', // Orta
|
||||||
Restricted = "RESTRICTED", // Kısıtlı
|
High = 'HIGH', // Yüksek
|
||||||
|
Restricted = 'RESTRICTED', // Kısıtlı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum BOMTypeEnum { // BOM Türü
|
export enum BOMTypeEnum {
|
||||||
Production = "PROD", // Üretim
|
// BOM Türü
|
||||||
Engineering = "ENG", // Mühendislik
|
Production = 'PROD', // Üretim
|
||||||
Planning = "PLAN", // Planlama
|
Engineering = 'ENG', // Mühendislik
|
||||||
Costing = "COST", // Maliyetlendirme
|
Planning = 'PLAN', // Planlama
|
||||||
|
Costing = 'COST', // Maliyetlendirme
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RoutingStatusEnum { // Rota Durumu
|
export enum RoutingStatusEnum {
|
||||||
Draft = "DRAFT", // Taslak
|
// Rota Durumu
|
||||||
Active = "ACTIVE", // Aktif
|
Draft = 'DRAFT', // Taslak
|
||||||
Inactive = "INACTIVE", // Pasif
|
Active = 'ACTIVE', // Aktif
|
||||||
Obsolete = "OBSOLETE", // Kullanım dışı
|
Inactive = 'INACTIVE', // Pasif
|
||||||
|
Obsolete = 'OBSOLETE', // Kullanım dışı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum OperationCategoryEnum { // Operasyon Kategorisi
|
export enum OperationCategoryEnum {
|
||||||
Production = "PROD", // Üretim
|
// Operasyon Kategorisi
|
||||||
Assembly = "ASSY", // Montaj
|
Production = 'PROD', // Üretim
|
||||||
Inspection = "INSP", // Muayene
|
Assembly = 'ASSY', // Montaj
|
||||||
Packaging = "PACK", // Ambalajlama
|
Inspection = 'INSP', // Muayene
|
||||||
Setup = "SETUP", // Kurulum
|
Packaging = 'PACK', // Ambalajlama
|
||||||
Maintenance = "MAINT", // Bakım
|
Setup = 'SETUP', // Kurulum
|
||||||
Transport = "TRANS", // Taşıma
|
Maintenance = 'MAINT', // Bakım
|
||||||
Quality = "QUAL", // Kalite
|
Transport = 'TRANS', // Taşıma
|
||||||
|
Quality = 'QUAL', // Kalite
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,278 +1,287 @@
|
||||||
import { PriorityEnum } from "./common";
|
import { PriorityEnum } from './common'
|
||||||
import { HrDepartment } from "./hr";
|
import { HrDepartment } from './hr'
|
||||||
import { MmMaterial } from "./mm";
|
import { MmMaterial } from './mm'
|
||||||
|
|
||||||
export type CalendarView = "month" | "week" | "day";
|
export type CalendarView = 'month' | 'week' | 'day'
|
||||||
|
|
||||||
export interface PmWorkCenter {
|
export interface PmWorkCenter {
|
||||||
// İş Merkezi / Ekipman
|
// İş Merkezi / Ekipman
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workCenterType?: PmWorkCenterType;
|
workCenterType?: PmWorkCenterType
|
||||||
manufacturer?: string;
|
manufacturer?: string
|
||||||
model?: string;
|
model?: string
|
||||||
serialNumber?: string;
|
serialNumber?: string
|
||||||
installationDate: Date;
|
installationDate: Date
|
||||||
warrantyExpiry?: Date;
|
warrantyExpiry?: Date
|
||||||
location: string;
|
location: string
|
||||||
departmentId: string;
|
departmentId: string
|
||||||
department?: HrDepartment;
|
department?: HrDepartment
|
||||||
status: WorkCenterStatusEnum;
|
status: WorkCenterStatusEnum
|
||||||
criticality: CriticalityLevelEnum;
|
criticality: CriticalityLevelEnum
|
||||||
specifications: PmWorkCenterSpecification[];
|
specifications: PmWorkCenterSpecification[]
|
||||||
maintenancePlans: PmMaintenancePlan[];
|
maintenancePlans: PmMaintenancePlan[]
|
||||||
workOrders: PmMaintenanceWorkOrder[];
|
workOrders: PmMaintenanceWorkOrder[]
|
||||||
downTimeHistory: PmDownTimeRecord[];
|
downTimeHistory: PmDownTimeRecord[]
|
||||||
capacity: number;
|
capacity: number
|
||||||
costPerHour: number;
|
costPerHour: number
|
||||||
setupTime: number;
|
setupTime: number
|
||||||
machineType: string;
|
machineType: string
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmWorkCenterType {
|
export interface PmWorkCenterType {
|
||||||
// İş Merkezi / Ekipman Türü
|
// İş Merkezi / Ekipman Türü
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
category: string;
|
category: string
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmWorkCenterSpecification {
|
export interface PmWorkCenterSpecification {
|
||||||
// İş Merkezi / Ekipman Özelliği
|
// İş Merkezi / Ekipman Özelliği
|
||||||
id: string;
|
id: string
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
specificationName: string;
|
specificationName: string
|
||||||
specificationValue: string;
|
specificationValue: string
|
||||||
unit?: string;
|
unit?: string
|
||||||
isRequired: boolean;
|
isRequired: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmMaintenancePlan {
|
export interface PmMaintenancePlan {
|
||||||
// Bakım Planı
|
// Bakım Planı
|
||||||
id: string;
|
id: string
|
||||||
planCode: string;
|
planCode: string
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workCenter?: PmWorkCenter;
|
workCenter?: PmWorkCenter
|
||||||
planType: MaintenancePlanTypeEnum;
|
planType: MaintenancePlanTypeEnum
|
||||||
description: string;
|
description: string
|
||||||
frequency: number;
|
frequency: number
|
||||||
frequencyUnit: FrequencyUnitEnum;
|
frequencyUnit: FrequencyUnitEnum
|
||||||
estimatedDuration: number; // minutes
|
estimatedDuration: number // minutes
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
maintenanceTeamId?: string;
|
maintenanceTeamId?: string
|
||||||
instructions?: string;
|
instructions?: string
|
||||||
requiredMaterials: PmPlanMaterial[];
|
requiredMaterials: PmPlanMaterial[]
|
||||||
requiredSkills: string[];
|
requiredSkills: string[]
|
||||||
lastExecuted?: Date;
|
lastExecuted?: Date
|
||||||
nextDue: Date;
|
nextDue: Date
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmPlanMaterial {
|
export interface PmPlanMaterial {
|
||||||
// Bakım Planı İçin Gerekli Malzeme
|
// Bakım Planı İçin Gerekli Malzeme
|
||||||
id: string;
|
id: string
|
||||||
planId: string;
|
planId: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
quantity: number;
|
quantity: number
|
||||||
unitId: string;
|
unitId: string
|
||||||
isRequired: boolean;
|
isRequired: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmMaintenanceWorkOrder {
|
export interface PmMaintenanceWorkOrder {
|
||||||
// Bakım İş Emri
|
// Bakım İş Emri
|
||||||
id: string;
|
id: string
|
||||||
workOrderNumber: string;
|
workOrderNumber: string
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workCenter?: PmWorkCenter;
|
workCenter?: PmWorkCenter
|
||||||
planId?: string;
|
planId?: string
|
||||||
plan?: PmMaintenancePlan;
|
plan?: PmMaintenancePlan
|
||||||
orderType: WorkOrderTypeEnum;
|
orderType: WorkOrderTypeEnum
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
status: WorkOrderStatusEnum;
|
status: WorkOrderStatusEnum
|
||||||
description: string;
|
description: string
|
||||||
reportedBy: string;
|
reportedBy: string
|
||||||
assignedTo?: string;
|
assignedTo?: string
|
||||||
maintenanceTeamId?: string;
|
maintenanceTeamId?: string
|
||||||
scheduledStart?: Date;
|
scheduledStart?: Date
|
||||||
scheduledEnd?: Date;
|
scheduledEnd?: Date
|
||||||
actualStart?: Date;
|
actualStart?: Date
|
||||||
actualEnd?: Date;
|
actualEnd?: Date
|
||||||
estimatedCost: number;
|
estimatedCost: number
|
||||||
actualCost: number;
|
actualCost: number
|
||||||
materials: PmWorkOrderMaterial[];
|
materials: PmWorkOrderMaterial[]
|
||||||
activities: PmWorkOrderActivity[];
|
activities: PmWorkOrderActivity[]
|
||||||
notes?: string;
|
notes?: string
|
||||||
completionNotes?: string;
|
completionNotes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmWorkOrderMaterial {
|
export interface PmWorkOrderMaterial {
|
||||||
// Bakım İş Emri İçin Kullanılan Malzeme
|
// Bakım İş Emri İçin Kullanılan Malzeme
|
||||||
id: string;
|
id: string
|
||||||
workOrderId: string;
|
workOrderId: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
materialCode?: string;
|
materialCode?: string
|
||||||
materialName?: string;
|
materialName?: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
plannedQuantity: number;
|
plannedQuantity: number
|
||||||
actualQuantity: number;
|
actualQuantity: number
|
||||||
unitCost: number;
|
unitCost: number
|
||||||
totalCost: number;
|
totalCost: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmWorkOrderActivity {
|
export interface PmWorkOrderActivity {
|
||||||
// Bakım İş Emri Faaliyeti
|
// Bakım İş Emri Faaliyeti
|
||||||
id: string;
|
id: string
|
||||||
workOrderId: string;
|
workOrderId: string
|
||||||
activityDescription: string;
|
activityDescription: string
|
||||||
plannedDuration: number;
|
plannedDuration: number
|
||||||
actualDuration: number;
|
actualDuration: number
|
||||||
performedBy: string;
|
performedBy: string
|
||||||
completedAt?: Date;
|
completedAt?: Date
|
||||||
notes?: string;
|
notes?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmDownTimeRecord {
|
export interface PmDownTimeRecord {
|
||||||
// İş Merkezi / Ekipman Arıza Süreç Kaydı
|
// İş Merkezi / Ekipman Arıza Süreç Kaydı
|
||||||
id: string;
|
id: string
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workOrderId?: string;
|
workOrderId?: string
|
||||||
downTimeStart: Date;
|
downTimeStart: Date
|
||||||
downTimeEnd?: Date;
|
downTimeEnd?: Date
|
||||||
duration?: number; // minutes
|
duration?: number // minutes
|
||||||
reason: string;
|
reason: string
|
||||||
impact: DownTimeImpactEnum;
|
impact: DownTimeImpactEnum
|
||||||
cost: number;
|
cost: number
|
||||||
description?: string;
|
description?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmFaultNotification {
|
export interface PmFaultNotification {
|
||||||
// Arıza Bildirimi
|
// Arıza Bildirimi
|
||||||
id: string;
|
id: string
|
||||||
notificationCode: string;
|
notificationCode: string
|
||||||
workCenterId: string;
|
workCenterId: string
|
||||||
workCenter: PmWorkCenter;
|
workCenter: PmWorkCenter
|
||||||
location: string;
|
location: string
|
||||||
faultType: FaultTypeEnum;
|
faultType: FaultTypeEnum
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
severity: CriticalityLevelEnum;
|
severity: CriticalityLevelEnum
|
||||||
title: string;
|
title: string
|
||||||
description: string;
|
description: string
|
||||||
reportedBy: string;
|
reportedBy: string
|
||||||
reportedAt: Date;
|
reportedAt: Date
|
||||||
assignedTo?: string;
|
assignedTo?: string
|
||||||
status: NotificationStatusEnum;
|
status: NotificationStatusEnum
|
||||||
images?: string[];
|
images?: string[]
|
||||||
estimatedRepairTime?: number; // minutes
|
estimatedRepairTime?: number // minutes
|
||||||
actualRepairTime?: number; // minutes
|
actualRepairTime?: number // minutes
|
||||||
resolutionNotes?: string;
|
resolutionNotes?: string
|
||||||
closedBy?: string;
|
closedBy?: string
|
||||||
closedAt?: Date;
|
closedAt?: Date
|
||||||
workOrderId?: string;
|
workOrderId?: string
|
||||||
followUpRequired: boolean;
|
followUpRequired: boolean
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmCalendarEvent {
|
export interface PmCalendarEvent {
|
||||||
// Bakım Takvimi Etkinliği
|
// Bakım Takvimi Etkinliği
|
||||||
id: string;
|
id: string
|
||||||
title: string;
|
title: string
|
||||||
type: "plan" | "workorder";
|
type: 'plan' | 'workorder'
|
||||||
date: Date;
|
date: Date
|
||||||
startTime?: string;
|
startTime?: string
|
||||||
endTime?: string;
|
endTime?: string
|
||||||
status: WorkOrderStatusEnum;
|
status: WorkOrderStatusEnum
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
assignedTo?: string;
|
assignedTo?: string
|
||||||
workCenterCode?: string;
|
workCenterCode?: string
|
||||||
duration: number; // minutes
|
duration: number // minutes
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CriticalityLevelEnum { // Kritik Seviye
|
export enum CriticalityLevelEnum {
|
||||||
Low = "LOW", // Düşük
|
// Kritik Seviye
|
||||||
Medium = "MEDIUM", // Orta
|
Low = 'LOW', // Düşük
|
||||||
High = "HIGH", // Yüksek
|
Medium = 'MEDIUM', // Orta
|
||||||
Critical = "CRITICAL", // Kritik
|
High = 'HIGH', // Yüksek
|
||||||
|
Critical = 'CRITICAL', // Kritik
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum MaintenancePlanTypeEnum { // Bakım Plan Türü
|
export enum MaintenancePlanTypeEnum {
|
||||||
Preventive = "PREVENTIVE", // Önleyici
|
// Bakım Plan Türü
|
||||||
Predictive = "PREDICTIVE", // Tahmine Dayalı
|
Preventive = 'PREVENTIVE', // Önleyici
|
||||||
Corrective = "CORRECTIVE", // Düzeltici
|
Predictive = 'PREDICTIVE', // Tahmine Dayalı
|
||||||
Condition = "CONDITION", // Durum Bazlı
|
Corrective = 'CORRECTIVE', // Düzeltici
|
||||||
|
Condition = 'CONDITION', // Durum Bazlı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum FrequencyUnitEnum { // Frekans Birimi
|
export enum FrequencyUnitEnum {
|
||||||
Days = "DAYS", // Günler
|
// Frekans Birimi
|
||||||
Weeks = "WEEKS", // Haftalar
|
Days = 'DAYS', // Günler
|
||||||
Months = "MONTHS", // Aylar
|
Weeks = 'WEEKS', // Haftalar
|
||||||
Years = "YEARS", // Yıllar
|
Months = 'MONTHS', // Aylar
|
||||||
Hours = "HOURS", // Saatler
|
Years = 'YEARS', // Yıllar
|
||||||
Cycles = "CYCLES", // Döngüler
|
Hours = 'HOURS', // Saatler
|
||||||
|
Cycles = 'CYCLES', // Döngüler
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WorkOrderTypeEnum { // İş Emri Türü
|
export enum WorkOrderTypeEnum {
|
||||||
Preventive = "PREVENTIVE", // Önleyici
|
// İş Emri Türü
|
||||||
Corrective = "CORRECTIVE", // Düzeltici
|
Preventive = 'PREVENTIVE', // Önleyici
|
||||||
Emergency = "EMERGENCY", // Acil
|
Corrective = 'CORRECTIVE', // Düzeltici
|
||||||
Inspection = "INSPECTION", // Denetim
|
Emergency = 'EMERGENCY', // Acil
|
||||||
Calibration = "CALIBRATION", // Kalibrasyon
|
Inspection = 'INSPECTION', // Denetim
|
||||||
|
Calibration = 'CALIBRATION', // Kalibrasyon
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WorkOrderStatusEnum { // İş Emri Durumu
|
export enum WorkOrderStatusEnum {
|
||||||
Created = "CREATED", // Oluşturuldu
|
// İş Emri Durumu
|
||||||
Planned = "PLANNED", // Planlandı
|
Created = 'CREATED', // Oluşturuldu
|
||||||
Released = "RELEASED", // Serbest Bırakıldı
|
Planned = 'PLANNED', // Planlandı
|
||||||
InProgress = "IN_PROGRESS", // Devam Ediyor
|
Released = 'RELEASED', // Serbest Bırakıldı
|
||||||
OnHold = "ON_HOLD", // Beklemede
|
InProgress = 'IN_PROGRESS', // Devam Ediyor
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
OnHold = 'ON_HOLD', // Beklemede
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum DownTimeImpactEnum { // Arıza Süreç Etkisi
|
export enum DownTimeImpactEnum {
|
||||||
Low = "LOW", // DÜŞÜK
|
// Arıza Süreç Etkisi
|
||||||
Medium = "MEDIUM", // ORTA
|
Low = 'LOW', // DÜŞÜK
|
||||||
High = "HIGH", // YÜKSEK
|
Medium = 'MEDIUM', // ORTA
|
||||||
Critical = "CRITICAL", // KRİTİK
|
High = 'HIGH', // YÜKSEK
|
||||||
|
Critical = 'CRITICAL', // KRİTİK
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum FaultTypeEnum { // Arıza Türü
|
export enum FaultTypeEnum {
|
||||||
Mechanical = "MECHANICAL", // Mekanik
|
// Arıza Türü
|
||||||
Electrical = "ELECTRICAL", // Elektrik
|
Mechanical = 'MECHANICAL', // Mekanik
|
||||||
Hydraulic = "HYDRAULIC", // Hidrolik
|
Electrical = 'ELECTRICAL', // Elektrik
|
||||||
Pneumatic = "PNEUMATIC", // Pnömatik
|
Hydraulic = 'HYDRAULIC', // Hidrolik
|
||||||
Software = "SOFTWARE", // Yazılım
|
Pneumatic = 'PNEUMATIC', // Pnömatik
|
||||||
Safety = "SAFETY", // Güvenlik
|
Software = 'SOFTWARE', // Yazılım
|
||||||
Performance = "PERFORMANCE", // Performans
|
Safety = 'SAFETY', // Güvenlik
|
||||||
Other = "OTHER", // Diğer
|
Performance = 'PERFORMANCE', // Performans
|
||||||
|
Other = 'OTHER', // Diğer
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum NotificationStatusEnum { // Bildirim Durumu
|
export enum NotificationStatusEnum {
|
||||||
Open = "OPEN", // Açık
|
// Bildirim Durumu
|
||||||
Assigned = "ASSIGNED", // Atandı
|
Open = 'OPEN', // Açık
|
||||||
InProgress = "IN_PROGRESS", // Devam Ediyor
|
Assigned = 'ASSIGNED', // Atandı
|
||||||
Resolved = "RESOLVED", // Çözüldü
|
InProgress = 'IN_PROGRESS', // Devam Ediyor
|
||||||
Closed = "CLOSED", // Kapandı
|
Resolved = 'RESOLVED', // Çözüldü
|
||||||
Rejected = "REJECTED", // Reddedildi
|
Closed = 'CLOSED', // Kapandı
|
||||||
|
Rejected = 'REJECTED', // Reddedildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WorkCenterStatusEnum { // İş Merkezi / Ekipman Durumu
|
export enum WorkCenterStatusEnum {
|
||||||
Operational = "OPERATIONAL", // OPERATİF
|
// İş Merkezi / Ekipman Durumu
|
||||||
UnderMaintenance = "UNDER_MAINTENANCE", // BAKIMDA
|
Operational = 'OPERATIONAL', // OPERATİF
|
||||||
OutOfOrder = "OUT_OF_ORDER", // ARIZALI
|
UnderMaintenance = 'UNDER_MAINTENANCE', // BAKIMDA
|
||||||
Retired = "RETIRED", // ESKİ
|
OutOfOrder = 'OUT_OF_ORDER', // ARIZALI
|
||||||
|
Retired = 'RETIRED', // ESKİ
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,342 +1,356 @@
|
||||||
import { BusinessParty, PriorityEnum } from "./common";
|
import { BusinessParty, PriorityEnum } from './common'
|
||||||
import { HrEmployee } from "./hr";
|
import { HrEmployee } from './hr'
|
||||||
|
|
||||||
export interface PsProject {
|
export interface PsProject {
|
||||||
// Proje
|
// Proje
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
projectType: ProjectTypeEnum;
|
projectType: ProjectTypeEnum
|
||||||
status: ProjectStatusEnum;
|
status: ProjectStatusEnum
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
customerId?: string;
|
customerId?: string
|
||||||
customer?: BusinessParty;
|
customer?: BusinessParty
|
||||||
projectManagerId: string;
|
projectManagerId: string
|
||||||
projectManager?: HrEmployee;
|
projectManager?: HrEmployee
|
||||||
startDate: Date;
|
startDate: Date
|
||||||
endDate: Date;
|
endDate: Date
|
||||||
actualStartDate?: Date;
|
actualStartDate?: Date
|
||||||
actualEndDate?: Date;
|
actualEndDate?: Date
|
||||||
budget: number;
|
budget: number
|
||||||
actualCost: number;
|
actualCost: number
|
||||||
currency: string;
|
currency: string
|
||||||
progress: number;
|
progress: number
|
||||||
phases: PsProjectPhase[];
|
phases: PsProjectPhase[]
|
||||||
tasks: PsProjectTask[];
|
tasks: PsProjectTask[]
|
||||||
risks: PsProjectRisk[];
|
risks: PsProjectRisk[]
|
||||||
documents: PsProjectDocument[];
|
documents: PsProjectDocument[]
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsProjectPhase {
|
export interface PsProjectPhase {
|
||||||
// Proje Fazı
|
// Proje Fazı
|
||||||
id: string;
|
id: string
|
||||||
projectId: string;
|
projectId: string
|
||||||
project?: PsProject;
|
project?: PsProject
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
sequence: number;
|
sequence: number
|
||||||
startDate: Date;
|
startDate: Date
|
||||||
endDate: Date;
|
endDate: Date
|
||||||
actualStartDate?: Date;
|
actualStartDate?: Date
|
||||||
actualEndDate?: Date;
|
actualEndDate?: Date
|
||||||
status: PhaseStatusEnum;
|
status: PhaseStatusEnum
|
||||||
budget: number;
|
budget: number
|
||||||
actualCost: number;
|
actualCost: number
|
||||||
progress: number;
|
progress: number
|
||||||
tasks: PsProjectTask[];
|
tasks: PsProjectTask[]
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
milestones: number;
|
milestones: number
|
||||||
completedMilestones: number;
|
completedMilestones: number
|
||||||
assignedTeams: string[];
|
assignedTeams: string[]
|
||||||
deliverables: string[];
|
deliverables: string[]
|
||||||
risks: string[];
|
risks: string[]
|
||||||
category: string;
|
category: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsProjectTask {
|
export interface PsProjectTask {
|
||||||
// Proje Görevi
|
// Proje Görevi
|
||||||
id: string;
|
id: string
|
||||||
projectId: string;
|
projectId: string
|
||||||
phaseId?: string;
|
phaseId?: string
|
||||||
phase?: PsProjectPhase;
|
phase?: PsProjectPhase
|
||||||
taskCode: string;
|
taskCode: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
taskType: TaskTypeEnum;
|
taskType: TaskTypeEnum
|
||||||
status: TaskStatusEnum;
|
status: TaskStatusEnum
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
assignedTo?: string;
|
assignedTo?: string
|
||||||
assignee?: HrEmployee;
|
assignee?: HrEmployee
|
||||||
startDate: Date;
|
startDate: Date
|
||||||
endDate: Date;
|
endDate: Date
|
||||||
actualStartDate?: Date;
|
actualStartDate?: Date
|
||||||
actualEndDate?: Date;
|
actualEndDate?: Date
|
||||||
estimatedHours: number;
|
estimatedHours: number
|
||||||
actualHours: number;
|
actualHours: number
|
||||||
progress: number;
|
progress: number
|
||||||
activities: PsTaskActivity[];
|
activities: PsTaskActivity[]
|
||||||
comments: PsTaskComment[];
|
comments: PsTaskComment[]
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsProjectRisk {
|
export interface PsProjectRisk {
|
||||||
// Proje Riski
|
// Proje Riski
|
||||||
id: string;
|
id: string
|
||||||
projectId: string;
|
projectId: string
|
||||||
riskCode: string;
|
riskCode: string
|
||||||
title: string;
|
title: string
|
||||||
description: string;
|
description: string
|
||||||
category: RiskCategoryEnum;
|
category: RiskCategoryEnum
|
||||||
probability: RiskProbabilityEnum;
|
probability: RiskProbabilityEnum
|
||||||
impact: RiskImpactEnum;
|
impact: RiskImpactEnum
|
||||||
riskLevel: RiskLevelEnum;
|
riskLevel: RiskLevelEnum
|
||||||
status: RiskStatusEnum;
|
status: RiskStatusEnum
|
||||||
identifiedBy: string;
|
identifiedBy: string
|
||||||
identifiedDate: Date;
|
identifiedDate: Date
|
||||||
mitigationPlan?: string;
|
mitigationPlan?: string
|
||||||
contingencyPlan?: string;
|
contingencyPlan?: string
|
||||||
ownerId?: string;
|
ownerId?: string
|
||||||
reviewDate?: Date;
|
reviewDate?: Date
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsTaskActivity {
|
export interface PsTaskActivity {
|
||||||
// Görev Aktivitesi
|
// Görev Aktivitesi
|
||||||
id: string;
|
id: string
|
||||||
taskId: string;
|
taskId: string
|
||||||
activityType: PsActivityTypeEnum;
|
activityType: PsActivityTypeEnum
|
||||||
description: string;
|
description: string
|
||||||
performedBy: string;
|
performedBy: string
|
||||||
performedAt: Date;
|
performedAt: Date
|
||||||
hoursSpent?: number;
|
hoursSpent?: number
|
||||||
notes?: string;
|
notes?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsTaskComment {
|
export interface PsTaskComment {
|
||||||
// Görev Yorumu
|
// Görev Yorumu
|
||||||
id: string;
|
id: string
|
||||||
taskId: string;
|
taskId: string
|
||||||
comment: string;
|
comment: string
|
||||||
commentedBy: string;
|
commentedBy: string
|
||||||
commentedAt: Date;
|
commentedAt: Date
|
||||||
isInternal: boolean;
|
isInternal: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsProjectDocument {
|
export interface PsProjectDocument {
|
||||||
// Proje Belgesi
|
// Proje Belgesi
|
||||||
id: string;
|
id: string
|
||||||
projectId: string;
|
projectId: string
|
||||||
documentName: string;
|
documentName: string
|
||||||
documentType: PsDocumentTypeEnum;
|
documentType: PsDocumentTypeEnum
|
||||||
filePath: string;
|
filePath: string
|
||||||
fileSize: number;
|
fileSize: number
|
||||||
uploadedBy: string;
|
uploadedBy: string
|
||||||
uploadedAt: Date;
|
uploadedAt: Date
|
||||||
version: string;
|
version: string
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsActivity {
|
export interface PsActivity {
|
||||||
// Aktivite
|
// Aktivite
|
||||||
id: string;
|
id: string
|
||||||
activityType: PsActivityTypeEnum;
|
activityType: PsActivityTypeEnum
|
||||||
name: string;
|
name: string
|
||||||
description: string;
|
description: string
|
||||||
category: string;
|
category: string
|
||||||
defaultDuration: number; // hours
|
defaultDuration: number // hours
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsProjectCostTracking {
|
export interface PsProjectCostTracking {
|
||||||
// Proje Maliyet Takibi
|
// Proje Maliyet Takibi
|
||||||
id: string;
|
id: string
|
||||||
projectId: string;
|
projectId: string
|
||||||
projectName: string;
|
projectName: string
|
||||||
projectCode: string;
|
projectCode: string
|
||||||
plannedBudget: number;
|
plannedBudget: number
|
||||||
actualCost: number;
|
actualCost: number
|
||||||
remainingBudget: number;
|
remainingBudget: number
|
||||||
plannedStartDate: Date;
|
plannedStartDate: Date
|
||||||
plannedEndDate: Date;
|
plannedEndDate: Date
|
||||||
actualStartDate?: Date;
|
actualStartDate?: Date
|
||||||
actualEndDate?: Date;
|
actualEndDate?: Date
|
||||||
plannedDuration: number; // days
|
plannedDuration: number // days
|
||||||
actualDuration?: number; // days
|
actualDuration?: number // days
|
||||||
progress: number; // percentage
|
progress: number // percentage
|
||||||
status: "ON_TRACK" | "AT_RISK" | "DELAYED" | "COMPLETED";
|
status: 'ON_TRACK' | 'AT_RISK' | 'DELAYED' | 'COMPLETED'
|
||||||
currency: string;
|
currency: string
|
||||||
lastUpdated: Date;
|
lastUpdated: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsTaskDailyUpdate {
|
export interface PsTaskDailyUpdate {
|
||||||
// Görev Günlük Güncellemesi
|
// Görev Günlük Güncellemesi
|
||||||
id: string;
|
id: string
|
||||||
taskId: string;
|
taskId: string
|
||||||
task?: PsProjectTask;
|
task?: PsProjectTask
|
||||||
employeeId: string;
|
employeeId: string
|
||||||
employee?: HrEmployee;
|
employee?: HrEmployee
|
||||||
date: Date;
|
date: Date
|
||||||
hoursWorked: number;
|
hoursWorked: number
|
||||||
description: string;
|
description: string
|
||||||
workType: WorkTypeEnum;
|
workType: WorkTypeEnum
|
||||||
progress: number; // percentage
|
progress: number // percentage
|
||||||
challenges?: string;
|
challenges?: string
|
||||||
nextSteps?: string;
|
nextSteps?: string
|
||||||
status: DailyUpdateStatusEnum;
|
status: DailyUpdateStatusEnum
|
||||||
attachments?: string[];
|
attachments?: string[]
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PsGanttTask {
|
export interface PsGanttTask {
|
||||||
// Gantt Görevi
|
// Gantt Görevi
|
||||||
id: string;
|
id: string
|
||||||
name: string;
|
name: string
|
||||||
type: "project" | "phase" | "task";
|
type: 'project' | 'phase' | 'task'
|
||||||
startDate: Date;
|
startDate: Date
|
||||||
endDate: Date;
|
endDate: Date
|
||||||
progress: number;
|
progress: number
|
||||||
assignee?: HrEmployee;
|
assignee?: HrEmployee
|
||||||
parentId?: string;
|
parentId?: string
|
||||||
children?: PsGanttTask[];
|
children?: PsGanttTask[]
|
||||||
dependencies?: string[];
|
dependencies?: string[]
|
||||||
priority: PriorityEnum;
|
priority: PriorityEnum
|
||||||
status: TaskStatusEnum | ProjectStatusEnum | PhaseStatusEnum;
|
status: TaskStatusEnum | ProjectStatusEnum | PhaseStatusEnum
|
||||||
hoursWorked?: number;
|
hoursWorked?: number
|
||||||
estimatedHours?: number;
|
estimatedHours?: number
|
||||||
level: number; // indentation level
|
level: number // indentation level
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WorkTypeEnum { // İş Türü
|
export enum WorkTypeEnum {
|
||||||
Development = "DEVELOPMENT", // Geliştirme
|
// İş Türü
|
||||||
Testing = "TESTING", // Test
|
Development = 'DEVELOPMENT', // Geliştirme
|
||||||
Design = "DESIGN", // Tasarım
|
Testing = 'TESTING', // Test
|
||||||
Documentation = "DOCUMENTATION", // Dokümantasyon
|
Design = 'DESIGN', // Tasarım
|
||||||
Meeting = "MEETING", // Toplantı
|
Documentation = 'DOCUMENTATION', // Dokümantasyon
|
||||||
Research = "RESEARCH", // Araştırma
|
Meeting = 'MEETING', // Toplantı
|
||||||
Debugging = "DEBUGGING", // Hata Ayıklama
|
Research = 'RESEARCH', // Araştırma
|
||||||
Review = "REVIEW", // İnceleme
|
Debugging = 'DEBUGGING', // Hata Ayıklama
|
||||||
Other = "OTHER", // Diğer
|
Review = 'REVIEW', // İnceleme
|
||||||
|
Other = 'OTHER', // Diğer
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum DailyUpdateStatusEnum { // Günlük Güncelleme Durumu
|
export enum DailyUpdateStatusEnum {
|
||||||
Draft = "DRAFT", // Taslak
|
// Günlük Güncelleme Durumu
|
||||||
Submitted = "SUBMITTED", // Gönderildi
|
Draft = 'DRAFT', // Taslak
|
||||||
Approved = "APPROVED", // Onaylandı
|
Submitted = 'SUBMITTED', // Gönderildi
|
||||||
Rejected = "REJECTED", // Reddedildi
|
Approved = 'APPROVED', // Onaylandı
|
||||||
|
Rejected = 'REJECTED', // Reddedildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ProjectTypeEnum { // Proje Türü
|
export enum ProjectTypeEnum {
|
||||||
Internal = "INTERNAL", // Dahili
|
// Proje Türü
|
||||||
Customer = "CUSTOMER", // Müşteri
|
Internal = 'INTERNAL', // Dahili
|
||||||
Research = "RESEARCH", // Araştırma
|
Customer = 'CUSTOMER', // Müşteri
|
||||||
Maintenance = "MAINTENANCE", // Bakım
|
Research = 'RESEARCH', // Araştırma
|
||||||
Development = "DEVELOPMENT", // Geliştirme
|
Maintenance = 'MAINTENANCE', // Bakım
|
||||||
|
Development = 'DEVELOPMENT', // Geliştirme
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ProjectStatusEnum { // Proje Durumu
|
export enum ProjectStatusEnum {
|
||||||
Planning = "PLANNING", // Planlama
|
// Proje Durumu
|
||||||
Active = "ACTIVE", // Aktif
|
Planning = 'PLANNING', // Planlama
|
||||||
OnHold = "ON_HOLD", // Beklemede
|
Active = 'ACTIVE', // Aktif
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
OnHold = 'ON_HOLD', // Beklemede
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PhaseStatusEnum { // Faz Durumu
|
export enum PhaseStatusEnum {
|
||||||
NotStarted = "NOT_STARTED", // Başlanmadı
|
// Faz Durumu
|
||||||
InProgress = "IN_PROGRESS", // Devam Ediyor
|
NotStarted = 'NOT_STARTED', // Başlanmadı
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
InProgress = 'IN_PROGRESS', // Devam Ediyor
|
||||||
OnHold = "ON_HOLD", // Beklemede
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
OnHold = 'ON_HOLD', // Beklemede
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TaskStatusEnum { // Görev Durumu
|
export enum TaskStatusEnum {
|
||||||
NotStarted = "NOT_STARTED", // Başlanmadı
|
// Görev Durumu
|
||||||
InProgress = "IN_PROGRESS", // Devam Ediyor
|
NotStarted = 'NOT_STARTED', // Başlanmadı
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
InProgress = 'IN_PROGRESS', // Devam Ediyor
|
||||||
OnHold = "ON_HOLD", // Beklemede
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
Cancelled = "CANCELLED", // İptal Edildi
|
OnHold = 'ON_HOLD', // Beklemede
|
||||||
|
Cancelled = 'CANCELLED', // İptal Edildi
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TaskTypeEnum { // Görev Türü
|
export enum TaskTypeEnum {
|
||||||
Development = "DEVELOPMENT", // Geliştirme
|
// Görev Türü
|
||||||
Testing = "TESTING", // Test
|
Development = 'DEVELOPMENT', // Geliştirme
|
||||||
Documentation = "DOCUMENTATION", // Dokümantasyon
|
Testing = 'TESTING', // Test
|
||||||
Review = "REVIEW", // İnceleme
|
Documentation = 'DOCUMENTATION', // Dokümantasyon
|
||||||
Deployment = "DEPLOYMENT", // Dağıtım
|
Review = 'REVIEW', // İnceleme
|
||||||
Meeting = "MEETING", // Toplantı
|
Deployment = 'DEPLOYMENT', // Dağıtım
|
||||||
|
Meeting = 'MEETING', // Toplantı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RiskCategoryEnum { // Risk Kategorisi
|
export enum RiskCategoryEnum {
|
||||||
Technical = "TECHNICAL", // Teknik
|
// Risk Kategorisi
|
||||||
Schedule = "SCHEDULE", // Zamanlama
|
Technical = 'TECHNICAL', // Teknik
|
||||||
Budget = "BUDGET", // Bütçe
|
Schedule = 'SCHEDULE', // Zamanlama
|
||||||
Resource = "RESOURCE", // Kaynak
|
Budget = 'BUDGET', // Bütçe
|
||||||
External = "EXTERNAL", // Dışsal
|
Resource = 'RESOURCE', // Kaynak
|
||||||
Quality = "QUALITY", // Kalite
|
External = 'EXTERNAL', // Dışsal
|
||||||
|
Quality = 'QUALITY', // Kalite
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RiskProbabilityEnum { // Risk Olasılığı
|
export enum RiskProbabilityEnum {
|
||||||
VeryLow = "VERY_LOW", // Çok Düşük
|
// Risk Olasılığı
|
||||||
Low = "LOW", // Düşük
|
VeryLow = 'VERY_LOW', // Çok Düşük
|
||||||
Medium = "MEDIUM", // Orta
|
Low = 'LOW', // Düşük
|
||||||
High = "HIGH", // Yüksek
|
Medium = 'MEDIUM', // Orta
|
||||||
VeryHigh = "VERY_HIGH", // Çok Yüksek
|
High = 'HIGH', // Yüksek
|
||||||
|
VeryHigh = 'VERY_HIGH', // Çok Yüksek
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RiskImpactEnum { // Risk Etkisi
|
export enum RiskImpactEnum {
|
||||||
VeryLow = "VERY_LOW", // Çok Düşük
|
// Risk Etkisi
|
||||||
Low = "LOW", // Düşük
|
VeryLow = 'VERY_LOW', // Çok Düşük
|
||||||
Medium = "MEDIUM", // Orta
|
Low = 'LOW', // Düşük
|
||||||
High = "HIGH", // Yüksek
|
Medium = 'MEDIUM', // Orta
|
||||||
VeryHigh = "VERY_HIGH", // Çok Yüksek
|
High = 'HIGH', // Yüksek
|
||||||
|
VeryHigh = 'VERY_HIGH', // Çok Yüksek
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RiskLevelEnum { // Risk Seviyesi
|
export enum RiskLevelEnum {
|
||||||
Low = "LOW", // Düşük
|
// Risk Seviyesi
|
||||||
Medium = "MEDIUM", // Orta
|
Low = 'LOW', // Düşük
|
||||||
High = "HIGH", // Yüksek
|
Medium = 'MEDIUM', // Orta
|
||||||
Critical = "CRITICAL", // Kritik
|
High = 'HIGH', // Yüksek
|
||||||
|
Critical = 'CRITICAL', // Kritik
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum RiskStatusEnum { // Risk Durumu
|
export enum RiskStatusEnum {
|
||||||
Identified = "IDENTIFIED", // Belirlendi
|
// Risk Durumu
|
||||||
Analyzing = "ANALYZING", // Analiz Ediliyor
|
Identified = 'IDENTIFIED', // Belirlendi
|
||||||
Mitigating = "MITIGATING", // Azaltılıyor
|
Analyzing = 'ANALYZING', // Analiz Ediliyor
|
||||||
Monitoring = "MONITORING", // İzleniyor
|
Mitigating = 'MITIGATING', // Azaltılıyor
|
||||||
Closed = "CLOSED", // Kapatıldı
|
Monitoring = 'MONITORING', // İzleniyor
|
||||||
|
Closed = 'CLOSED', // Kapatıldı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PsActivityTypeEnum { // Aktivite Türü
|
export enum PsActivityTypeEnum {
|
||||||
WorkLog = "WORK_LOG", // İş Günlüğü
|
// Aktivite Türü
|
||||||
StatusUpdate = "STATUS_UPDATE", // Durum Güncellemesi
|
WorkLog = 'WORK_LOG', // İş Günlüğü
|
||||||
Issue = "ISSUE", // Sorun
|
StatusUpdate = 'STATUS_UPDATE', // Durum Güncellemesi
|
||||||
Meeting = "MEETING", // Toplantı
|
Issue = 'ISSUE', // Sorun
|
||||||
Review = "REVIEW", // İnceleme
|
Meeting = 'MEETING', // Toplantı
|
||||||
TaskCreated = "TASK_CREATED", // Görev Oluşturuldu
|
Review = 'REVIEW', // İnceleme
|
||||||
TaskUpdated = "TASK_UPDATED", // Görev Güncellendi
|
TaskCreated = 'TASK_CREATED', // Görev Oluşturuldu
|
||||||
TaskCompleted = "TASK_COMPLETED", // Görev Tamamlandı
|
TaskUpdated = 'TASK_UPDATED', // Görev Güncellendi
|
||||||
CommentAdded = "COMMENT_ADDED", // Yorum Eklendi
|
TaskCompleted = 'TASK_COMPLETED', // Görev Tamamlandı
|
||||||
FileUploaded = "FILE_UPLOADED", // Dosya Yüklendi
|
CommentAdded = 'COMMENT_ADDED', // Yorum Eklendi
|
||||||
StatusChanged = "STATUS_CHANGED", // Durum Değişti
|
FileUploaded = 'FILE_UPLOADED', // Dosya Yüklendi
|
||||||
AssignmentChanged = "ASSIGNMENT_CHANGED", // Atama Değişti
|
StatusChanged = 'STATUS_CHANGED', // Durum Değişti
|
||||||
MeetingScheduled = "MEETING_SCHEDULED", // Toplantı Planlandı
|
AssignmentChanged = 'ASSIGNMENT_CHANGED', // Atama Değişti
|
||||||
|
MeetingScheduled = 'MEETING_SCHEDULED', // Toplantı Planlandı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PsDocumentTypeEnum { // Belge Türü
|
export enum PsDocumentTypeEnum {
|
||||||
Specification = "SPECIFICATION", // Spesifikasyon
|
// Belge Türü
|
||||||
Design = "DESIGN", // Tasarım
|
Specification = 'SPECIFICATION', // Spesifikasyon
|
||||||
Contract = "CONTRACT", // Sözleşme
|
Design = 'DESIGN', // Tasarım
|
||||||
Report = "REPORT", // Rapor
|
Contract = 'CONTRACT', // Sözleşme
|
||||||
Manual = "MANUAL", // Kılavuz
|
Report = 'REPORT', // Rapor
|
||||||
Other = "OTHER", // Diğer
|
Manual = 'MANUAL', // Kılavuz
|
||||||
|
Other = 'OTHER', // Diğer
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,246 +1,256 @@
|
||||||
import { Address } from "./common";
|
import { Address } from './common'
|
||||||
import { MmMaterial } from "./mm";
|
import { MmMaterial } from './mm'
|
||||||
import { SecurityLevelEnum } from "./admin/mrp";
|
import { SecurityLevelEnum } from './mrp'
|
||||||
|
|
||||||
export interface WmWarehouse {
|
export interface WmWarehouse {
|
||||||
// Depo
|
// Depo
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
address?: Address;
|
address?: Address
|
||||||
warehouseType: WarehouseTypeEnum;
|
warehouseType: WarehouseTypeEnum
|
||||||
locations: WmLocation[];
|
locations: WmLocation[]
|
||||||
isMainWarehouse: boolean;
|
isMainWarehouse: boolean
|
||||||
capacity: number;
|
capacity: number
|
||||||
currentUtilization: number;
|
currentUtilization: number
|
||||||
zones: WmZone[];
|
zones: WmZone[]
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
securityLevel: SecurityLevelEnum;
|
securityLevel: SecurityLevelEnum
|
||||||
temperatureControlled: boolean;
|
temperatureControlled: boolean
|
||||||
managerId: number;
|
managerId: number
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmZone {
|
export interface WmZone {
|
||||||
// Bölge
|
// Bölge
|
||||||
id: string;
|
id: string
|
||||||
warehouseId: string;
|
warehouseId: string
|
||||||
zoneCode: string;
|
zoneCode: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
zoneType: ZoneTypeEnum;
|
zoneType: ZoneTypeEnum
|
||||||
temperature?: number;
|
temperature?: number
|
||||||
humidity?: number;
|
humidity?: number
|
||||||
locations: WmLocation[];
|
locations: WmLocation[]
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmLocation {
|
export interface WmLocation {
|
||||||
// Lokasyon
|
// Lokasyon
|
||||||
id: string;
|
id: string
|
||||||
warehouseId: string;
|
warehouseId: string
|
||||||
zoneId?: string;
|
zoneId?: string
|
||||||
locationCode: string;
|
locationCode: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
locationType: LocationTypeEnum;
|
locationType: LocationTypeEnum
|
||||||
capacity: number;
|
capacity: number
|
||||||
currentStock: number;
|
currentStock: number
|
||||||
dimensions?: WmLocationDimensions;
|
dimensions?: WmLocationDimensions
|
||||||
restrictions?: string[];
|
restrictions?: string[]
|
||||||
stockItems: WmStockItem[];
|
stockItems: WmStockItem[]
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmLocationDimensions {
|
export interface WmLocationDimensions {
|
||||||
// Lokasyon Boyutları
|
// Lokasyon Boyutları
|
||||||
length: number;
|
length: number
|
||||||
width: number;
|
width: number
|
||||||
height: number;
|
height: number
|
||||||
weight: number;
|
weight: number
|
||||||
unit: string;
|
unit: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmStockItem {
|
export interface WmStockItem {
|
||||||
// Stok Kalemi
|
// Stok Kalemi
|
||||||
id: string;
|
id: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
warehouseId: string;
|
warehouseId: string
|
||||||
zoneId: string;
|
zoneId: string
|
||||||
locationId: string;
|
locationId: string
|
||||||
quantity: number;
|
quantity: number
|
||||||
reservedQuantity: number;
|
reservedQuantity: number
|
||||||
availableQuantity: number;
|
availableQuantity: number
|
||||||
unitId: string;
|
unitId: string
|
||||||
lotNumber?: string;
|
lotNumber?: string
|
||||||
serialNumber?: string;
|
serialNumber?: string
|
||||||
expiryDate?: Date;
|
expiryDate?: Date
|
||||||
receivedDate: Date;
|
receivedDate: Date
|
||||||
lastMovementDate: Date;
|
lastMovementDate: Date
|
||||||
status: StockStatusEnum;
|
status: StockStatusEnum
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmInventoryCount {
|
export interface WmInventoryCount {
|
||||||
// Envanter Sayımı
|
// Envanter Sayımı
|
||||||
id: string;
|
id: string
|
||||||
countNumber: string;
|
countNumber: string
|
||||||
warehouseId: string;
|
warehouseId: string
|
||||||
warehouse?: WmWarehouse;
|
warehouse?: WmWarehouse
|
||||||
zoneId?: string;
|
zoneId?: string
|
||||||
zone?: WmZone;
|
zone?: WmZone
|
||||||
locationId?: string;
|
locationId?: string
|
||||||
location?: WmLocation;
|
location?: WmLocation
|
||||||
countType: CountTypeEnum;
|
countType: CountTypeEnum
|
||||||
status: CountStatusEnum;
|
status: CountStatusEnum
|
||||||
scheduledDate: Date;
|
scheduledDate: Date
|
||||||
startDate?: Date;
|
startDate?: Date
|
||||||
endDate?: Date;
|
endDate?: Date
|
||||||
countedBy: string[];
|
countedBy: string[]
|
||||||
approvedBy?: string;
|
approvedBy?: string
|
||||||
items: WmInventoryCountItem[];
|
items: WmInventoryCountItem[]
|
||||||
variances: WmInventoryVariance[];
|
variances: WmInventoryVariance[]
|
||||||
notes?: string;
|
notes?: string
|
||||||
creationTime: Date;
|
creationTime: Date
|
||||||
lastModificationTime: Date;
|
lastModificationTime: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmInventoryCountItem {
|
export interface WmInventoryCountItem {
|
||||||
// Envanter Sayım Kalemi
|
// Envanter Sayım Kalemi
|
||||||
id: string;
|
id: string
|
||||||
countId: string;
|
countId: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
material?: MmMaterial;
|
material?: MmMaterial
|
||||||
locationId: string;
|
locationId: string
|
||||||
systemQuantity: number;
|
systemQuantity: number
|
||||||
countedQuantity: number;
|
countedQuantity: number
|
||||||
variance: number;
|
variance: number
|
||||||
variancePercentage: number;
|
variancePercentage: number
|
||||||
lotNumber?: string;
|
lotNumber?: string
|
||||||
serialNumber?: string;
|
serialNumber?: string
|
||||||
countedBy: string;
|
countedBy: string
|
||||||
countedAt: Date;
|
countedAt: Date
|
||||||
notes?: string;
|
notes?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmInventoryVariance {
|
export interface WmInventoryVariance {
|
||||||
// Envanter Farkı
|
// Envanter Farkı
|
||||||
id: string;
|
id: string
|
||||||
countId: string;
|
countId: string
|
||||||
materialId: string;
|
materialId: string
|
||||||
locationId: string;
|
locationId: string
|
||||||
variance: number;
|
variance: number
|
||||||
varianceValue: number;
|
varianceValue: number
|
||||||
reason?: string;
|
reason?: string
|
||||||
action: VarianceActionEnum;
|
action: VarianceActionEnum
|
||||||
adjustmentMade: boolean;
|
adjustmentMade: boolean
|
||||||
approvedBy?: string;
|
approvedBy?: string
|
||||||
approvedAt?: Date;
|
approvedAt?: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmPutawayRule {
|
export interface WmPutawayRule {
|
||||||
// Yerleştirme Kuralı
|
// Yerleştirme Kuralı
|
||||||
id: string;
|
id: string
|
||||||
code: string;
|
code: string
|
||||||
name: string;
|
name: string
|
||||||
description?: string;
|
description?: string
|
||||||
warehouseId: string;
|
warehouseId: string
|
||||||
materialTypeId?: string;
|
materialTypeId?: string
|
||||||
materialGroupId?: string;
|
materialGroupId?: string
|
||||||
priority: number;
|
priority: number
|
||||||
conditions: WmPutawayCondition[];
|
conditions: WmPutawayCondition[]
|
||||||
targetZoneId?: string;
|
targetZoneId?: string
|
||||||
targetLocationId?: string;
|
targetLocationId?: string
|
||||||
strategy: PutawayStrategyEnum;
|
strategy: PutawayStrategyEnum
|
||||||
isActive: boolean;
|
isActive: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WmPutawayCondition {
|
export interface WmPutawayCondition {
|
||||||
// Yerleştirme Koşulu
|
// Yerleştirme Koşulu
|
||||||
id: string;
|
id: string
|
||||||
ruleId: string;
|
ruleId: string
|
||||||
conditionType: ConditionTypeEnum;
|
conditionType: ConditionTypeEnum
|
||||||
operator: ConditionOperatorEnum;
|
operator: ConditionOperatorEnum
|
||||||
value: string;
|
value: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum WarehouseTypeEnum { // Depo Türleri
|
export enum WarehouseTypeEnum {
|
||||||
RawMaterials = "RAW_MATERIALS", // Hammaddeler
|
// Depo Türleri
|
||||||
FinishedGoods = "FINISHED_GOODS", // Mamuller
|
RawMaterials = 'RAW_MATERIALS', // Hammaddeler
|
||||||
WorkInProgress = "WIP", // İşlenmekte olan ürünler
|
FinishedGoods = 'FINISHED_GOODS', // Mamuller
|
||||||
SpareParts = "SPARE_PARTS", // Yedek Parçalar
|
WorkInProgress = 'WIP', // İşlenmekte olan ürünler
|
||||||
Returns = "RETURNS", // İadeler
|
SpareParts = 'SPARE_PARTS', // Yedek Parçalar
|
||||||
Quarantine = "QUARANTINE", // Karantina
|
Returns = 'RETURNS', // İadeler
|
||||||
Transit = "TRANSIT", // Geçici Depo
|
Quarantine = 'QUARANTINE', // Karantina
|
||||||
|
Transit = 'TRANSIT', // Geçici Depo
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ZoneTypeEnum { // Bölge Türleri
|
export enum ZoneTypeEnum {
|
||||||
Storage = "STORAGE", // Depolama
|
// Bölge Türleri
|
||||||
Receiving = "RECEIVING", // Giriş
|
Storage = 'STORAGE', // Depolama
|
||||||
Shipping = "SHIPPING", // Çıkış
|
Receiving = 'RECEIVING', // Giriş
|
||||||
Picking = "PICKING", // Toplama
|
Shipping = 'SHIPPING', // Çıkış
|
||||||
Quality = "QUALITY", // Kalite Kontrol
|
Picking = 'PICKING', // Toplama
|
||||||
Staging = "STAGING", // Sevkiyat Hazırlık
|
Quality = 'QUALITY', // Kalite Kontrol
|
||||||
|
Staging = 'STAGING', // Sevkiyat Hazırlık
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum LocationTypeEnum { // Lokasyon Türleri
|
export enum LocationTypeEnum {
|
||||||
Shelf = "SHELF", // Raf
|
// Lokasyon Türleri
|
||||||
Bin = "BIN", // Kutu
|
Shelf = 'SHELF', // Raf
|
||||||
Floor = "FLOOR", // Zemin
|
Bin = 'BIN', // Kutu
|
||||||
Rack = "RACK", // Palet Rafı
|
Floor = 'FLOOR', // Zemin
|
||||||
Tank = "TANK", // Tank
|
Rack = 'RACK', // Palet Rafı
|
||||||
|
Tank = 'TANK', // Tank
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum StockStatusEnum { // Stok Durumları
|
export enum StockStatusEnum {
|
||||||
Available = "AVAILABLE", // Mevcut
|
// Stok Durumları
|
||||||
Reserved = "RESERVED", // Rezerve Edilmiş
|
Available = 'AVAILABLE', // Mevcut
|
||||||
Blocked = "BLOCKED", // Engellenmiş
|
Reserved = 'RESERVED', // Rezerve Edilmiş
|
||||||
InTransit = "IN_TRANSIT", // Transferde
|
Blocked = 'BLOCKED', // Engellenmiş
|
||||||
Quarantine = "QUARANTINE", // Karantina
|
InTransit = 'IN_TRANSIT', // Transferde
|
||||||
|
Quarantine = 'QUARANTINE', // Karantina
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CountTypeEnum { // Sayım Türleri
|
export enum CountTypeEnum {
|
||||||
Full = "FULL", // Tam Sayım
|
// Sayım Türleri
|
||||||
Cycle = "CYCLE", // Döngüsel Sayım
|
Full = 'FULL', // Tam Sayım
|
||||||
Spot = "SPOT", // Noktasal Sayım
|
Cycle = 'CYCLE', // Döngüsel Sayım
|
||||||
|
Spot = 'SPOT', // Noktasal Sayım
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum CountStatusEnum { // Sayım Durumları
|
export enum CountStatusEnum {
|
||||||
Planned = "PLANNED", // Planlandı
|
// Sayım Durumları
|
||||||
InProgress = "IN_PROGRESS", // Devam Ediyor
|
Planned = 'PLANNED', // Planlandı
|
||||||
Completed = "COMPLETED", // Tamamlandı
|
InProgress = 'IN_PROGRESS', // Devam Ediyor
|
||||||
Approved = "APPROVED", // Onaylandı
|
Completed = 'COMPLETED', // Tamamlandı
|
||||||
|
Approved = 'APPROVED', // Onaylandı
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum VarianceActionEnum { // Fark Eylem Türleri
|
export enum VarianceActionEnum {
|
||||||
Accept = "ACCEPT", // Kabul Et
|
// Fark Eylem Türleri
|
||||||
Investigate = "INVESTIGATE", // Araştır
|
Accept = 'ACCEPT', // Kabul Et
|
||||||
Recount = "RECOUNT", // Yeniden Say
|
Investigate = 'INVESTIGATE', // Araştır
|
||||||
Adjust = "ADJUST", // Düzelt
|
Recount = 'RECOUNT', // Yeniden Say
|
||||||
|
Adjust = 'ADJUST', // Düzelt
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum PutawayStrategyEnum { // Yerleştirme Stratejileri
|
export enum PutawayStrategyEnum {
|
||||||
FIFO = "FIFO", // First In First Out
|
// Yerleştirme Stratejileri
|
||||||
LIFO = "LIFO", // Last In First Out
|
FIFO = 'FIFO', // First In First Out
|
||||||
NearestLocation = "NEAREST_LOCATION", // En Yakın Lokasyon
|
LIFO = 'LIFO', // Last In First Out
|
||||||
EmptyLocation = "EMPTY_LOCATION", // Boş Lokasyon
|
NearestLocation = 'NEAREST_LOCATION', // En Yakın Lokasyon
|
||||||
SameProduct = "SAME_PRODUCT", // Aynı Ürün
|
EmptyLocation = 'EMPTY_LOCATION', // Boş Lokasyon
|
||||||
|
SameProduct = 'SAME_PRODUCT', // Aynı Ürün
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ConditionTypeEnum { // Koşul Türleri
|
export enum ConditionTypeEnum {
|
||||||
MaterialType = "MATERIAL_TYPE", // Malzeme Türü
|
// Koşul Türleri
|
||||||
MaterialGroup = "MATERIAL_GROUP", // Malzeme Grubu
|
MaterialType = 'MATERIAL_TYPE', // Malzeme Türü
|
||||||
Quantity = "QUANTITY", // Miktar
|
MaterialGroup = 'MATERIAL_GROUP', // Malzeme Grubu
|
||||||
Weight = "WEIGHT", // Ağırlık
|
Quantity = 'QUANTITY', // Miktar
|
||||||
Volume = "VOLUME", // Hacim
|
Weight = 'WEIGHT', // Ağırlık
|
||||||
|
Volume = 'VOLUME', // Hacim
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ConditionOperatorEnum { // Koşul Operatörleri
|
export enum ConditionOperatorEnum {
|
||||||
Equals = "EQUALS", // Eşittir
|
// Koşul Operatörleri
|
||||||
NotEquals = "NOT_EQUALS", // Eşit Değildir
|
Equals = 'EQUALS', // Eşittir
|
||||||
GreaterThan = "GREATER_THAN", // Daha Büyüktür
|
NotEquals = 'NOT_EQUALS', // Eşit Değildir
|
||||||
LessThan = "LESS_THAN", // Daha Küçüktür
|
GreaterThan = 'GREATER_THAN', // Daha Büyüktür
|
||||||
Contains = "CONTAINS", // İçerir
|
LessThan = 'LESS_THAN', // Daha Küçüktür
|
||||||
|
Contains = 'CONTAINS', // İçerir
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ import {
|
||||||
getBusinessPartyStatusName,
|
getBusinessPartyStatusName,
|
||||||
getCustomerSegmentName,
|
getCustomerSegmentName,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const CustomerCards: React.FC = () => {
|
const CustomerCards: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -155,7 +156,7 @@ const CustomerCards: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={14} className="mr-2" />
|
||||||
|
|
@ -419,14 +420,14 @@ const CustomerCards: React.FC = () => {
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex space-x-2">
|
<div className="flex space-x-2">
|
||||||
<Link
|
<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"
|
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"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
<FaEye className="w-4 h-4" />
|
<FaEye className="w-4 h-4" />
|
||||||
</Link>
|
</Link>
|
||||||
<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"
|
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"
|
title="Düzenle"
|
||||||
>
|
>
|
||||||
|
|
@ -463,7 +464,7 @@ const CustomerCards: React.FC = () => {
|
||||||
Yeni müşteri ekleyerek başlayın veya arama kriterlerinizi değiştirin.
|
Yeni müşteri ekleyerek başlayın veya arama kriterlerinizi değiştirin.
|
||||||
</p>
|
</p>
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import { CustomerSegmentEnum, CustomerTypeEnum } from '../../../types/crm'
|
||||||
import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
||||||
import { BusinessParty, BusinessPartyStatusEnum, PaymentTerms } from '../../../types/common'
|
import { BusinessParty, BusinessPartyStatusEnum, PaymentTerms } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const CustomerEdit: React.FC = () => {
|
const CustomerEdit: React.FC = () => {
|
||||||
const { id } = useParams<{ id: string }>()
|
const { id } = useParams<{ id: string }>()
|
||||||
|
|
@ -58,7 +59,7 @@ const CustomerEdit: React.FC = () => {
|
||||||
queryClient.invalidateQueries({ queryKey: ['customers'] })
|
queryClient.invalidateQueries({ queryKey: ['customers'] })
|
||||||
queryClient.invalidateQueries({ queryKey: ['customer', id] })
|
queryClient.invalidateQueries({ queryKey: ['customer', id] })
|
||||||
setIsDirty(false)
|
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 = () => {
|
const handleCancel = () => {
|
||||||
if (isDirty) {
|
if (isDirty) {
|
||||||
if (window.confirm('Değişiklikleriniz kaydedilmedi. Çıkmak istediğinizden emin misiniz?')) {
|
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 {
|
} 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>
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="w-4 h-4 mr-2" />
|
||||||
|
|
@ -173,11 +174,14 @@ const CustomerEdit: React.FC = () => {
|
||||||
<div className="mx-auto px-4 py-3">
|
<div className="mx-auto px-4 py-3">
|
||||||
{/* Breadcrumb */}
|
{/* Breadcrumb */}
|
||||||
<div className="flex items-center space-x-2 text-xs text-gray-500 mb-3">
|
<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
|
Müşteriler
|
||||||
</Link>
|
</Link>
|
||||||
<span>/</span>
|
<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}
|
{customer.name}
|
||||||
</Link>
|
</Link>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
|
|
@ -196,7 +200,7 @@ const CustomerEdit: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div className="flex items-center space-x-4">
|
<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" />
|
<FaBuilding className="w-8 h-8" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import LoadingSpinner from '../../../components/common/LoadingSpinner'
|
||||||
import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
||||||
import { BusinessParty } from '../../../types/common'
|
import { BusinessParty } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
interface ValidationErrors {
|
interface ValidationErrors {
|
||||||
[key: string]: string
|
[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!')
|
alert(isEdit ? 'Müşteri başarıyla güncellendi!' : 'Müşteri başarıyla oluşturuldu!')
|
||||||
|
|
||||||
// Navigate back to list
|
// Navigate back to list
|
||||||
navigate('/admin/crm')
|
navigate(ROUTES_ENUM.protected.crm.customers)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving customer:', error)
|
console.error('Error saving customer:', error)
|
||||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||||
|
|
@ -114,7 +115,7 @@ const CustomerForm: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/crm')
|
navigate(ROUTES_ENUM.protected.crm.customers)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import LoadingSpinner from '../../../components/common/LoadingSpinner'
|
||||||
import { BusinessParty } from '../../../types/common'
|
import { BusinessParty } from '../../../types/common'
|
||||||
import { mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
import { mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
interface ValidationErrors {
|
interface ValidationErrors {
|
||||||
[key: string]: string
|
[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!')
|
alert(isEdit ? 'Müşteri başarıyla güncellendi!' : 'Müşteri başarıyla oluşturuldu!')
|
||||||
|
|
||||||
// Navigate back to list
|
// Navigate back to list
|
||||||
navigate('/admin/crm')
|
navigate(ROUTES_ENUM.protected.crm.customers)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving customer:', error)
|
console.error('Error saving customer:', error)
|
||||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||||
|
|
@ -112,7 +113,7 @@ const CustomerForm: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/crm')
|
navigate(ROUTES_ENUM.protected.crm.customers)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ import {
|
||||||
getCustomerSegmentColor,
|
getCustomerSegmentColor,
|
||||||
getCustomerSegmentName,
|
getCustomerSegmentName,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const CustomerList: React.FC = () => {
|
const CustomerList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -124,7 +125,7 @@ const CustomerList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={14} className="mr-2" />
|
||||||
|
|
@ -367,7 +368,7 @@ const CustomerList: React.FC = () => {
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<div className="flex items-center justify-end space-x-2">
|
<div className="flex items-center justify-end space-x-2">
|
||||||
<Link
|
<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"
|
className="p-2 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||||
title="Detayları Görüntüle"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
|
|
@ -375,7 +376,7 @@ const CustomerList: React.FC = () => {
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<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"
|
className="p-2 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
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>
|
<p className="mt-1 text-xs text-gray-500">Yeni müşteri ekleyerek başlayın.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ import {
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { BusinessPartyStatusEnum } from '../../../types/common'
|
import { BusinessPartyStatusEnum } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const CustomerView: React.FC = () => {
|
const CustomerView: React.FC = () => {
|
||||||
const { id } = useParams<{ id: string }>()
|
const { id } = useParams<{ id: string }>()
|
||||||
|
|
@ -105,7 +106,7 @@ const CustomerView: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="w-4 h-4 mr-2" />
|
||||||
|
|
@ -133,7 +134,7 @@ const CustomerView: React.FC = () => {
|
||||||
<div className="mx-auto px-4 py-3">
|
<div className="mx-auto px-4 py-3">
|
||||||
{/* Breadcrumb */}
|
{/* Breadcrumb */}
|
||||||
<div className="flex items-center space-x-2 text-xs text-gray-500 mb-3">
|
<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
|
Müşteriler
|
||||||
</Link>
|
</Link>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
|
|
@ -144,7 +145,7 @@ const CustomerView: React.FC = () => {
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="w-5 h-5" />
|
||||||
|
|
@ -192,7 +193,7 @@ const CustomerView: React.FC = () => {
|
||||||
|
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<Link
|
<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"
|
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" />
|
<FaEdit className="w-4 h-4 mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import { mockMaterials } from '../../../mocks/mockMaterials'
|
||||||
import { mockSalesOrders } from '../../../mocks/mockSalesOrders'
|
import { mockSalesOrders } from '../../../mocks/mockSalesOrders'
|
||||||
import { BusinessParty, PaymentTerms } from '../../../types/common'
|
import { BusinessParty, PaymentTerms } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SalesOrderForm: React.FC = () => {
|
const SalesOrderForm: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -235,7 +236,7 @@ const SalesOrderForm: React.FC = () => {
|
||||||
console.log('Saving sales order:', formData)
|
console.log('Saving sales order:', formData)
|
||||||
|
|
||||||
// Navigate back to sales orders list
|
// Navigate back to sales orders list
|
||||||
navigate('/admin/crm/sales-orders')
|
navigate(ROUTES_ENUM.protected.crm.salesOrders)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving sales order:', error)
|
console.error('Error saving sales order:', error)
|
||||||
alert('Sipariş kaydedilirken bir hata oluştu!')
|
alert('Sipariş kaydedilirken bir hata oluştu!')
|
||||||
|
|
@ -258,7 +259,7 @@ const SalesOrderForm: React.FC = () => {
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<button
|
<button
|
||||||
type="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"
|
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" />
|
<FaTimes className="w-4 h-4" />
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import {
|
||||||
getSaleOrderStatusText,
|
getSaleOrderStatusText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SalesOrderView: React.FC = () => {
|
const SalesOrderView: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
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>
|
<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>
|
<p className="text-gray-600 mb-4">Belirtilen sipariş mevcut değil.</p>
|
||||||
<button
|
<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"
|
className="bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors"
|
||||||
>
|
>
|
||||||
Sipariş Listesine Dön
|
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 justify-between mb-4">
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
<button
|
<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"
|
className="flex items-center text-gray-600 hover:text-gray-800 transition-colors"
|
||||||
>
|
>
|
||||||
<FaArrowLeft className="mr-2" />
|
<FaArrowLeft className="mr-2" />
|
||||||
|
|
@ -104,7 +105,9 @@ const SalesOrderView: React.FC = () => {
|
||||||
{getSaleOrderStatusText(order.status)}
|
{getSaleOrderStatusText(order.status)}
|
||||||
</span>
|
</span>
|
||||||
<button
|
<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"
|
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" />
|
<FaEdit className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import { BusinessParty } from '../../../types/common'
|
||||||
import Widget from '../../../components/common/Widget'
|
import Widget from '../../../components/common/Widget'
|
||||||
import { getSaleOrderStatusColor, getSaleOrderStatusText } from '../../../utils/erp'
|
import { getSaleOrderStatusColor, getSaleOrderStatusText } from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SalesOrders: React.FC = () => {
|
const SalesOrders: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -28,11 +29,11 @@ const SalesOrders: React.FC = () => {
|
||||||
const [selectedCustomer, setSelectedCustomer] = useState<string>('all')
|
const [selectedCustomer, setSelectedCustomer] = useState<string>('all')
|
||||||
|
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
navigate('/admin/crm/sales-orders/new')
|
navigate(ROUTES_ENUM.protected.crm.salesOrdersNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (order: CrmSalesOrder) => {
|
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) => {
|
const handleDelete = (id: string) => {
|
||||||
|
|
@ -41,7 +42,7 @@ const SalesOrders: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleViewDetails = (order: CrmSalesOrder) => {
|
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) => {
|
const filteredOrders = salesOrders.filter((order) => {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import { CrmTerritory } from '../../../types/crm'
|
||||||
import { mockEmployees } from '../../../mocks/mockEmployees'
|
import { mockEmployees } from '../../../mocks/mockEmployees'
|
||||||
import { Team, TeamMember, TeamRoleEnum } from '../../../types/common'
|
import { Team, TeamMember, TeamRoleEnum } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SalesTeamCreate: React.FC = () => {
|
const SalesTeamCreate: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -122,12 +123,12 @@ const SalesTeamCreate: React.FC = () => {
|
||||||
|
|
||||||
console.log('Creating new sales team:', newTeam)
|
console.log('Creating new sales team:', newTeam)
|
||||||
alert('Satış ekibi başarıyla oluşturuldu!')
|
alert('Satış ekibi başarıyla oluşturuldu!')
|
||||||
navigate('/admin/crm/sales-teams')
|
navigate(ROUTES_ENUM.protected.crm.salesTeams)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
if (confirm('Değişiklikler kaydedilmedi. Çıkmak istediğinizden emin misiniz?')) {
|
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 justify-between">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="w-5 h-5" />
|
||||||
</button>
|
</button>
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-2xl font-bold text-gray-900">Yeni Satış Ekibi</h2>
|
<h2 className="text-2xl font-bold text-gray-900">Yeni Satış Ekibi</h2>
|
||||||
<p className="text-gray-600">
|
<p className="text-gray-600">Yeni satış ekibi oluşturun ve ekip üyelerini atayın</p>
|
||||||
Yeni satış ekibi oluşturun ve ekip üyelerini atayın
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import mockSalesTeams from '../../../mocks/mockSalesTeams'
|
||||||
import { mockEmployees } from '../../../mocks/mockEmployees'
|
import { mockEmployees } from '../../../mocks/mockEmployees'
|
||||||
import { Team, TeamMember, TeamRoleEnum } from '../../../types/common'
|
import { Team, TeamMember, TeamRoleEnum } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SalesTeamEdit: React.FC = () => {
|
const SalesTeamEdit: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -141,12 +142,12 @@ const SalesTeamEdit: React.FC = () => {
|
||||||
|
|
||||||
console.log('Updating sales team:', updatedTeam)
|
console.log('Updating sales team:', updatedTeam)
|
||||||
alert('Satış ekibi başarıyla güncellendi!')
|
alert('Satış ekibi başarıyla güncellendi!')
|
||||||
navigate('/admin/crm/sales-teams')
|
navigate(ROUTES_ENUM.protected.crm.salesTeams)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
if (confirm('Değişiklikler kaydedilmedi. Çıkmak istediğinizden emin misiniz?')) {
|
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.
|
Aradığınız satış ekibi mevcut değil veya silinmiş olabilir.
|
||||||
</p>
|
</p>
|
||||||
<button
|
<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"
|
className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
|
||||||
>
|
>
|
||||||
Geri Dön
|
Geri Dön
|
||||||
|
|
@ -186,7 +187,7 @@ const SalesTeamEdit: React.FC = () => {
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="w-5 h-5" />
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import dayjs from 'dayjs'
|
||||||
import { Team, TeamRoleEnum } from '../../../types/common'
|
import { Team, TeamRoleEnum } from '../../../types/common'
|
||||||
import { getTeamRoleText } from '../../../utils/erp'
|
import { getTeamRoleText } from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SalesTeamView: React.FC = () => {
|
const SalesTeamView: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -38,14 +39,14 @@ const SalesTeamView: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = () => {
|
const handleEdit = () => {
|
||||||
navigate(`/admin/crm/sales-teams/edit/${id}`)
|
navigate(ROUTES_ENUM.protected.crm.salesTeamsEdit.replace(':id', id!))
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDelete = () => {
|
const handleDelete = () => {
|
||||||
if (confirm(`${team?.name} ekibini silmek istediğinizden emin misiniz?`)) {
|
if (confirm(`${team?.name} ekibini silmek istediğinizden emin misiniz?`)) {
|
||||||
console.log('Delete sales team:', id)
|
console.log('Delete sales team:', id)
|
||||||
alert('Ekip silindi (mock)')
|
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.
|
Aradığınız satış ekibi mevcut değil veya silinmiş olabilir.
|
||||||
</p>
|
</p>
|
||||||
<button
|
<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"
|
className="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors"
|
||||||
>
|
>
|
||||||
Geri Dön
|
Geri Dön
|
||||||
|
|
@ -77,7 +78,7 @@ const SalesTeamView: React.FC = () => {
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<button
|
<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"
|
className="p-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors"
|
||||||
>
|
>
|
||||||
<FaArrowLeft className="w-5 h-5" />
|
<FaArrowLeft className="w-5 h-5" />
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import mockSalesTeams from '../../../mocks/mockSalesTeams'
|
||||||
import Widget from '../../../components/common/Widget'
|
import Widget from '../../../components/common/Widget'
|
||||||
import { Team } from '../../../types/common'
|
import { Team } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SalesTeams: React.FC = () => {
|
const SalesTeams: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -28,11 +29,11 @@ const SalesTeams: React.FC = () => {
|
||||||
const [filterStatus, setFilterStatus] = useState<'all' | 'active' | 'inactive'>('all')
|
const [filterStatus, setFilterStatus] = useState<'all' | 'active' | 'inactive'>('all')
|
||||||
|
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
navigate('/admin/crm/sales-teams/new')
|
navigate(ROUTES_ENUM.protected.crm.salesTeamsNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (team: Team) => {
|
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) => {
|
const handleDelete = (id: string) => {
|
||||||
|
|
@ -45,7 +46,7 @@ const SalesTeams: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleViewDetails = (team: Team) => {
|
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
|
// Calculate team performance based on targets
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import {
|
||||||
} from '../../../types/hr'
|
} from '../../../types/hr'
|
||||||
import { mockEmployees } from '../../../mocks/mockEmployees'
|
import { mockEmployees } from '../../../mocks/mockEmployees'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
interface ValidationErrors {
|
interface ValidationErrors {
|
||||||
[key: string]: string
|
[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!')
|
alert(isEdit ? 'Personel başarıyla güncellendi!' : 'Personel başarıyla oluşturuldu!')
|
||||||
|
|
||||||
// Navigate back to list
|
// Navigate back to list
|
||||||
navigate('/admin/hr')
|
navigate(ROUTES_ENUM.protected.hr.employees)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving employee:', error)
|
console.error('Error saving employee:', error)
|
||||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||||
|
|
@ -223,7 +224,7 @@ const EmployeeForm: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/hr')
|
navigate(ROUTES_ENUM.protected.hr.employees)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import {
|
||||||
getEmployeeStatusText,
|
getEmployeeStatusText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const EmployeeList: React.FC = () => {
|
const EmployeeList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -80,7 +81,7 @@ const EmployeeList: React.FC = () => {
|
||||||
const handleEditFromView = (employee: HrEmployee) => {
|
const handleEditFromView = (employee: HrEmployee) => {
|
||||||
setIsViewModalOpen(false)
|
setIsViewModalOpen(false)
|
||||||
// Navigate to edit page - you can replace this with a modal if preferred
|
// 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) {
|
if (isLoading) {
|
||||||
|
|
@ -182,7 +183,7 @@ const EmployeeList: React.FC = () => {
|
||||||
|
|
||||||
{/* Add New Employee */}
|
{/* Add New Employee */}
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
@ -417,7 +418,7 @@ const EmployeeList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
className="p-1 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
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>
|
<p className="mt-1 text-xs text-gray-500">Yeni personel ekleyerek başlayın.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
@ -536,7 +537,7 @@ const EmployeeList: React.FC = () => {
|
||||||
<FaEye className="w-4 h-4" />
|
<FaEye className="w-4 h-4" />
|
||||||
</button>
|
</button>
|
||||||
<Link
|
<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"
|
className="p-1 text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
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>
|
<p className="mt-1 text-xs text-gray-500">Yeni personel ekleyerek başlayın.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import { mockWorkCenters } from '../../../mocks/mockWorkCenters'
|
||||||
import { mockDepartments } from '../../../mocks/mockDepartments'
|
import { mockDepartments } from '../../../mocks/mockDepartments'
|
||||||
import { HrDepartment } from '../../../types/hr'
|
import { HrDepartment } from '../../../types/hr'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
interface ValidationErrors {
|
interface ValidationErrors {
|
||||||
[key: string]: string
|
[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!')
|
alert(isEdit ? 'İş Merkezi başarıyla güncellendi!' : 'İş Merkezi başarıyla oluşturuldu!')
|
||||||
|
|
||||||
// Navigate back to list
|
// Navigate back to list
|
||||||
navigate('/admin/maintenance')
|
navigate(ROUTES_ENUM.protected.maintenance.workcenters)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving Workcenter:', error)
|
console.error('Error saving Workcenter:', error)
|
||||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||||
|
|
@ -211,7 +212,7 @@ const WorkCenterForm: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/maintenance')
|
navigate(ROUTES_ENUM.protected.maintenance.workcenters)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ import {
|
||||||
getCriticalityLevelText,
|
getCriticalityLevelText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const WorkCenterList: React.FC = () => {
|
const WorkCenterList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -119,7 +120,7 @@ const WorkCenterList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
@ -353,7 +354,10 @@ const WorkCenterList: React.FC = () => {
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<div className="flex items-center justify-end space-x-1">
|
<div className="flex items-center justify-end space-x-1">
|
||||||
<Link
|
<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"
|
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"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
|
|
@ -361,7 +365,7 @@ const WorkCenterList: React.FC = () => {
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<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"
|
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
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>
|
<p className="mt-1 text-sm text-gray-500">Yeni iş merkezi ekleyerek başlayın.</p>
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import {
|
||||||
import { mockMaterials } from '../../../mocks/mockMaterials'
|
import { mockMaterials } from '../../../mocks/mockMaterials'
|
||||||
import { PriorityEnum } from '../../../types/common'
|
import { PriorityEnum } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const ProductionOrderForm: React.FC = () => {
|
const ProductionOrderForm: React.FC = () => {
|
||||||
const { id } = useParams()
|
const { id } = useParams()
|
||||||
|
|
@ -170,7 +171,7 @@ const ProductionOrderForm: React.FC = () => {
|
||||||
console.log('Saving production order:', completeFormData)
|
console.log('Saving production order:', completeFormData)
|
||||||
// Here you would normally call an API to save the data
|
// 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
|
// 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 justify-between">
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="mr-2 text-sm" />
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ import {
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { WorkOrderStatusEnum } from '../../../types/pm'
|
import { WorkOrderStatusEnum } from '../../../types/pm'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const ProductionOrderList: React.FC = () => {
|
const ProductionOrderList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -212,9 +213,7 @@ const ProductionOrderList: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<h3 className="text-lg font-semibold text-gray-900">Açık Satış Siparişleri (Step 1)</h3>
|
<h3 className="text-lg font-semibold text-gray-900">Açık Satış Siparişleri (Step 1)</h3>
|
||||||
<p className="text-gray-600">
|
<p className="text-gray-600">Üretim emri oluşturmak için malzeme satırlarını seçin.</p>
|
||||||
Üretim emri oluşturmak için malzeme satırlarını seçin.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="max-h-80 overflow-y-auto space-y-2">
|
<div className="max-h-80 overflow-y-auto space-y-2">
|
||||||
{openSalesOrders.map((order) => (
|
{openSalesOrders.map((order) => (
|
||||||
|
|
@ -955,7 +954,10 @@ const ProductionOrderList: React.FC = () => {
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<div className="flex items-center justify-end space-x-2">
|
<div className="flex items-center justify-end space-x-2">
|
||||||
<Link
|
<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"
|
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"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
|
|
@ -963,7 +965,7 @@ const ProductionOrderList: React.FC = () => {
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<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"
|
className="p-2 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
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>
|
<p className="mt-1 text-sm text-gray-500">Yeni üretim emri oluşturarak başlayın.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import {
|
||||||
import StatusBadge from '../../../components/common/StatusBadge'
|
import StatusBadge from '../../../components/common/StatusBadge'
|
||||||
import { getPriorityColor } from '../../../utils/erp'
|
import { getPriorityColor } from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const ProductionOrderView: React.FC = () => {
|
const ProductionOrderView: React.FC = () => {
|
||||||
const { id } = useParams()
|
const { id } = useParams()
|
||||||
|
|
@ -57,7 +58,7 @@ const ProductionOrderView: React.FC = () => {
|
||||||
İstenen üretim emri mevcut değil veya silinmiş olabilir.
|
İstenen üretim emri mevcut değil veya silinmiş olabilir.
|
||||||
</p>
|
</p>
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="mr-2" />
|
||||||
|
|
@ -81,7 +82,7 @@ const ProductionOrderView: React.FC = () => {
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<button
|
<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"
|
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" />
|
<FaArrowLeft className="mr-2 text-sm" />
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ import {
|
||||||
getProjectTypeText,
|
getProjectTypeText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
// Custom styles for the slider
|
// Custom styles for the slider
|
||||||
const sliderStyles = `
|
const sliderStyles = `
|
||||||
|
|
@ -299,7 +300,7 @@ const ProjectForm: React.FC = () => {
|
||||||
|
|
||||||
alert(isEdit ? 'Proje başarıyla güncellendi!' : 'Proje başarıyla oluşturuldu!')
|
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) {
|
} catch (error) {
|
||||||
console.error('Error saving project:', error)
|
console.error('Error saving project:', error)
|
||||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||||
|
|
@ -309,7 +310,7 @@ const ProjectForm: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/projects')
|
navigate(ROUTES_ENUM.protected.projects.list)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Phase modal handlers
|
// 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 justify-between h-12">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
<Link
|
<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"
|
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" />
|
<FaArrowLeft className="w-4 h-4 mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ import {
|
||||||
getProgressColor,
|
getProgressColor,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const ProjectList: React.FC = () => {
|
const ProjectList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -147,7 +148,7 @@ const ProjectList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
@ -407,7 +408,7 @@ const ProjectList: React.FC = () => {
|
||||||
<td className="px-3 py-2 text-right">
|
<td className="px-3 py-2 text-right">
|
||||||
<div className="flex items-center justify-end space-x-1">
|
<div className="flex items-center justify-end space-x-1">
|
||||||
<Link
|
<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"
|
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"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
|
|
@ -415,7 +416,7 @@ const ProjectList: React.FC = () => {
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<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"
|
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
title="Düzenle"
|
||||||
>
|
>
|
||||||
|
|
@ -482,13 +483,13 @@ const ProjectList: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
<div className="flex space-x-1">
|
<div className="flex space-x-1">
|
||||||
<Link
|
<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"
|
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" />
|
<FaEye className="w-4 h-4" />
|
||||||
</Link>
|
</Link>
|
||||||
<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"
|
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" />
|
<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>
|
<p className="mt-1 text-sm text-gray-500">Yeni proje oluşturarak başlayın.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ import {
|
||||||
getProjectTypeText,
|
getProjectTypeText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const ProjectView: React.FC = () => {
|
const ProjectView: React.FC = () => {
|
||||||
const { id } = useParams<{ id: string }>()
|
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>
|
<p className="mt-1 text-sm text-gray-500">Belirtilen ID ile proje mevcut değil.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<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 justify-between h-12">
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<button
|
<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"
|
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" />
|
<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 className="ml-2">{getProjectStatusText(project.status)}</span>
|
||||||
</span>
|
</span>
|
||||||
<Link
|
<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"
|
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" />
|
<FaEdit className="w-4 h-4 mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import { mockMaterials } from '../../../mocks/mockMaterials'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import { InfoItem, InfoSection } from '../../../components/common/InfoSection'
|
import { InfoItem, InfoSection } from '../../../components/common/InfoSection'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const MaterialCard: React.FC = () => {
|
const MaterialCard: React.FC = () => {
|
||||||
const { id } = useParams()
|
const { id } = useParams()
|
||||||
|
|
@ -72,14 +73,22 @@ const MaterialCard: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center space-x-1.5">
|
<div className="flex items-center space-x-1.5">
|
||||||
<button
|
<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"
|
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" />
|
<FaEdit size={14} className="mr-1.5 inline" />
|
||||||
Düzenle
|
Düzenle
|
||||||
</button>
|
</button>
|
||||||
<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"
|
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" />
|
<FaEye size={14} className="mr-1.5 inline" />
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ import { mockWarehouses } from '../../../mocks/mockWarehouses'
|
||||||
import { mockZones } from '../../../mocks/mockZones'
|
import { mockZones } from '../../../mocks/mockZones'
|
||||||
import { mockLocations } from '../../../mocks/mockLocations'
|
import { mockLocations } from '../../../mocks/mockLocations'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const validationSchema = Yup.object({
|
const validationSchema = Yup.object({
|
||||||
materialCode: Yup.string()
|
materialCode: Yup.string()
|
||||||
|
|
@ -189,7 +190,7 @@ const MaterialForm: React.FC = () => {
|
||||||
console.log('Saving material:', finalData)
|
console.log('Saving material:', finalData)
|
||||||
await new Promise((resolve) => setTimeout(resolve, 1000))
|
await new Promise((resolve) => setTimeout(resolve, 1000))
|
||||||
|
|
||||||
navigate('/admin/supplychain/materials')
|
navigate(ROUTES_ENUM.protected.supplychain.materials)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving material:', error)
|
console.error('Error saving material:', error)
|
||||||
}
|
}
|
||||||
|
|
@ -339,7 +340,7 @@ const MaterialForm: React.FC = () => {
|
||||||
<div className="flex items-center space-x-1.5">
|
<div className="flex items-center space-x-1.5">
|
||||||
<button
|
<button
|
||||||
type="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"
|
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" />
|
<FaTimes size={14} className="mr-1.5 inline" />
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import StatusBadge from '../../../components/common/StatusBadge'
|
||||||
import { MmMaterial } from '../../../types/mm'
|
import { MmMaterial } from '../../../types/mm'
|
||||||
import { mockMaterials } from '../../../mocks/mockMaterials'
|
import { mockMaterials } from '../../../mocks/mockMaterials'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
export interface MaterialSearchFilters {
|
export interface MaterialSearchFilters {
|
||||||
materialCode?: string
|
materialCode?: string
|
||||||
|
|
@ -162,11 +163,11 @@ const MaterialList: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleView = (material: MmMaterial) => {
|
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) => {
|
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) => {
|
const handleDelete = async (material: MmMaterial) => {
|
||||||
|
|
@ -374,7 +375,7 @@ const MaterialList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<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"
|
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" />
|
<FaPlus size={14} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import {
|
||||||
getRequestTypeText,
|
getRequestTypeText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const OrderManagement: React.FC = () => {
|
const OrderManagement: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -75,15 +76,15 @@ const OrderManagement: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAddOrder = () => {
|
const handleAddOrder = () => {
|
||||||
navigate('/admin/supplychain/orders/new')
|
navigate(ROUTES_ENUM.protected.supplychain.ordersNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (order: MmPurchaseOrder) => {
|
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) => {
|
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) => {
|
const handleSelectOrder = (orderId: string) => {
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import { mockBusinessParties } from '../../../mocks/mockBusinessParties'
|
||||||
import { mockPurchaseOrders } from '../../../mocks/mockPurchaseOrders'
|
import { mockPurchaseOrders } from '../../../mocks/mockPurchaseOrders'
|
||||||
import { Address, PaymentTerms } from '../../../types/common'
|
import { Address, PaymentTerms } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const OrderManagementForm: React.FC = () => {
|
const OrderManagementForm: React.FC = () => {
|
||||||
const { id } = useParams<{ id: string }>()
|
const { id } = useParams<{ id: string }>()
|
||||||
|
|
@ -170,11 +171,11 @@ const OrderManagementForm: React.FC = () => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
// TODO: Implement save logic
|
// TODO: Implement save logic
|
||||||
console.log('Saving purchase order:', formData)
|
console.log('Saving purchase order:', formData)
|
||||||
navigate('/admin/supplychain/orders')
|
navigate(ROUTES_ENUM.protected.supplychain.orders)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/supplychain/orders')
|
navigate(ROUTES_ENUM.protected.supplychain.orders)
|
||||||
}
|
}
|
||||||
|
|
||||||
const isReadOnly = isView
|
const isReadOnly = isView
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import { mockMaterials } from '../../../mocks/mockMaterials'
|
||||||
import { mockPurchaseRequests } from '../../../mocks/mockPurchaseRequests'
|
import { mockPurchaseRequests } from '../../../mocks/mockPurchaseRequests'
|
||||||
import { PriorityEnum } from '../../../types/common'
|
import { PriorityEnum } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const PurchaseRequestForm: React.FC = () => {
|
const PurchaseRequestForm: React.FC = () => {
|
||||||
const { id } = useParams<{ id: string }>()
|
const { id } = useParams<{ id: string }>()
|
||||||
|
|
@ -113,11 +114,11 @@ const PurchaseRequestForm: React.FC = () => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
// TODO: Implement save logic
|
// TODO: Implement save logic
|
||||||
console.log('Saving purchase request:', formData)
|
console.log('Saving purchase request:', formData)
|
||||||
navigate('/admin/supplychain/requests')
|
navigate(ROUTES_ENUM.protected.supplychain.requests)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/supplychain/requests')
|
navigate(ROUTES_ENUM.protected.supplychain.requests)
|
||||||
}
|
}
|
||||||
|
|
||||||
const isReadOnly = isView
|
const isReadOnly = isView
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import {
|
||||||
getRequestStatusText,
|
getRequestStatusText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const PurchaseRequests: React.FC = () => {
|
const PurchaseRequests: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -49,15 +50,15 @@ const PurchaseRequests: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (request: MmPurchaseRequest) => {
|
const handleEdit = (request: MmPurchaseRequest) => {
|
||||||
navigate(`/admin/supplychain/requests/edit/${request.id}`)
|
navigate(ROUTES_ENUM.protected.supplychain.requestsEdit.replace(':id', request.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAddNew = () => {
|
const handleAddNew = () => {
|
||||||
navigate('/admin/supplychain/requests/new')
|
navigate(ROUTES_ENUM.protected.supplychain.requestsNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleViewDetails = (request: MmPurchaseRequest) => {
|
const handleViewDetails = (request: MmPurchaseRequest) => {
|
||||||
navigate(`/admin/supplychain/requests/view/${request.id}`)
|
navigate(ROUTES_ENUM.protected.supplychain.requestsView.replace(':id', request.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ import {
|
||||||
getRequisitionStatusText,
|
getRequisitionStatusText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const PurchaseRequisitionList: React.FC = () => {
|
const PurchaseRequisitionList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -119,7 +120,7 @@ const PurchaseRequisitionList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
@ -347,7 +348,10 @@ const PurchaseRequisitionList: React.FC = () => {
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<div className="flex items-center justify-end space-x-2">
|
<div className="flex items-center justify-end space-x-2">
|
||||||
<Link
|
<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"
|
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"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
|
|
@ -356,7 +360,10 @@ const PurchaseRequisitionList: React.FC = () => {
|
||||||
|
|
||||||
{requisition.status === RequisitionStatusEnum.Draft && (
|
{requisition.status === RequisitionStatusEnum.Draft && (
|
||||||
<Link
|
<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"
|
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
title="Düzenle"
|
||||||
>
|
>
|
||||||
|
|
@ -382,7 +389,7 @@ const PurchaseRequisitionList: React.FC = () => {
|
||||||
</p>
|
</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import {
|
||||||
import { mockMaterials } from '../../../mocks/mockMaterials'
|
import { mockMaterials } from '../../../mocks/mockMaterials'
|
||||||
import { mockBusinessParties } from '../../../mocks/mockBusinessParties'
|
import { mockBusinessParties } from '../../../mocks/mockBusinessParties'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const QuotationForm: React.FC = () => {
|
const QuotationForm: React.FC = () => {
|
||||||
const { id } = useParams<{ id: string }>()
|
const { id } = useParams<{ id: string }>()
|
||||||
|
|
@ -130,11 +131,11 @@ const QuotationForm: React.FC = () => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
// TODO: Implement save logic
|
// TODO: Implement save logic
|
||||||
console.log('Saving quotation:', formData)
|
console.log('Saving quotation:', formData)
|
||||||
navigate('/admin/supplychain/quotations')
|
navigate(ROUTES_ENUM.protected.supplychain.quotations)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/supplychain/quotations')
|
navigate(ROUTES_ENUM.protected.supplychain.quotations)
|
||||||
}
|
}
|
||||||
|
|
||||||
const isReadOnly = isView
|
const isReadOnly = isView
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import {
|
||||||
getRequestTypeText,
|
getRequestTypeText,
|
||||||
} from '../../../utils/erp'
|
} from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const QuotationManagement: React.FC = () => {
|
const QuotationManagement: React.FC = () => {
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
@ -60,7 +61,7 @@ const QuotationManagement: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAddQuotation = () => {
|
const handleAddQuotation = () => {
|
||||||
navigate('/admin/supplychain/quotations/new')
|
navigate(ROUTES_ENUM.protected.supplychain.quotationsNew)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleBulkQuotation = () => {
|
const handleBulkQuotation = () => {
|
||||||
|
|
@ -82,11 +83,11 @@ const QuotationManagement: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (quotation: MmQuotation) => {
|
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) => {
|
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) => {
|
const handleSelectQuotation = (quotationId: string) => {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import LoadingSpinner from '../../../components/common/LoadingSpinner'
|
||||||
import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
import { mockBusinessParties, mockBusinessPartyNew } from '../../../mocks/mockBusinessParties'
|
||||||
import { BusinessParty } from '../../../types/common'
|
import { BusinessParty } from '../../../types/common'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
interface ValidationErrors {
|
interface ValidationErrors {
|
||||||
[key: string]: string
|
[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!')
|
alert(isEdit ? 'Tedarikçi başarıyla güncellendi!' : 'Tedarikçi başarıyla oluşturuldu!')
|
||||||
|
|
||||||
// Navigate back to list
|
// Navigate back to list
|
||||||
navigate('/admin/supplychain')
|
navigate(ROUTES_ENUM.protected.supplychain.suppliers)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving supplier:', error)
|
console.error('Error saving supplier:', error)
|
||||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||||
|
|
@ -140,7 +141,7 @@ const SupplierForm: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/supplychain')
|
navigate(ROUTES_ENUM.protected.supplychain.suppliers)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import { mockBusinessParties } from '../../../mocks/mockBusinessParties'
|
||||||
import { PartyType } from '../../../types/common'
|
import { PartyType } from '../../../types/common'
|
||||||
import { getSupplierTypeColor, getSupplierTypeText, getRatingColor } from '../../../utils/erp'
|
import { getSupplierTypeColor, getSupplierTypeText, getRatingColor } from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const SupplierList: React.FC = () => {
|
const SupplierList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -115,7 +116,7 @@ const SupplierList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
@ -367,7 +368,10 @@ const SupplierList: React.FC = () => {
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<div className="flex items-center justify-end space-x-2">
|
<div className="flex items-center justify-end space-x-2">
|
||||||
<Link
|
<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"
|
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"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
|
|
@ -375,7 +379,10 @@ const SupplierList: React.FC = () => {
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<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"
|
className="p-1.5 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
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>
|
<p className="mt-1 text-sm text-gray-500">Yeni tedarikçi ekleyerek başlayın.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import { WmWarehouse, WarehouseTypeEnum } from '../../../types/wm'
|
||||||
import { SecurityLevelEnum } from '../../../types/mrp'
|
import { SecurityLevelEnum } from '../../../types/mrp'
|
||||||
import { mockWarehouses } from '../../../mocks/mockWarehouses'
|
import { mockWarehouses } from '../../../mocks/mockWarehouses'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
interface ValidationErrors {
|
interface ValidationErrors {
|
||||||
[key: string]: string
|
[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!')
|
alert(isEdit ? 'Depo başarıyla güncellendi!' : 'Depo başarıyla oluşturuldu!')
|
||||||
|
|
||||||
// Navigate back to list
|
// Navigate back to list
|
||||||
navigate('/admin/warehouse')
|
navigate(ROUTES_ENUM.protected.warehouse.warehouses)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error saving warehouse:', error)
|
console.error('Error saving warehouse:', error)
|
||||||
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
alert('Bir hata oluştu. Lütfen tekrar deneyin.')
|
||||||
|
|
@ -149,7 +150,7 @@ const WarehouseForm: React.FC = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
navigate('/admin/warehouse')
|
navigate(ROUTES_ENUM.protected.warehouse.warehouses)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import { WarehouseTypeEnum } from '../../../types/wm'
|
||||||
import { mockWarehouses } from '../../../mocks/mockWarehouses'
|
import { mockWarehouses } from '../../../mocks/mockWarehouses'
|
||||||
import { getWarehouseTypeColor, getWarehouseTypeText } from '../../../utils/erp'
|
import { getWarehouseTypeColor, getWarehouseTypeText } from '../../../utils/erp'
|
||||||
import { Container } from '@/components/shared'
|
import { Container } from '@/components/shared'
|
||||||
|
import { ROUTES_ENUM } from '@/routes/route.constant'
|
||||||
|
|
||||||
const WarehouseList: React.FC = () => {
|
const WarehouseList: React.FC = () => {
|
||||||
const [searchTerm, setSearchTerm] = useState('')
|
const [searchTerm, setSearchTerm] = useState('')
|
||||||
|
|
@ -115,7 +116,7 @@ const WarehouseList: React.FC = () => {
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={14} className="mr-2" />
|
||||||
|
|
@ -364,7 +365,10 @@ const WarehouseList: React.FC = () => {
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<div className="flex items-center justify-end space-x-2">
|
<div className="flex items-center justify-end space-x-2">
|
||||||
<Link
|
<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"
|
className="p-2 text-gray-600 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors"
|
||||||
title="Detayları Görüntüle"
|
title="Detayları Görüntüle"
|
||||||
>
|
>
|
||||||
|
|
@ -372,7 +376,10 @@ const WarehouseList: React.FC = () => {
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<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"
|
className="p-2 text-gray-600 hover:text-yellow-600 hover:bg-yellow-50 rounded-lg transition-colors"
|
||||||
title="Düzenle"
|
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>
|
<p className="mt-1 text-sm text-gray-500">Yeni depo ekleyerek başlayın.</p>
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<Link
|
<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"
|
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" />
|
<FaPlus size={16} className="mr-2" />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue