Maintenance Plan, Employee, Material

This commit is contained in:
Sedat Öztürk 2025-11-20 23:30:49 +03:00
parent a3c307c72a
commit 279d285f76
19 changed files with 541 additions and 168 deletions

View file

@ -27,6 +27,14 @@ public static class LookupQueryValues
$"ORDER BY \"{DisplayExpr}\";"
});
public static string TechnicalSkillsValues =
$"SELECT " +
$"\"Name\" AS \"Key\", " +
$"\"Name\" AS \"Name\" " +
$"FROM \"{FullNameTable(TableNameEnum.Skill)}\" " +
$"WHERE \"SkillTypeId\" IN (SELECT \"Id\" FROM \"{FullNameTable(TableNameEnum.SkillType)}\" WHERE \"Name\"='Technical Skills' ) " +
$"ORDER BY \"Name\"";
public static string CustomerValues =
$"SELECT " +
$"\"Id\" AS \"Key\", " +

View file

@ -9432,6 +9432,18 @@
"tr": "Bakım Planları",
"en": "Maintenance Plans"
},
{
"resourceName": "Platform",
"key": "App.Maintenance.PlanEmployee",
"tr": "Bakım Planı Personelleri",
"en": "Maintenance Plan Employees"
},
{
"resourceName": "Platform",
"key": "App.Maintenance.PlanMaterial",
"tr": "Bakım Planı Malzemeleri",
"en": "Maintenance Plan Materials"
},
{
"resourceName": "Platform",
"key": "App.Maintenance.Calendar",

View file

@ -714,7 +714,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsOrganizationUnit = false,
Description = AppCodes.Maintenance.Plan,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaintenancePlan)),
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Plan)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
@ -726,11 +726,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Maintenance.Plan),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaintenancePlan)),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Plan)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Maintenance.Plan, 500, 500, true, true, true, true, false),
EditingOptionJson = DefaultEditingOptionJson(AppCodes.Maintenance.Plan, 800, 550, true, true, true, true, false),
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
new() {
Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items=
@ -758,9 +758,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
]}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Frequency", FieldDbType = DbType.Boolean, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "Frequency", FieldDbType = DbType.Int32, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "EstimatedDuration", FieldDbType = DbType.Boolean, Value = "60", CustomValueType = FieldCustomValueTypeEnum.Value },
new() { FieldName = "EstimatedDuration", FieldDbType = DbType.Int32, Value = "60", CustomValueType = FieldCustomValueTypeEnum.Value },
}),
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
new() {
@ -770,6 +770,13 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
AuthName = AppCodes.Maintenance.Plan,
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Plan)}/@Id"
},
new() {
Hint = "Work Order",
Text ="Work Order",
UrlTarget="_blank",
AuthName = AppCodes.Maintenance.Plan,
Url=$"/admin/form/{utils.GetDefaultFormCodes(ListFormCodes.Lists.Plan)}/@Id"
},
}),
}, autoSave: true
);
@ -796,7 +803,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Code",
Width = 150,
Width = 100,
ListOrderNo = 2,
Visible = true,
IsActive = true,
@ -814,7 +821,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "WorkCenterId",
Width = 350,
Width = 150,
ListOrderNo = 3,
Visible = true,
IsActive = true,
@ -831,7 +838,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "PlanType",
Width = 500,
Width = 100,
ListOrderNo = 4,
Visible = true,
IsActive = true,
@ -887,8 +894,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Description",
Width = 100,
ListOrderNo = 5,
Width = 300,
ListOrderNo = 6,
Visible = true,
IsActive = true,
IsDeleted = false,
@ -903,7 +910,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SourceDbType = DbType.Int32,
FieldName = "Frequency",
Width = 100,
ListOrderNo = 6,
ListOrderNo = 7,
Visible = true,
IsActive = true,
IsDeleted = false,
@ -964,7 +971,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Instructions",
Width = 100,
Width = 350,
ListOrderNo = 9,
Visible = true,
IsActive = true,
@ -980,12 +987,19 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "RequiredSkillsJson",
Width = 100,
Width = 250,
ListOrderNo = 10,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
LookupJson = JsonSerializer.Serialize(new LookupDto
{
DataSourceType = UiLookupDataSourceTypeEnum.Query,
DisplayExpr = "Name",
ValueExpr = "Key",
LookupQuery = LookupQueryValues.TechnicalSkillsValues,
}),
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
@ -1046,7 +1060,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsOrganizationUnit = false,
Description = AppCodes.Maintenance.PlanMaterial,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaintenancePlanMaterial)),
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.PlanMaterial)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
@ -1058,7 +1072,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Maintenance.PlanMaterial),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaintenancePlanMaterial)),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanMaterial)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
@ -1067,11 +1081,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 2, DataField = "Quantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
new EditingFormItemDto { Order = 2, DataField = "Quantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
]}
}),
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }
new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value }
}),
}, autoSave: true
);
@ -1098,7 +1112,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.Guid,
FieldName = "MaterialId",
Width = 150,
Width = 300,
ListOrderNo = 2,
Visible = true,
IsActive = true,
@ -1115,7 +1129,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
CultureName = LanguageCodes.En,
SourceDbType = DbType.Decimal,
FieldName = "Quantity",
Width = 350,
Width = 100,
ListOrderNo = 3,
Visible = true,
IsActive = true,
@ -1123,7 +1137,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SortIndex = 1,
SortDirection = GridColumnOptions.SortOrderAsc,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
@ -1153,7 +1166,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
IsOrganizationUnit = false,
Description = AppCodes.Maintenance.PlanEmployee,
SelectCommandType = SelectCommandTypeEnum.Table,
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaintenancePlanEmployee)),
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.PlanEmployee)),
KeyFieldName = "Id",
KeyFieldDbSourceType = DbType.Guid,
DefaultFilter = DefaultFilterJson,
@ -1165,7 +1178,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
SelectionJson = DefaultSelectionSingleJson,
ColumnOptionJson = DefaultColumnOptionJson,
PermissionJson = DefaultPermissionJson(AppCodes.Maintenance.PlanEmployee),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaintenancePlanEmployee)),
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PlanEmployee)),
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
PagerOptionJson = DefaultPagerOptionJson,
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
@ -1174,7 +1187,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() {
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea },
new EditingFormItemDto { Order = 2, DataField = "StartDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 3, DataField = "EndDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox },
new EditingFormItemDto { Order = 4, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
]}
}),
}, autoSave: true
@ -1217,9 +1232,9 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Description",
Width = 350,
SourceDbType = DbType.Date,
FieldName = "StartDate",
Width = 100,
ListOrderNo = 3,
Visible = true,
IsActive = true,
@ -1230,6 +1245,37 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.Date,
FieldName = "EndDate",
Width = 100,
ListOrderNo = 4,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ValidationRuleJson = DefaultValidationRuleRequiredJson,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
new() {
ListFormCode = listForm.ListFormCode,
CultureName = LanguageCodes.En,
SourceDbType = DbType.String,
FieldName = "Description",
Width = 350,
ListOrderNo = 5,
Visible = true,
IsActive = true,
IsDeleted = false,
AllowSearch = true,
ColumnCustomizationJson = DefaultColumnCustomizationJson,
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
PivotSettingsJson = DefaultPivotSettingsJson
},
], autoSave: true);
#endregion
}

