Maintenance Plan -> Plan

This commit is contained in:
Sedat ÖZTÜRK 2025-12-02 16:03:18 +03:00
parent f17d1da1bd
commit 483a249428
19 changed files with 1517 additions and 1507 deletions

View file

@ -9503,25 +9503,25 @@
"resourceName": "Platform",
"key": "App.Maintenance.Plan",
"tr": "Bakım Planları",
"en": "Maintenance Plans"
"en": "Plans"
},
{
"resourceName": "Platform",
"key": "App.Maintenance.PlanEmployee",
"tr": "Bakım Planı Personelleri",
"en": "Maintenance Plan Employees"
"tr": "Personeller",
"en": "Employees"
},
{
"resourceName": "Platform",
"key": "App.Maintenance.PlanMaterial",
"tr": "Bakım Planı Malzemeleri",
"en": "Maintenance Plan Materials"
"tr": "Malzemeler",
"en": "Materials"
},
{
"resourceName": "Platform",
"key": "App.Maintenance.Calendar",
"tr": "Bakım Takvimi",
"en": "Maintenance Calendar"
"en": "Calendar"
},
{
"resourceName": "Platform",

View file

@ -752,7 +752,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
}, autoSave: true
);
#region MaintenancePlan Fields
#region Plan Fields
await _listFormFieldRepository.InsertManyAsync([
new() {
ListFormCode = listForm.ListFormCode,
@ -1266,7 +1266,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "MaintenancePlanId"
ChildFieldName = "PlanId"
}
}
},
@ -1278,7 +1278,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new {
ParentFieldName = "Id",
DbType = DbType.Guid,
ChildFieldName = "MaintenancePlanId"
ChildFieldName = "PlanId"
}
}
}

View file

@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenancePlan : FullAuditedEntity<Guid>, IMultiTenant
public class Plan : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
@ -25,6 +25,6 @@ public class MaintenancePlan : FullAuditedEntity<Guid>, IMultiTenant
// Collections
public string RequiredSkillsJson { get; set; }
public List<MaintenancePlanMaterial> Materials { get; set; }
public List<MaintenancePlanEmployee> Employees { get; set; }
public List<PlanMaterial> Materials { get; set; }
public List<PlanEmployee> Employees { get; set; }
}

View file

@ -4,12 +4,12 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenancePlanEmployee : FullAuditedEntity<Guid>, IMultiTenant
public class PlanEmployee : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid MaintenancePlanId { get; set; }
public MaintenancePlan MaintenancePlan { get; set; }
public Guid PlanId { get; set; }
public Plan Plan { get; set; }
public Guid EmployeeId { get; set; }
public DateTime StartDate { get; set; }

View file

@ -4,12 +4,12 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenancePlanMaterial : FullAuditedEntity<Guid>, IMultiTenant
public class PlanMaterial : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid MaintenancePlanId { get; set; }
public MaintenancePlan MaintenancePlan { get; set; }
public Guid PlanId { get; set; }
public Plan Plan { get; set; }
public Guid MaterialId { get; set; }
public decimal Quantity { get; set; }

View file

@ -35,7 +35,7 @@ public class Workcenter : FullAuditedEntity<Guid>, IMultiTenant
public ICollection<WorkcenterSpecification> Specifications { get; set; }
public ICollection<Operation> Operations { get; set; }
// public virtual ICollection<PmMaintenancePlan> MaintenancePlans { get; set; }
// public virtual ICollection<PmMaintenanceWorkOrder> WorkOrders { get; set; }
public virtual ICollection<Plan> Plans { get; set; }
public virtual ICollection<Workorder> Workorders { get; set; }
// public virtual ICollection<PmDownTimeRecord> DownTimeHistory { get; set; }
}

View file