View file

@ -6628,6 +6628,132 @@
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanMaterial",
"ParentName": null,
"DisplayName": "App.Maintenance.PlanMaterial",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanMaterial.Create",
"ParentName": "App.Maintenance.PlanMaterial",
"DisplayName": "Create",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanMaterial.Update",
"ParentName": "App.Maintenance.PlanMaterial",
"DisplayName": "Update",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanMaterial.Delete",
"ParentName": "App.Maintenance.PlanMaterial",
"DisplayName": "Delete",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanMaterial.Export",
"ParentName": "App.Maintenance.PlanMaterial",
"DisplayName": "Export",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanMaterial.Import",
"ParentName": "App.Maintenance.PlanMaterial",
"DisplayName": "Import",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanMaterial.Note",
"ParentName": "App.Maintenance.PlanMaterial",
"DisplayName": "Note",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanEmployee",
"ParentName": null,
"DisplayName": "App.Maintenance.PlanEmployee",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanEmployee.Create",
"ParentName": "App.Maintenance.PlanEmployee",
"DisplayName": "Create",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanEmployee.Update",
"ParentName": "App.Maintenance.PlanEmployee",
"DisplayName": "Update",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanEmployee.Delete",
"ParentName": "App.Maintenance.PlanEmployee",
"DisplayName": "Delete",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanEmployee.Export",
"ParentName": "App.Maintenance.PlanEmployee",
"DisplayName": "Export",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanEmployee.Import",
"ParentName": "App.Maintenance.PlanEmployee",
"DisplayName": "Import",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.PlanEmployee.Note",
"ParentName": "App.Maintenance.PlanEmployee",
"DisplayName": "Note",
"IsEnabled": true,
"MultiTenancySide": 3,
"MenuGroup": "Erp"
},
{
"GroupName": "App.Maintenance",
"Name": "App.Maintenance.Calendar",

View file

@ -162,7 +162,7 @@ public enum TableNameEnum
WorkcenterStatus,
Workcenter,
WorkcenterSpecification,
MaintenancePlan,
MaintenancePlanMaterial,
MaintenancePlanEmployee
Plan,
PlanMaterial,
PlanEmployee
}

View file

@ -190,9 +190,9 @@ public static class TableNameResolver
{ nameof(TableNameEnum.WorkcenterStatus), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.Workcenter), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.WorkcenterSpecification), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.MaintenancePlan), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.MaintenancePlanMaterial), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.MaintenancePlanEmployee), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.Plan), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.PlanMaterial), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
{ nameof(TableNameEnum.PlanEmployee), (TablePrefix.TenantByName, MenuPrefix.Maintenance) },
// 🔹 ACCOUNTING

View file

@ -34,19 +34,19 @@ public class NotificationWorker : BackgroundWorkerBase
IRepository<Notification> repository,
IIdentityUserRepository userRepository,
IdentityUserManager identityUserManager,
IErpSmsSender ErpSmsSender,
IErpRocketSender ErpRocketSender,
IErpEmailSender ErpEmailSender,
IErpWhatsAppSender ErpWhatsAppSender,
IErpSmsSender erpSmsSender,
IErpRocketSender erpRocketSender,
IErpEmailSender erpEmailSender,
IErpWhatsAppSender erpWhatsAppSender,
ISettingProvider settingProvider)
{
Repository = repository;
ErpSmsSender = ErpSmsSender;
ErpSmsSender = erpSmsSender;
UserRepository = userRepository;
IdentityUserManager = identityUserManager;
ErpRocketSender = ErpRocketSender;
ErpEmailSender = ErpEmailSender;
ErpWhatsAppSender = ErpWhatsAppSender;
ErpRocketSender = erpRocketSender;
ErpEmailSender = erpEmailSender;
ErpWhatsAppSender = erpWhatsAppSender;
SettingProvider = settingProvider;
}

View file

@ -10,7 +10,8 @@ public class MaintenancePlan : FullAuditedEntity<Guid>, IMultiTenant
public Guid? TenantId { get; set; }
public string Code { get; set; }
public string WorkCenterId { get; set; }
public Guid? WorkCenterId { get; set; }
public Workcenter WorkCenter { get; set; }
public string PlanType { get; set; }
public string Priority { get; set; }
public string Description { get; set; }

View file

@ -2752,11 +2752,11 @@ public class PlatformDbContext :
builder.Entity<MaintenancePlan>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaintenancePlan)), Prefix.DbSchema);
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Plan)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.Code).IsRequired().HasMaxLength(100);
b.Property(x => x.WorkCenterId).IsRequired().HasMaxLength(100);
b.Property(x => x.WorkCenterId).IsRequired();
b.Property(x => x.PlanType).IsRequired().HasMaxLength(50);
b.Property(x => x.Priority).HasMaxLength(50);
b.Property(x => x.Description).HasMaxLength(1000);
@ -2772,7 +2772,7 @@ public class PlatformDbContext :
builder.Entity<MaintenancePlanMaterial>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaintenancePlanMaterial)), Prefix.DbSchema);
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PlanMaterial)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.MaintenancePlanId).IsRequired();
@ -2787,7 +2787,7 @@ public class PlatformDbContext :
builder.Entity<MaintenancePlanEmployee>(b =>
{
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.MaintenancePlanEmployee)), Prefix.DbSchema);
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PlanEmployee)), Prefix.DbSchema);
b.ConfigureByConvention();
b.Property(x => x.MaintenancePlanId).IsRequired();