@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenanceWorkorder : FullAuditedEntity<Guid>, IMultiTenant
public class Workorder : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
@ -14,10 +14,10 @@ public class MaintenanceWorkorder : FullAuditedEntity<Guid>, IMultiTenant
public Workcenter Workcenter { get; set; }
public Guid? PlanId { get; set; }
public MaintenancePlan Plan { get; set; }
public Plan Plan { get; set; }
public Guid OrderTypeId { get; set; } //Preventive, Corrective, Emergency, Inspection, Calibration
public MaintenanceWorkorderType OrderType { get; set; }
public WorkorderType OrderType { get; set; }
public string Priority { get; set; } //Low, Medium, High, Urgent
public string Status { get; set; } //Created, Planned, Released, InProgress, OnHold, Completed, Cancelled
@ -37,6 +37,6 @@ public class MaintenanceWorkorder : FullAuditedEntity<Guid>, IMultiTenant
public string Notes { get; set; }
public string CompletionNotes { get; set; }
public ICollection<MaintenanceWorkorderMaterial> Materials { get; set; }
public ICollection<MaintenanceWorkorderActivity> Activities { get; set; }
public ICollection<WorkorderMaterial> Materials { get; set; }
public ICollection<WorkorderActivity> Activities { get; set; }
}

View file

@ -4,12 +4,12 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenanceWorkorderActivity : FullAuditedEntity<Guid>, IMultiTenant
public class WorkorderActivity : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid WorkOrderId { get; set; }
public MaintenanceWorkorder WorkOrder { get; set; }
public Workorder WorkOrder { get; set; }
public string ActivityDescription { get; set; }

View file

@ -4,12 +4,12 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenanceWorkorderMaterial : FullAuditedEntity<Guid>, IMultiTenant
public class WorkorderMaterial : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid WorkOrderId { get; set; }
public MaintenanceWorkorder WorkOrder { get; set; }
public Workorder WorkOrder { get; set; }
public Guid MaterialId { get; set; }
public Material Material { get; set; }

View file

@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenanceWorkorderStatus : FullAuditedEntity<Guid>, IMultiTenant
public class WorkorderStatus : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
@ -13,6 +13,6 @@ public class MaintenanceWorkorderStatus : FullAuditedEntity<Guid>, IMultiTenant
public string Description { get; set; }
public bool IsActive { get; set; }
public ICollection<MaintenanceWorkorder> Workorders { get; set; }
public ICollection<Workorder> Workorders { get; set; }
}

View file

@ -5,7 +5,7 @@ using Volo.Abp.MultiTenancy;
namespace Erp.Platform.Entities;
public class MaintenanceWorkorderType : FullAuditedEntity<Guid>, IMultiTenant
public class WorkorderType : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
@ -14,6 +14,6 @@ public class MaintenanceWorkorderType : FullAuditedEntity<Guid>, IMultiTenant
public string Description { get; set; }
public bool IsActive { get; set; }
public ICollection<MaintenanceWorkorder> Workorders { get; set; }
public ICollection<Workorder> Workorders { get; set; }
}

View file