View file

@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace Erp.Platform.Migrations
{
[DbContext(typeof(PlatformDbContext))]
[Migration("20251120142319_Initial")]
[Migration("20251120201509_Initial")]
partial class Initial
{
/// <inheritdoc />
@ -6008,14 +6008,14 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("WorkCenterId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<Guid>("WorkCenterId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("Mnt_T_MaintenancePlan", (string)null);
b.HasIndex("WorkCenterId");
b.ToTable("Mnt_T_Plan", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlanEmployee", b =>
@ -6076,7 +6076,7 @@ namespace Erp.Platform.Migrations
b.HasIndex("MaintenancePlanId");
b.ToTable("Mnt_T_MaintenancePlanEmployee", (string)null);
b.ToTable("Mnt_T_PlanEmployee", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlanMaterial", b =>
@ -6134,7 +6134,7 @@ namespace Erp.Platform.Migrations
b.HasIndex("MaintenancePlanId");
b.ToTable("Mnt_T_MaintenancePlanMaterial", (string)null);
b.ToTable("Mnt_T_PlanMaterial", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
@ -14370,6 +14370,17 @@ namespace Erp.Platform.Migrations
.IsRequired();
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlan", b =>
{
b.HasOne("Erp.Platform.Entities.Workcenter", "WorkCenter")
.WithMany()
.HasForeignKey("WorkCenterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("WorkCenter");
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlanEmployee", b =>
{
b.HasOne("Erp.Platform.Entities.MaintenancePlan", "MaintenancePlan")

View file

@ -1276,38 +1276,6 @@ namespace Erp.Platform.Migrations
table.PrimaryKey("PK_Hr_T_Template360", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Mnt_T_MaintenancePlan",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
WorkCenterId = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
PlanType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Priority = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Frequency = table.Column<int>(type: "int", nullable: false),
FrequencyUnit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
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),
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),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mnt_T_MaintenancePlan", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Mnt_T_WorkcenterStatus",
columns: table => new
@ -3064,64 +3032,6 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Mnt_T_MaintenancePlanEmployee",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaintenancePlanId = 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),
Description = table.Column<string>(type: "nvarchar(max)", 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),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mnt_T_MaintenancePlanEmployee", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_MaintenancePlanEmployee_Mnt_T_MaintenancePlan_MaintenancePlanId",
column: x => x.MaintenancePlanId,
principalTable: "Mnt_T_MaintenancePlan",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Mnt_T_MaintenancePlanMaterial",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaintenancePlanId = 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),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mnt_T_MaintenancePlanMaterial", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_MaintenancePlanMaterial_Mnt_T_MaintenancePlan_MaintenancePlanId",
column: x => x.MaintenancePlanId,
principalTable: "Mnt_T_MaintenancePlan",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "OpenIddictAuthorizations",
columns: table => new
@ -5026,6 +4936,44 @@ namespace Erp.Platform.Migrations
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "Mnt_T_Plan",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
WorkCenterId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
PlanType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Priority = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
Frequency = table.Column<int>(type: "int", nullable: false),
FrequencyUnit = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
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),
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),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mnt_T_Plan", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_Plan_Mnt_T_Workcenter_WorkCenterId",
column: x => x.WorkCenterId,
principalTable: "Mnt_T_Workcenter",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Mnt_T_WorkcenterSpecification",
columns: table => new
@ -5512,6 +5460,64 @@ namespace Erp.Platform.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Mnt_T_PlanEmployee",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaintenancePlanId = 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),
Description = table.Column<string>(type: "nvarchar(max)", 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),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mnt_T_PlanEmployee", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_PlanEmployee_Mnt_T_Plan_MaintenancePlanId",
column: x => x.MaintenancePlanId,
principalTable: "Mnt_T_Plan",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Mnt_T_PlanMaterial",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MaintenancePlanId = 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),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Mnt_T_PlanMaterial", x => x.Id);
table.ForeignKey(
name: "FK_Mnt_T_PlanMaterial_Mnt_T_Plan_MaintenancePlanId",
column: x => x.MaintenancePlanId,
principalTable: "Mnt_T_Plan",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Hr_T_SurveyAnswer",
columns: table => new
@ -6435,13 +6441,18 @@ namespace Erp.Platform.Migrations
column: "SurveyId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_MaintenancePlanEmployee_MaintenancePlanId",
table: "Mnt_T_MaintenancePlanEmployee",
name: "IX_Mnt_T_Plan_WorkCenterId",
table: "Mnt_T_Plan",
column: "WorkCenterId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_PlanEmployee_MaintenancePlanId",
table: "Mnt_T_PlanEmployee",
column: "MaintenancePlanId");
migrationBuilder.CreateIndex(
name: "IX_Mnt_T_MaintenancePlanMaterial_MaintenancePlanId",
table: "Mnt_T_MaintenancePlanMaterial",
name: "IX_Mnt_T_PlanMaterial_MaintenancePlanId",
table: "Mnt_T_PlanMaterial",
column: "MaintenancePlanId");
migrationBuilder.CreateIndex(
@ -7153,10 +7164,10 @@ namespace Erp.Platform.Migrations
name: "Hr_T_SurveyQuestionOption");
migrationBuilder.DropTable(
name: "Mnt_T_MaintenancePlanEmployee");
name: "Mnt_T_PlanEmployee");
migrationBuilder.DropTable(
name: "Mnt_T_MaintenancePlanMaterial");
name: "Mnt_T_PlanMaterial");
migrationBuilder.DropTable(
name: "Mnt_T_WorkcenterSpecification");
@ -7369,10 +7380,7 @@ namespace Erp.Platform.Migrations
name: "Hr_T_SurveyQuestion");
migrationBuilder.DropTable(
name: "Mnt_T_MaintenancePlan");
migrationBuilder.DropTable(
name: "Mnt_T_Workcenter");
name: "Mnt_T_Plan");
migrationBuilder.DropTable(
name: "Net_T_Training");
@ -7456,10 +7464,7 @@ namespace Erp.Platform.Migrations
name: "Hr_T_Survey");
migrationBuilder.DropTable(
name: "Mnt_T_WorkcenterStatus");
migrationBuilder.DropTable(
name: "Mnt_T_WorkcenterType");
name: "Mnt_T_Workcenter");
migrationBuilder.DropTable(
name: "Net_T_EventCategory");
@ -7494,6 +7499,12 @@ namespace Erp.Platform.Migrations
migrationBuilder.DropTable(
name: "Sas_T_Branch");
migrationBuilder.DropTable(
name: "Mnt_T_WorkcenterStatus");
migrationBuilder.DropTable(
name: "Mnt_T_WorkcenterType");
migrationBuilder.DropTable(
name: "Sas_H_CountryGroup");

View file

@ -6005,14 +6005,14 @@ namespace Erp.Platform.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("WorkCenterId")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<Guid>("WorkCenterId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.ToTable("Mnt_T_MaintenancePlan", (string)null);
b.HasIndex("WorkCenterId");
b.ToTable("Mnt_T_Plan", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlanEmployee", b =>
@ -6073,7 +6073,7 @@ namespace Erp.Platform.Migrations
b.HasIndex("MaintenancePlanId");
b.ToTable("Mnt_T_MaintenancePlanEmployee", (string)null);
b.ToTable("Mnt_T_PlanEmployee", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlanMaterial", b =>
@ -6131,7 +6131,7 @@ namespace Erp.Platform.Migrations
b.HasIndex("MaintenancePlanId");
b.ToTable("Mnt_T_MaintenancePlanMaterial", (string)null);
b.ToTable("Mnt_T_PlanMaterial", (string)null);
});
modelBuilder.Entity("Erp.Platform.Entities.Material", b =>
@ -14367,6 +14367,17 @@ namespace Erp.Platform.Migrations
.IsRequired();
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlan", b =>
{
b.HasOne("Erp.Platform.Entities.Workcenter", "WorkCenter")
.WithMany()
.HasForeignKey("WorkCenterId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("WorkCenter");
});
modelBuilder.Entity("Erp.Platform.Entities.MaintenancePlanEmployee", b =>
{
b.HasOne("Erp.Platform.Entities.MaintenancePlan", "MaintenancePlan")

View file

@ -777,6 +777,9 @@
},
{
"Name": "Soft Skills"
},
{
"Name": "Technical Skills"
}
],
"Skills": [
@ -875,6 +878,34 @@
{
"SkillTypeName": "Soft Skills",
"Name": "İletişim"
},
{
"SkillTypeName": "Technical Skills",
"Name": "Torna Operatörü"
},
{
"SkillTypeName": "Technical Skills",
"Name": "Mekanik"
},
{
"SkillTypeName": "Technical Skills",
"Name": "Kompresör Teknisyeni"
},
{
"SkillTypeName": "Technical Skills",
"Name": "Elektrikçi"
},
{
"SkillTypeName": "Technical Skills",
"Name": "PLC Teknisyeni"
},
{
"SkillTypeName": "Technical Skills",
"Name": "Robot Teknisyeni"
},
{
"SkillTypeName": "Technical Skills",
"Name": "Kaynak Uzmanı"
}
],
"SkillLevels": [
@ -4916,5 +4947,67 @@
"setupTime": 20,
"isActive": true
}
],
"MaintenancePlans": [
{
"code": "PM-CNC-001",
"workCenterCode": "CNC-001",
"planType": "Düzeltici",
"priority": "Düşük",
"description": "CNC torna tezgahı için haftalık rutin bakım planı",
"frequency": 1,
"frequencyUnit": "Haftalık",
"estimatedDuration": 120,
"instructions": "Yağlama, temizlik ve genel kontrol yapılacaktır.",
"requiredSkillsJson": "Torna Operatörü|Mekanik",
"nextDue": "2024-02-12T00:00:00.000Z",
"isActive": true,
"lastExecuted": "2024-02-05T00:00:00.000Z"
},
{
"code": "PM-COMP-001",
"workCenterCode": "COMP-001",
"planType": "Tahminsel",
"priority": "Acil",
"description": "Hava kompresörü aylık bakım ve kontrol planı",
"frequency": 1,
"frequencyUnit": "Aylık",
"estimatedDuration": 240,
"instructions": "Filtre değişimi, yağ seviyesi kontrolü ve basınç testi yapılacaktır.",
"requiredSkillsJson": "Kompresör Teknisyeni|Elektrikçi",
"nextDue": "2024-02-15T00:00:00.000Z",
"isActive": true,
"lastExecuted": "2024-01-15T00:00:00.000Z"
},
{
"code": "CM-CONV-001",
"workCenterCode": "CONV-001",
"planType": "Düzeltici",
"description": "Konveyör sistemi arıza durumunda müdahale planı",
"frequency": 10,
"frequencyUnit": "Günlük",
"estimatedDuration": 180,
"priority": "Yüksek",
"requiredSkillsJson": "Mekanik|Elektrikçi|PLC Teknisyeni",
"instructions": "Acil durum müdahale prosedürleri uygulanacaktır.",
"nextDue": "2024-02-10T00:00:00.000Z",
"isActive": false,
"lastExecuted": "2025-08-15T00:00:00.000Z"
},
{
"code": "PM-WELD-001",
"workCenterCode": "CONV-001",
"planType": "Tahminsel",
"description": "Robot kaynak sistemi 6 aylık periyodik bakımı",
"frequency": 6,
"frequencyUnit": "Aylık",
"estimatedDuration": 480,
"priority": "Yüksek",
"requiredSkillsJson": "Robot Teknisyeni|Kaynak Uzmanı|Elektrikçi",
"instructions": "Robotik kaynak ekipmanlarının detaylı kontrolü ve kalibrasyonu yapılacaktır.",
"nextDue": "2024-02-15T00:00:00.000Z",
"isActive": true,
"lastExecuted": "2023-08-15T00:00:00.000Z"
}
]
}