@ -252,13 +252,13 @@ public class PlatformDbContext :
public DbSet<WorkcenterStatus> WorkcenterStatuses { get; set; }
public DbSet<Workcenter> Workcenters { get; set; }
public DbSet<WorkcenterSpecification> WorkcenterSpecifications { get; set; }
public DbSet<MaintenancePlan> MaintenancePlans { get; set; }
public DbSet<Plan> Plans { get; set; }
public DbSet<Fault> Faults { get; set; }
public DbSet<FaultStatus> FaultStatuses { get; set; }
public DbSet<FaultType> FaultTypes { get; set; }
public DbSet<MaintenanceWorkorderType> WorkorderTypes { get; set; }
public DbSet<MaintenanceWorkorderStatus> WorkorderStatuses { get; set; }
public DbSet<MaintenanceWorkorder> Workorders { get; set; }
public DbSet<WorkorderType> WorkorderTypes { get; set; }
public DbSet<WorkorderStatus> WorkorderStatuses { get; set; }
public DbSet<Workorder> Workorders { get; set; }
#endregion
#region Mrp
@ -2824,7 +2824,7 @@ public class PlatformDbContext :
.OnDelete(DeleteBehavior.Cascade);
});
builder.Entity<MaintenancePlan>(b =>
builder.Entity<Plan>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Plan)), Prefix.DbSchema);
b.ConfigureByConvention();
@ -2840,36 +2840,41 @@ public class PlatformDbContext :
b.Property(x => x.Instructions).IsRequired().HasMaxLength(2000);
b.Property(x => x.RequiredSkillsJson).HasMaxLength(1000);
b.Property(x => x.NextDue).IsRequired();
b.Property(x => x.IsActive);
b.Property(x => x.IsActive).HasDefaultValue(true);
b.Property(x => x.LastExecuted).IsRequired();
b.HasOne(x => x.Workcenter)
.WithMany(x => x.Plans)
.HasForeignKey(x => x.WorkcenterId)
.OnDelete(DeleteBehavior.Restrict);
});
builder.Entity<MaintenancePlanMaterial>(b =>
builder.Entity<PlanMaterial>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PlanMaterial)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.MaintenancePlanId).IsRequired();
b.Property(x => x.PlanId).IsRequired();
b.Property(x => x.MaterialId).IsRequired();
b.Property(x => x.Quantity).HasPrecision(18, 2).HasDefaultValue(0);
b.HasOne(x => x.MaintenancePlan)
b.HasOne(x => x.Plan)
.WithMany(x => x.Materials)
.HasForeignKey(x => x.MaintenancePlanId)
.HasForeignKey(x => x.PlanId)
.OnDelete(DeleteBehavior.Cascade);
});
builder.Entity<MaintenancePlanEmployee>(b =>
builder.Entity<PlanEmployee>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PlanEmployee)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.MaintenancePlanId).IsRequired();
b.Property(x => x.PlanId).IsRequired();
b.Property(x => x.EmployeeId).IsRequired();
b.HasOne(x => x.MaintenancePlan)
b.HasOne(x => x.Plan)
.WithMany(x => x.Employees)
.HasForeignKey(x => x.MaintenancePlanId)
.HasForeignKey(x => x.PlanId)
.OnDelete(DeleteBehavior.Cascade);
});
@ -2913,7 +2918,7 @@ public class PlatformDbContext :
b.Property(x => x.IsActive).HasDefaultValue(true);
});
builder.Entity<MaintenanceWorkorderType>(b =>
builder.Entity<WorkorderType>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderType)), Prefix.DbSchema);
b.ConfigureByConvention();
@ -2923,7 +2928,7 @@ public class PlatformDbContext :
b.Property(x => x.IsActive).HasDefaultValue(true);
});
builder.Entity<MaintenanceWorkorderStatus>(b =>
builder.Entity<WorkorderStatus>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderStatus)), Prefix.DbSchema);
b.ConfigureByConvention();

View file