View file

@ -109,6 +109,7 @@ 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;
public TenantDataSeeder(
IClock clock,
@ -200,7 +201,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IRepository<Approval, Guid> approvalRepository,
IRepository<WorkcenterType, Guid> workcenterTypeRepository,
IRepository<WorkcenterStatus, Guid> workcenterStatusRepository,
IRepository<Workcenter, Guid> workcenterRepository
IRepository<Workcenter, Guid> workcenterRepository,
IRepository<MaintenancePlan, Guid> maintenancePlanRepository
)
{
_clock = clock;
@ -294,6 +296,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
_workcenterTypeRepository = workcenterTypeRepository;
_workcenterStatusRepository = workcenterStatusRepository;
_workcenterRepository = workcenterRepository;
_maintenancePlanRepository = maintenancePlanRepository;
}
private static IConfigurationRoot BuildConfiguration()
@ -1982,6 +1985,32 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
IsActive = item.IsActive
}, autoSave: true);
}
foreach (var item in items.MaintenancePlans)
{
var exists = await _maintenancePlanRepository.AnyAsync(x => x.Code == item.Code);
if (exists)
continue;
var workcenter = await _workcenterRepository.FirstOrDefaultAsync(x => x.Code == item.WorkCenterCode);
await _maintenancePlanRepository.InsertAsync(new MaintenancePlan
{
Code = item.Code,
WorkCenterId = workcenter?.Id,
PlanType = item.PlanType,
Priority = item.Priority,
Description = item.Description,
Frequency = item.Frequency,
FrequencyUnit = item.FrequencyUnit,
EstimatedDuration = item.EstimatedDuration,
RequiredSkillsJson = item.RequiredSkillsJson,
Instructions = item.Instructions,
NextDue = item.NextDue,
IsActive = item.IsActive,
LastExecuted = item.LastExecuted
}, autoSave: true);
}
}
}