@ -5581,7 +5581,7 @@ namespace Erp.Platform.Migrations
EstimatedDuration = table.Column<int>(type: "int", nullable: false),
Instructions = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false),
NextDue = table.Column<DateTime>(type: "datetime2", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
LastExecuted = table.Column<DateTime>(type: "datetime2", nullable: false),
RequiredSkillsJson = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
@ -5600,7 +5600,7 @@ namespace Erp.Platform.Migrations
column: x => x.WorkcenterId,
principalTable: "Mnt_T_Workcenter",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
@ -6261,7 +6261,7 @@ namespace Erp.Platform.Migrations
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaintenancePlanId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PlanId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
EmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
StartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
EndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
@ -6278,8 +6278,8 @@ namespace Erp.Platform.Migrations
{
table.PrimaryKey("PK_Mnt_T_PlanEmployee", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_PlanEmployee_Mnt_T_Plan_MaintenancePlanId",
column: x => x.MaintenancePlanId,
name: "FK_Mnt_T_PlanEmployee_Mnt_T_Plan_PlanId",
column: x => x.PlanId,
principalTable: "Mnt_T_Plan",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
@ -6291,7 +6291,7 @@ namespace Erp.Platform.Migrations
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaintenancePlanId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PlanId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Quantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
@ -6306,8 +6306,8 @@ namespace Erp.Platform.Migrations
{
table.PrimaryKey("PK_Mnt_T_PlanMaterial", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_PlanMaterial_Mnt_T_Plan_MaintenancePlanId",
column: x => x.MaintenancePlanId,
name: "FK_Mnt_T_PlanMaterial_Mnt_T_Plan_PlanId",
column: x => x.PlanId,
principalTable: "Mnt_T_Plan",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
@ -6336,7 +6336,7 @@ namespace Erp.Platform.Migrations
ActualCost = table.Column<int>(type: "int", nullable: false),
Notes = table.Column<string>(type: "nvarchar(max)", nullable: true),
CompletionNotes = table.Column<string>(type: "nvarchar(max)", nullable: true),
MaintenanceWorkorderStatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
WorkorderStatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
@ -6360,8 +6360,8 @@ namespace Erp.Platform.Migrations
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Workorders_Mnt_T_WorkorderStatus_MaintenanceWorkorderStatusId",
column: x => x.MaintenanceWorkorderStatusId,
name: "FK_Workorders_Mnt_T_WorkorderStatus_WorkorderStatusId",
column: x => x.WorkorderStatusId,
principalTable: "Mnt_T_WorkorderStatus",
principalColumn: "Id");
table.ForeignKey(
@ -6807,7 +6807,7 @@ namespace Erp.Platform.Migrations
});
migrationBuilder.CreateTable(
name: "MaintenanceWorkorderActivity",
name: "WorkorderActivity",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
@ -6829,9 +6829,9 @@ namespace Erp.Platform.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_MaintenanceWorkorderActivity", x => x.Id);
table.PrimaryKey("PK_WorkorderActivity", x => x.Id);
table.ForeignKey(
name: "FK_MaintenanceWorkorderActivity_Workorders_WorkOrderId",
name: "FK_WorkorderActivity_Workorders_WorkOrderId",
column: x => x.WorkOrderId,
principalTable: "Workorders",
principalColumn: "Id",
@ -6839,7 +6839,7 @@ namespace Erp.Platform.Migrations
});
migrationBuilder.CreateTable(
name: "MaintenanceWorkorderMaterial",
name: "WorkorderMaterial",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
@ -6860,15 +6860,15 @@ namespace Erp.Platform.Migrations
},
constraints: table =>
{
table.PrimaryKey("PK_MaintenanceWorkorderMaterial", x => x.Id);
table.PrimaryKey("PK_WorkorderMaterial", x => x.Id);
table.ForeignKey(
name: "FK_MaintenanceWorkorderMaterial_Scp_T_Material_MaterialId",
name: "FK_WorkorderMaterial_Scp_T_Material_MaterialId",
column: x => x.MaterialId,
principalTable: "Scp_T_Material",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_MaintenanceWorkorderMaterial_Workorders_WorkOrderId",
name: "FK_WorkorderMaterial_Workorders_WorkOrderId",
column: x => x.WorkOrderId,
principalTable: "Workorders",
principalColumn: "Id",
@ -7879,21 +7879,6 @@ namespace Erp.Platform.Migrations
table: "Hr_T_SurveyResponse",
column: "SurveyId");
migrationBuilder.CreateIndex(
name: "IX_MaintenanceWorkorderActivity_WorkOrderId",
table: "MaintenanceWorkorderActivity",
column: "WorkOrderId");
migrationBuilder.CreateIndex(
name: "IX_MaintenanceWorkorderMaterial_MaterialId",
table: "MaintenanceWorkorderMaterial",
column: "MaterialId");
migrationBuilder.CreateIndex(
name: "IX_MaintenanceWorkorderMaterial_WorkOrderId",
table: "MaintenanceWorkorderMaterial",
column: "WorkOrderId");
migrationBuilder.CreateIndex(
name: "IX_MaterialUom_MaterialsId",
table: "MaterialUom",
@ -7920,14 +7905,14 @@ namespace Erp.Platform.Migrations
column: "WorkcenterId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_PlanEmployee_MaintenancePlanId",
name: "IX_Mnt_T_PlanEmployee_PlanId",
table: "Mnt_T_PlanEmployee",
column: "MaintenancePlanId");
column: "PlanId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_PlanMaterial_MaintenancePlanId",
name: "IX_Mnt_T_PlanMaterial_PlanId",
table: "Mnt_T_PlanMaterial",
column: "MaintenancePlanId");
column: "PlanId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_Workcenter_DepartmentId",
@ -8571,9 +8556,19 @@ namespace Erp.Platform.Migrations
column: "ZoneTypeId");
migrationBuilder.CreateIndex(
name: "IX_Workorders_MaintenanceWorkorderStatusId",
table: "Workorders",
column: "MaintenanceWorkorderStatusId");
name: "IX_WorkorderActivity_WorkOrderId",
table: "WorkorderActivity",
column: "WorkOrderId");
migrationBuilder.CreateIndex(
name: "IX_WorkorderMaterial_MaterialId",
table: "WorkorderMaterial",
column: "MaterialId");
migrationBuilder.CreateIndex(
name: "IX_WorkorderMaterial_WorkOrderId",
table: "WorkorderMaterial",
column: "WorkOrderId");
migrationBuilder.CreateIndex(
name: "IX_Workorders_OrderTypeId",
@ -8590,6 +8585,11 @@ namespace Erp.Platform.Migrations
table: "Workorders",
column: "WorkcenterId");
migrationBuilder.CreateIndex(
name: "IX_Workorders_WorkorderStatusId",
table: "Workorders",
column: "WorkorderStatusId");
migrationBuilder.AddForeignKey(
name: "FK_Acc_T_CurrentAccount_Adm_T_Partner_PartnerId",
table: "Acc_T_CurrentAccount",
@ -8912,12 +8912,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Hr_T_SurveyQuestionOption");
migrationBuilder.DropTable(
name: "MaintenanceWorkorderActivity");
migrationBuilder.DropTable(
name: "MaintenanceWorkorderMaterial");
migrationBuilder.DropTable(
name: "MaterialUom");
@ -9113,6 +9107,12 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Str_T_PutawayCondition");
migrationBuilder.DropTable(
name: "WorkorderActivity");
migrationBuilder.DropTable(
name: "WorkorderMaterial");
migrationBuilder.DropTable(
name: "AbpEntityChanges");
@ -9164,9 +9164,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Hr_T_SurveyQuestion");
migrationBuilder.DropTable(
name: "Workorders");
migrationBuilder.DropTable(
name: "Mnt_T_FaultStatus");
@ -9245,6 +9242,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Str_T_Putaway");
migrationBuilder.DropTable(
name: "Workorders");
migrationBuilder.DropTable(
name: "AbpAuditLogs");
@ -9263,15 +9263,6 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Hr_T_Survey");
migrationBuilder.DropTable(
name: "Mnt_T_Plan");
migrationBuilder.DropTable(
name: "Mnt_T_WorkorderStatus");
migrationBuilder.DropTable(
name: "Mnt_T_WorkorderType");
migrationBuilder.DropTable(
name: "Mrp_T_BomType");
@ -9327,10 +9318,16 @@ namespace Erp.Platform.Migrations
name: "Str_T_ZoneType");
migrationBuilder.DropTable(
name: "Sas_T_Branch");
name: "Mnt_T_Plan");
migrationBuilder.DropTable(
name: "Mnt_T_Workcenter");
name: "Mnt_T_WorkorderStatus");
migrationBuilder.DropTable(
name: "Mnt_T_WorkorderType");
migrationBuilder.DropTable(
name: "Sas_T_Branch");
migrationBuilder.DropTable(
name: "Mrp_T_OperationCategory");
@ -9341,6 +9338,9 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Str_T_WarehouseType");
migrationBuilder.DropTable(
name: "Mnt_T_Workcenter");
migrationBuilder.DropTable(
name: "Mnt_T_WorkcenterStatus");