View file

@ -101,6 +101,24 @@ public class TenantSeederDto
public List<WorkcenterTypeSeedDto> WorkcenterTypes { get; set; }
public List<WorkcenterStatusSeedDto> WorkcenterStatuses { get; set; }
public List<WorkcenterSeedDto> Workcenters { get; set; }
public List<MaintenancePlanSeedDto> MaintenancePlans { get; set; }
}
public class MaintenancePlanSeedDto
{
public string Code { get; set; }
public string WorkCenterCode { get; set; }
public string PlanType { get; set; }
public string Priority { get; set; }
public string Description { get; set; }
public int Frequency { get; set; }
public string FrequencyUnit { get; set; }
public int EstimatedDuration { get; set; }
public string RequiredSkillsJson { get; set; }
public string Instructions { get; set; }
public DateTime NextDue { get; set; }
public bool IsActive { get; set; }
public DateTime? LastExecuted { get; set; }
}
public class WorkcenterSeedDto

View file

@ -4318,6 +4318,7 @@ h-0.5
h-1.5
h-2.5
h-3.5
h-1.2
h-1/2
h-1/3
h-2/3
@ -4377,6 +4378,7 @@ w-0.5
w-1.5
w-2.5
w-3.5
w-1.2
w-1/2
w-1/3
w-2/3
@ -4447,6 +4449,7 @@ ml-0.5
ml-1.5
ml-2.5
ml-3.5
ml-1.2
mr-0
mr-1
mr-2
@ -4483,4 +4486,5 @@ mr-0.5
mr-1.5
mr-2.5
mr-3.5
mr-1.2
erp-*

View file

@ -1,5 +1,5 @@
.menu-item {
@apply cursor-pointer font-medium rounded-md flex items-center w-full whitespace-nowrap px-1.5;
@apply cursor-pointer font-medium rounded-md flex items-center w-full whitespace-nowrap px-1.2;
&.menu-item-light {
@apply text-gray-600;

View file

@ -90,8 +90,8 @@ const Simple = ({ children, content, ...rest }: SimpleProps) => {
return (
<div className="h-full">
<Container className="flex flex-col flex-auto items-center justify-center min-w-0 h-full">
<Card className="min-w-[320px] md:min-w-[450px]" bodyClass="md:p-6">
<div className="flex justify-between items-center mb-4">
<Card className="min-w-[320px] md:min-w-[450px]" bodyClass="md:p-5">
<div className="flex justify-between items-center mb-2">
{!hasSubdomain() && (
<a
href={ROUTES_ENUM.public.home}

View file

@ -35,6 +35,9 @@ export default {
y: '#E4C1F9',
},
},
spacing: {
'1.2': '0.3rem', // istediğin değeri yaz
},
},
},
plugins: [