View file

@ -108,12 +108,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
private readonly IRepository<WorkcenterType, Guid> _workcenterTypeRepository;
private readonly IRepository<WorkcenterStatus, Guid> _workcenterStatusRepository;
private readonly IRepository<Workcenter, Guid> _workcenterRepository;
private readonly IRepository<MaintenancePlan, Guid> _maintenancePlanRepository;
private readonly IRepository<Plan, Guid> _maintenancePlanRepository;
private readonly IRepository<Fault, Guid> _faultRepository;
private readonly IRepository<FaultStatus, Guid> _faultStatusRepository;
private readonly IRepository<FaultType, Guid> _faultTypeRepository;
private readonly IRepository<MaintenanceWorkorderType, Guid> _workorderTypeRepository;
private readonly IRepository<MaintenanceWorkorderStatus, Guid> _workorderStatusRepository;
private readonly IRepository<WorkorderType, Guid> _workorderTypeRepository;
private readonly IRepository<WorkorderStatus, Guid> _workorderStatusRepository;
private readonly IRepository<WarehouseType, Guid> _warehouseTypeRepository;
private readonly IRepository<Warehouse, Guid> _warehouseRepository;
private readonly IRepository<ZoneType, Guid> _zoneTypeRepository;
@ -230,12 +230,12 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<WorkcenterType, Guid> workcenterTypeRepository,
IRepository<WorkcenterStatus, Guid> workcenterStatusRepository,
IRepository<Workcenter, Guid> workcenterRepository,
IRepository<MaintenancePlan, Guid> maintenancePlanRepository,
IRepository<Plan, Guid> maintenancePlanRepository,
IRepository<Fault, Guid> faultRepository,
IRepository<FaultStatus, Guid> faultStatusRepository,
IRepository<FaultType, Guid> faultTypeRepository,
IRepository<MaintenanceWorkorderType, Guid> workorderTypeRepository,
IRepository<MaintenanceWorkorderStatus, Guid> workorderStatusRepository,
IRepository<WorkorderType, Guid> workorderTypeRepository,
IRepository<WorkorderStatus, Guid> workorderStatusRepository,
IRepository<WarehouseType, Guid> warehouseTypeRepository,
IRepository<Warehouse, Guid> warehouseRepository,
IRepository<ZoneType, Guid> zoneTypeRepository,
@ -2072,7 +2072,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Code == item.WorkCenterCode);
await _maintenancePlanRepository.InsertAsync(new MaintenancePlan
await _maintenancePlanRepository.InsertAsync(new Plan
{
Code = item.Code,
WorkcenterId = workcenter?.Id,
@ -2153,7 +2153,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
if (exists)
continue;
await _workorderTypeRepository.InsertAsync(new MaintenanceWorkorderType
await _workorderTypeRepository.InsertAsync(new WorkorderType
{
Name = item.Name,
Description = item.Description,
@ -2167,7 +2167,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
if (exists)
continue;
await _workorderStatusRepository.InsertAsync(new MaintenanceWorkorderStatus
await _workorderStatusRepository.InsertAsync(new WorkorderStatus
{
Name = item.Name,
Description = item.Description,

View file

@ -22,7 +22,6 @@ const AssignWorkOrderModal: React.FC<AssignWorkOrderModalProps> = ({
if (!isOpen) return null
// Get available maintenance plans
const availablePlans = mockMaintenancePlans.filter((plan) => plan.isActive)
const handleBulkPlanChange = (planId: string) => {

View file

@ -144,13 +144,7 @@ const ViewWorkCenterModal: React.FC<ViewWorkCenterModalProps> = ({
<div className="flex justify-between">
<span className="text-gray-600">İş Merkezi Tipi:</span>
<span className="text-gray-900 font-medium">
{workCenter.workCenterType?.name || '-'}
</span>
</div>
<div className="flex justify-between">
<span className="text-gray-600">Kategori:</span>
<span className="text-gray-900 font-medium">
{workCenter.workCenterType?.category || '-'}
{workCenter.name || '-'}
</span>
</div>
</div>
@ -257,7 +251,7 @@ const ViewWorkCenterModal: React.FC<ViewWorkCenterModalProps> = ({
</div>
)}
{/* Maintenance Plans Summary */}
{/* Summary */}
<div>
<h3 className="text-base font-medium text-gray-900 mb-2">Bakım Planları</h3>
<div className="bg-gray-50 p-3 rounded-lg">

View file

@ -350,7 +350,7 @@ const WorkCenterCards: React.FC = () => {
>
{getCriticalityLevelText(workCenter.criticality)} Kritiklik
</span>
<span className="text-xs text-gray-500">{workCenter.workCenterType?.name}</span>
<span className="text-xs text-gray-500">{workCenter?.name}</span>
</div>
{workCenter.warrantyExpiry && (