diff --git a/api/src/Erp.Platform.Application.Contracts/Intranet/EmployeeDto.cs b/api/src/Erp.Platform.Application.Contracts/Intranet/EmployeeDto.cs index d1dd1a19..7cccca28 100644 --- a/api/src/Erp.Platform.Application.Contracts/Intranet/EmployeeDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Intranet/EmployeeDto.cs @@ -8,7 +8,7 @@ public class EmployeeDto : FullAuditedEntityDto public Guid? TenantId { get; set; } public string Code { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string Avatar { get; set; } public string NationalId { get; set; } public DateTime BirthDate { get; set; } diff --git a/api/src/Erp.Platform.Application.Contracts/Intranet/VisitorDto.cs b/api/src/Erp.Platform.Application.Contracts/Intranet/VisitorDto.cs index efe97da8..59a1b30c 100644 --- a/api/src/Erp.Platform.Application.Contracts/Intranet/VisitorDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Intranet/VisitorDto.cs @@ -7,7 +7,7 @@ public class VisitorDto : FullAuditedEntityDto { public Guid? TenantId { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string CompanyName { get; set; } public string Email { get; set; } public string PhoneNumber { get; set; } diff --git a/api/src/Erp.Platform.Application.Contracts/LookUpQueryValues.cs b/api/src/Erp.Platform.Application.Contracts/LookUpQueryValues.cs index df44723e..a166843c 100644 --- a/api/src/Erp.Platform.Application.Contracts/LookUpQueryValues.cs +++ b/api/src/Erp.Platform.Application.Contracts/LookUpQueryValues.cs @@ -79,12 +79,12 @@ public static class LookupQueryValues public static string PartnerContactValues = $"SELECT " + $"\"Id\" AS \"Key\", " + - $"\"FullName\" AS \"Name\" " + + $"\"Name\" AS \"Name\" " + $"FROM \"{FullNameTable(TableNameEnum.PartnerContact)}\" " + $"WHERE " + $"(\"PartnerId\" = @param0 OR @param0 IS NULL) " + $"AND \"IsActive\" = 'true' " + - $"ORDER BY \"FullName\";"; + $"ORDER BY \"Name\";"; public static string TenantValues = $"SELECT * FROM (" + diff --git a/api/src/Erp.Platform.Application.Contracts/Public/DemoDto.cs b/api/src/Erp.Platform.Application.Contracts/Public/DemoDto.cs index 7aa031c4..e1c231ff 100644 --- a/api/src/Erp.Platform.Application.Contracts/Public/DemoDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Public/DemoDto.cs @@ -7,7 +7,7 @@ public class DemoDto : FullAuditedEntityDto { public Guid? TenantId { get; set; } public string OrganizationName { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string Email { get; set; } public string PhoneNumber { get; set; } public string Address { get; set; } diff --git a/api/src/Erp.Platform.Application.Contracts/Sector/SectorDto.cs b/api/src/Erp.Platform.Application.Contracts/Sector/SectorDto.cs index f79c7b38..f47ad1fc 100644 --- a/api/src/Erp.Platform.Application.Contracts/Sector/SectorDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/Sector/SectorDto.cs @@ -6,5 +6,4 @@ namespace Erp.Platform.Sectors; public class SectorDto : AuditedEntityDto { public string Name { get; set; } - public string FullName { get; set; } } diff --git a/api/src/Erp.Platform.Application/Intranet/IntranetAppService.cs b/api/src/Erp.Platform.Application/Intranet/IntranetAppService.cs index 67db0bdf..dd3638aa 100644 --- a/api/src/Erp.Platform.Application/Intranet/IntranetAppService.cs +++ b/api/src/Erp.Platform.Application/Intranet/IntranetAppService.cs @@ -359,7 +359,7 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService Organizer = new EventOrganizerDto { Id = employee.Id, - Name = employee.FullName, + Name = employee.Name, Position = employee.JobPosition.Name, Avatar = employee.Avatar }, @@ -387,7 +387,7 @@ public class IntranetAppService : PlatformAppService, IIntranetAppService Employee = new EventOrganizerDto { Id = commentAuthor.Id, - Name = commentAuthor.FullName, + Name = commentAuthor.Name, Position = commentAuthor.JobPosition.Name, Avatar = commentAuthor.Avatar }, diff --git a/api/src/Erp.Platform.Application/Public/PublicAppService.cs b/api/src/Erp.Platform.Application/Public/PublicAppService.cs index 3a19fc1b..9c327347 100644 --- a/api/src/Erp.Platform.Application/Public/PublicAppService.cs +++ b/api/src/Erp.Platform.Application/Public/PublicAppService.cs @@ -77,7 +77,7 @@ public class PublicAppService : PlatformAppService var bodyBuilder = new StringBuilder(); bodyBuilder.AppendLine($"Şirket: {input.OrganizationName}"); - bodyBuilder.AppendLine($"Ad Soyad: {input.FullName}"); + bodyBuilder.AppendLine($"Ad Soyad: {input.Name}"); bodyBuilder.AppendLine($"E-Posta: {input.Email}"); bodyBuilder.AppendLine($"Telefon: {input.PhoneNumber}"); bodyBuilder.AppendLine($"Adres: {input.Address}"); diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index b9ab5b31..171a1bac 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -9585,7 +9585,7 @@ }, { "resourceName": "Platform", - "key": "App.Maintenance.Calendar", + "key": "App.Maintenance.WorkorderCalendar", "tr": "Bakım Takvimi", "en": "Calendar" }, @@ -9621,10 +9621,22 @@ }, { "resourceName": "Platform", - "key": "App.Maintenance.Workorders", + "key": "App.Maintenance.Workorder", "tr": "Bakım İş Emirleri", "en": "Workorders" }, + { + "resourceName": "Platform", + "key": "App.Maintenance.WorkorderMaterial", + "tr": "Malzemeler", + "en": "Materials" + }, + { + "resourceName": "Platform", + "key": "App.Maintenance.WorkorderActivity", + "tr": "Faaliyetler", + "en": "Activities" + }, { "resourceName": "Platform", "key": "App.Store.WarehouseType", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs index 4b017d10..42ef46c7 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs @@ -56,7 +56,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -356,7 +356,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -521,7 +521,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -721,7 +721,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 0262710e..6e1fb4f9 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -59,7 +59,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -176,7 +176,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -392,7 +392,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -599,7 +599,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -730,7 +730,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -936,7 +936,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1074,7 +1074,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1262,7 +1262,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1480,7 +1480,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1598,7 +1598,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1718,7 +1718,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1893,7 +1893,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2110,7 +2110,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2234,7 +2234,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2358,7 +2358,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2798,7 +2798,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2983,7 +2983,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3181,7 +3181,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep IsDeleted = false, AllowSearch = true, ValidationRuleJson = DefaultValidationRuleRequiredJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), }, @@ -3307,7 +3307,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3338,7 +3338,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ new EditingFormItemDto { Order = 1, DataField = "OrganizationName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, new EditingFormItemDto { Order = 5, DataField = "Address", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, @@ -3395,7 +3395,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "FullName", + FieldName = "Name", Width = 150, ListOrderNo = 3, Visible = true, @@ -3519,7 +3519,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3731,7 +3731,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3975,7 +3975,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4065,7 +4065,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4161,7 +4161,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4285,7 +4285,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4403,7 +4403,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4499,7 +4499,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4697,7 +4697,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4784,7 +4784,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4873,7 +4873,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4959,7 +4959,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -5063,7 +5063,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -5150,7 +5150,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -5424,7 +5424,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -5601,7 +5601,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -5633,7 +5633,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Email", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "MobileNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, @@ -5678,7 +5678,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "FullName", + FieldName = "Name", Width = 150, ListOrderNo = 2, Visible = true, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs index 1b6094be..c9df560a 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs @@ -56,7 +56,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -171,7 +171,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -566,7 +566,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -713,7 +713,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -887,7 +887,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1096,7 +1096,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1270,7 +1270,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1543,7 +1543,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1658,7 +1658,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1898,7 +1898,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2019,7 +2019,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2150,7 +2150,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs index fc785507..3d702204 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs @@ -58,7 +58,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -181,7 +181,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -303,7 +303,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -874,7 +874,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -960,7 +960,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1131,7 +1131,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1420,7 +1420,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1519,7 +1519,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1662,7 +1662,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1805,7 +1805,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1988,7 +1988,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2149,7 +2149,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs index 280c3f44..a9990686 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs @@ -58,7 +58,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -149,7 +149,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -439,7 +439,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -581,7 +581,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency AllowSearch = true, ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, @@ -650,7 +650,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -958,7 +958,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1105,7 +1105,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency AllowSearch = true, ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, @@ -1255,7 +1255,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1289,7 +1289,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency new() { Order=1, Caption="General", ColCount=2, ColSpan=1, ItemType="group", Items =[ new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "NationalId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "BirthDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 5, DataField = "Gender", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, @@ -1379,7 +1379,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "FullName", + FieldName = "Name", Width = 150, ListOrderNo = 3, Visible = true, @@ -1873,7 +1873,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -2003,7 +2003,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2114,7 +2114,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency SortIndex = 0, ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, @@ -2283,7 +2283,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -2334,7 +2334,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2444,7 +2444,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency SortIndex = 0, ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, @@ -2612,7 +2612,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -2663,7 +2663,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2765,7 +2765,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsDeleted = false, AllowSearch = true, ValidationRuleJson = DefaultValidationRuleRequiredJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -2951,7 +2951,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3081,7 +3081,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency SortIndex = 0, ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, @@ -3318,7 +3318,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3469,7 +3469,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3681,7 +3681,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsDeleted = false, SortIndex = 0, ValidationRuleJson = DefaultValidationRuleRequiredJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -3702,7 +3702,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4036,7 +4036,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4216,7 +4216,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4381,7 +4381,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4460,7 +4460,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs index 5097aee8..04d2c814 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs @@ -56,7 +56,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -142,7 +142,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -228,7 +228,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -399,7 +399,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc Visible = true, IsActive = true, IsDeleted = false, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -477,7 +477,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -667,7 +667,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -790,7 +790,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -917,7 +917,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1144,7 +1144,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1317,7 +1317,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1415,7 +1415,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1447,7 +1447,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "FullName", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "CompanyName", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan=1, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions }, @@ -1490,7 +1490,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "FullName", + FieldName = "Name", Width = 150, ListOrderNo = 2, Visible = true, @@ -1624,7 +1624,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1670,7 +1670,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1757,7 +1757,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1839,7 +1839,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs index 9db79dd2..be018ee3 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs @@ -53,10 +53,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -175,10 +176,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -297,10 +299,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -669,10 +672,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1018,10 +1022,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1125,10 +1130,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1196,7 +1202,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1292,10 +1298,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1591,10 +1598,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1714,10 +1722,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1837,10 +1846,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1960,10 +1970,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2083,10 +2094,11 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend var listForm = await _listFormRepository.InsertAsync( new ListForm() { - ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2113,17 +2125,44 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 3, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "WorkorderNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled }, + new EditingFormItemDto { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "WorkorderTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 6, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField = "Subject", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 8, DataField = "ScheduledStart", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, + new EditingFormItemDto { Order = 9, DataField = "ScheduledEnd", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, + new EditingFormItemDto { Order = 10, DataField = "ActualStart", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, + new EditingFormItemDto { Order = 11, DataField = "ActualEnd", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, + new EditingFormItemDto { Order = 12, DataField = "EstimatedCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 13, DataField = "ActualCost", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 14, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 15, DataField = "Notes", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } + new() { FieldName = "WorkorderNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Düşük", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Oluşturuldu", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "EstimatedCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "ActualCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "ActualStart", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey } + }), + CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { + new() { + Hint = "Manage", + Text ="Manage", + UrlTarget="_blank", + AuthName = listFormName, + Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", + IsVisible = true, + }, }), } ); @@ -2149,14 +2188,222 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "Name", - Width = 350, + FieldName = "WorkorderNumber", + Width = 140, ListOrderNo = 2, Visible = true, IsActive = true, IsDeleted = false, SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, + SortDirection = GridColumnOptions.SortOrderDesc, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "WorkcenterId", + Width = 150, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Workcenter), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "WorkorderTypeId", + Width = 150, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderType), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Priority", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + ValueExpr = "key", + DisplayExpr = "name", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key = "Düşük", Name = "Düşük" }, + new () { Key = "Normal", Name = "Normal" }, + new () { Key = "Yüksek", Name = "Yüksek" }, + new () { Key = "Acil", Name = "Acil" }, + }), + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Status", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Name", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Subject", + Width = 300, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "EmployeeId", + Width = 150, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.DateTime, + FieldName = "ScheduledStart", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.DateTime, + FieldName = "ScheduledEnd", + Width = 100, + ListOrderNo = 10, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Decimal, + Format = "fixedPoint", + Alignment = "right", + FieldName = "EstimatedCost", + Width = 100, + ListOrderNo = 11, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.DateTime, + FieldName = "ActualStart", + Width = 100, + ListOrderNo = 12, + 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.DateTime, + FieldName = "ActualEnd", + Width = 100, + ListOrderNo = 13, + 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.Decimal, + Format = "fixedPoint", + Alignment = "right", + FieldName = "ActualCost", + Width = 100, + ListOrderNo = 14, + Visible = true, + IsActive = true, + IsDeleted = false, AllowSearch = true, ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -2168,8 +2415,8 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Description", - Width = 500, - ListOrderNo = 3, + Width = 300, + ListOrderNo = 15, Visible = true, IsActive = true, IsDeleted = false, @@ -2178,12 +2425,283 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, - new() { ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsActive", + SourceDbType = DbType.String, + FieldName = "Notes", + Width = 300, + ListOrderNo = 16, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); + #endregion + } + #endregion + + #region Workorder Material + listFormName = AppCodes.Maintenance.WorkorderMaterial; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, + IsSubForm = false, + ShowNote = true, + LayoutJson = DefaultLayoutJson(), + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderMaterial)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderMaterial)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), + EditingFormJson = JsonSerializer.Serialize(new List() { + 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, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 3, DataField = "UnitCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 4, DataField = "TotalCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + ]} + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Quantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "UnitCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "TotalCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value } + }), + }, autoSave: true + ); + + #region WorkorderMaterial Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "MaterialId", + Width = 350, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Material), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Decimal, + FieldName = "Quantity", + Format = "fixedPoint", + Alignment = "right", + Width = 100, + ListOrderNo = 3, + 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.Decimal, + FieldName = "UnitCost", + Format = "fixedPoint", + Alignment = "right", + Width = 100, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Decimal, + FieldName = "TotalCost", + Format = "fixedPoint", + Alignment = "right", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + } + ], autoSave: true); + #endregion + } + #endregion + + #region Workorder Activity + listFormName = AppCodes.Maintenance.WorkorderActivity; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, + IsSubForm = false, + ShowNote = true, + LayoutJson = DefaultLayoutJson(), + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderActivity)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkorderActivity)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), + EditingFormJson = JsonSerializer.Serialize(new List() { + 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 = "Duration", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea}, + ]} + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Duration", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, + }), + }, autoSave: true + ); + + #region WorkorderActivity Fields + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "EmployeeId", + Width = 350, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "Duration", + Format = "fixedPoint", + Alignment = "right", + Width = 100, + ListOrderNo = 3, + 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 = 100, ListOrderNo = 4, Visible = true, @@ -2194,6 +2712,292 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson } + ], autoSave: true); + #endregion + } + #endregion + + // Workorder ile WorkorderMaterial ve WorkorderActivity arasında Sub Forms ilişkisinin kurulması + await utils.CloneFormLayoutAsync( + AppCodes.Maintenance.Workorder, + JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Maintenance.WorkorderMaterial, + Code = AppCodes.Maintenance.WorkorderMaterial, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "WorkorderId" + } + } + }, + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Maintenance.WorkorderActivity, + Code = AppCodes.Maintenance.WorkorderActivity, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "WorkorderId" + } + } + } + }) + ); + + #region Workorder Calendar + listFormName = AppCodes.Maintenance.WorkorderCalendar; + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) + { + var listForm = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + ExportJson = DefaultExportJson, + IsSubForm = false, + ShowNote = true, + LayoutJson = DefaultLayoutJson("scheduler"), + SchedulerOptionJson = JsonSerializer.Serialize(new SchedulerOptionDto + { + TextExpr = "Subject", + StartDateExpr = "ScheduledStart", + EndDateExpr = "ScheduledEnd", + StartDayHour = 8, + EndDayHour = 18, + DefaultView = "week", + AllowResizing = true, + AllowDragging = true, + AllowDeleting = true, + AllowUpdating = true, + AllowAdding = true, + }), + CultureName = LanguageCodes.En, + ListFormCode = listFormName, + Name = listFormName, + Title = listFormName, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = listFormName, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Workorder)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = DefaultFilterJson, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = DefaultFilterRowJson, + HeaderFilterJson = DefaultHeaderFilterJson, + SearchPanelJson = DefaultSearchPanelJson, + GroupPanelJson = DefaultGroupPanelJson, + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(listFormName), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Workorder)), + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, + PagerOptionJson = DefaultPagerOptionJson, + InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), + EditingFormJson = JsonSerializer.Serialize(new List() { + new() { + Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "Subject", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 2, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "WorkorderTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 6, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField = "ScheduledStart", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, + new EditingFormItemDto { Order = 8, DataField = "ScheduledEnd", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat }, + new EditingFormItemDto { Order = 9, DataField = "EstimatedCost", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + ]} + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Düşük", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Oluşturuldu", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "EstimatedCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, + }), + } + ); + + #region Workorder Calendar + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Subject", + Width = 300, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "WorkcenterId", + Width = 150, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Workcenter), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "WorkorderTypeId", + Width = 150, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderType), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Priority", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + ValueExpr = "key", + DisplayExpr = "name", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key = "Düşük", Name = "Düşük" }, + new () { Key = "Normal", Name = "Normal" }, + new () { Key = "Yüksek", Name = "Yüksek" }, + new () { Key = "Acil", Name = "Acil" }, + }), + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Status", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Name", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "EmployeeId", + Width = 150, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.DateTime, + FieldName = "ScheduledStart", + Width = 100, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.DateTime, + FieldName = "ScheduledEnd", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Decimal, + Format = "fixedPoint", + Alignment = "right", + FieldName = "EstimatedCost", + Width = 100, + ListOrderNo = 10, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ]); #endregion } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs index c58805cf..fdd7a7e4 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs @@ -56,7 +56,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -178,7 +178,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -407,7 +407,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -714,7 +714,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -836,7 +836,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1056,7 +1056,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1298,7 +1298,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs index 2f669174..ed821227 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs @@ -55,7 +55,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -199,7 +199,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -332,7 +332,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -447,7 +447,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -562,7 +562,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -709,7 +709,7 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs index 3e0b0ab5..bc76b476 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs @@ -57,7 +57,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -181,7 +181,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -305,7 +305,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -429,7 +429,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -553,7 +553,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -677,7 +677,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -801,7 +801,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -979,7 +979,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1210,7 +1210,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1297,7 +1297,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ListFormType = ListFormTypeEnum.List, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1365,7 +1365,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -1382,7 +1382,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -1434,7 +1434,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1787,7 +1787,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1996,7 +1996,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2080,7 +2080,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2276,7 +2276,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2356,7 +2356,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index c73e06a0..e5287d95 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -60,7 +60,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -533,7 +533,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -995,7 +995,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1368,7 +1368,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1521,13 +1521,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, Title = listFormName, DataSourceCode = SeedConsts.DataSources.DefaultCode, - IsTenant = true, + IsTenant = false, IsBranch = false, IsOrganizationUnit = false, Description = listFormName, @@ -1553,7 +1553,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ new EditingFormItemDto { Order=1, DataField="BotName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=2, DataField="Description", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=2, DataField="Description", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextArea }, new EditingFormItemDto { Order=3, DataField="ApiUrl", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order=4, DataField="IsActive", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxCheckBox } ]} @@ -1604,7 +1604,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Description", - Width = 400, + Width = 600, ListOrderNo = 3, Visible = true, IsActive = true, @@ -1662,7 +1662,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1813,7 +1813,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1994,7 +1994,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2169,7 +2169,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2451,7 +2451,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2583,7 +2583,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3055,7 +3055,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3287,7 +3287,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3479,7 +3479,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3706,7 +3706,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3815,7 +3815,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3924,7 +3924,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4080,7 +4080,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4167,7 +4167,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4371,7 +4371,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4519,7 +4519,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs index 0ee46d2d..efcb2ddc 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs @@ -56,7 +56,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -196,7 +196,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -336,7 +336,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -476,7 +476,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -613,7 +613,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen IsDeleted = false, AllowSearch = true, ValidationRuleJson = DefaultValidationRuleRequiredJson, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), }, @@ -854,7 +854,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1067,7 +1067,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1340,7 +1340,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1649,7 +1649,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs index 8863619c..45ef76d7 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs @@ -57,7 +57,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -198,7 +198,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -368,7 +368,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -685,7 +685,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -808,7 +808,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -933,7 +933,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1058,7 +1058,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -1712,7 +1712,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2023,7 +2023,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2162,7 +2162,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2194,7 +2194,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField="Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="Department", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField="Email", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, @@ -2233,7 +2233,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ListFormCode = listForm.ListFormCode, CultureName = LanguageCodes.En, SourceDbType = DbType.String, - FieldName = "FullName", + FieldName = "Name", Width = 200, ListOrderNo = 2, Visible = true, @@ -2457,7 +2457,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2627,7 +2627,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = AppCodes.SupplyChain.ApprovalStep, Name = AppCodes.SupplyChain.ApprovalStep, @@ -2719,7 +2719,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -2805,7 +2805,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -2930,7 +2930,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3076,7 +3076,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ValidationRuleJson = DefaultValidationRuleRequiredJson, ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), @@ -3199,7 +3199,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = true, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3415,7 +3415,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3538,7 +3538,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -3661,7 +3661,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, @@ -4108,7 +4108,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsActive = true, IsDeleted = false, AllowSearch = true, - LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "FullName"), + LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Employee), "Id", "Name"), ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson @@ -4144,7 +4144,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend ExportJson = DefaultExportJson, IsSubForm = false, ShowNote = true, - LayoutJson = DefaultLayoutJson, + LayoutJson = DefaultLayoutJson(), CultureName = LanguageCodes.En, ListFormCode = listFormName, Name = listFormName, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json index f33c656c..9d2ea236 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/MenusData.json @@ -1058,11 +1058,21 @@ "RequiredPermissionName": "App.Branches", "IsDisabled": false }, + { + "ParentCode": "App.Saas", + "Code": "App.AiBot", + "DisplayName": "App.AiBot", + "Order": 3, + "Url": "/admin/list/App.AiBot", + "Icon": "FcMindMap", + "RequiredPermissionName": "App.AiBot", + "IsDisabled": false + }, { "ParentCode": "App.Saas", "Code": "App.Settings", "DisplayName": "App.Settings", - "Order": 3, + "Order": 4, "Url": null, "Icon": "FcCircuit", "RequiredPermissionName": null, @@ -1088,16 +1098,6 @@ "RequiredPermissionName": "App.Settings.GlobalSearch", "IsDisabled": false }, - { - "ParentCode": "App.Saas", - "Code": "App.AiBot", - "DisplayName": "App.AiBot", - "Order": 4, - "Url": "/admin/list/App.AiBot", - "Icon": "FcDepartment", - "RequiredPermissionName": "App.AiBot", - "IsDisabled": false - }, { "ParentCode": "App.Saas", "Code": "App.Languages", @@ -2530,22 +2530,22 @@ }, { "ParentCode": "App.Maintenance", - "Code": "App.Maintenance.Calendar", - "DisplayName": "App.Maintenance.Calendar", + "Code": "App.Maintenance.WorkorderCalendar", + "DisplayName": "App.Maintenance.WorkorderCalendar", "Order": 4, - "Url": "/admin/maintenance/calendar", + "Url": "/admin/list/App.Maintenance.WorkorderCalendar", "Icon": "FcCalendar", - "RequiredPermissionName": "App.Maintenance.Calendar", + "RequiredPermissionName": "App.Maintenance.WorkorderCalendar", "IsDisabled": false }, { "ParentCode": "App.Maintenance", - "Code": "App.Maintenance.Workorders", - "DisplayName": "App.Maintenance.Workorders", + "Code": "App.Maintenance.Workorder", + "DisplayName": "App.Maintenance.Workorder", "Order": 5, - "Url": "/admin/maintenance/workorders", + "Url": "/admin/list/App.Maintenance.Workorder", "Icon": "FcList", - "RequiredPermissionName": "App.Maintenance.Workorders", + "RequiredPermissionName": "App.Maintenance.Workorder", "IsDisabled": false }, { diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json b/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json index 0f18ec22..535676a8 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/PermissionsData.json @@ -211,7 +211,6 @@ "MultiTenancySide": 2, "MenuGroup": "Erp|Kurs" }, - { "GroupName": "App.Saas", "Name": "App.AiBot", @@ -275,7 +274,6 @@ "MultiTenancySide": 2, "MenuGroup": "Erp|Kurs" }, - { "GroupName": "App.Saas", "Name": "App.Settings.SettingDefinitions", @@ -6983,17 +6981,17 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Calendar", + "Name": "App.Maintenance.WorkorderCalendar", "ParentName": null, - "DisplayName": "App.Maintenance.Calendar", + "DisplayName": "App.Maintenance.WorkorderCalendar", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Calendar.Create", - "ParentName": "App.Maintenance.Calendar", + "Name": "App.Maintenance.WorkorderCalendar.Create", + "ParentName": "App.Maintenance.WorkorderCalendar", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, @@ -7001,8 +6999,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Calendar.Update", - "ParentName": "App.Maintenance.Calendar", + "Name": "App.Maintenance.WorkorderCalendar.Update", + "ParentName": "App.Maintenance.WorkorderCalendar", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, @@ -7010,8 +7008,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Calendar.Delete", - "ParentName": "App.Maintenance.Calendar", + "Name": "App.Maintenance.WorkorderCalendar.Delete", + "ParentName": "App.Maintenance.WorkorderCalendar", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, @@ -7019,8 +7017,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Calendar.Export", - "ParentName": "App.Maintenance.Calendar", + "Name": "App.Maintenance.WorkorderCalendar.Export", + "ParentName": "App.Maintenance.WorkorderCalendar", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, @@ -7028,8 +7026,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Calendar.Import", - "ParentName": "App.Maintenance.Calendar", + "Name": "App.Maintenance.WorkorderCalendar.Import", + "ParentName": "App.Maintenance.WorkorderCalendar", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, @@ -7037,8 +7035,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Calendar.Note", - "ParentName": "App.Maintenance.Calendar", + "Name": "App.Maintenance.WorkorderCalendar.Note", + "ParentName": "App.Maintenance.WorkorderCalendar", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, @@ -7359,19 +7357,20 @@ "MultiTenancySide": 3, "MenuGroup": "Erp" }, + { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Workorders", + "Name": "App.Maintenance.Workorder", "ParentName": null, - "DisplayName": "App.Maintenance.Workorders", + "DisplayName": "App.Maintenance.Workorder", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Workorders.Create", - "ParentName": "App.Maintenance.Workorders", + "Name": "App.Maintenance.Workorder.Create", + "ParentName": "App.Maintenance.Workorder", "DisplayName": "Create", "IsEnabled": true, "MultiTenancySide": 3, @@ -7379,8 +7378,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Workorders.Update", - "ParentName": "App.Maintenance.Workorders", + "Name": "App.Maintenance.Workorder.Update", + "ParentName": "App.Maintenance.Workorder", "DisplayName": "Update", "IsEnabled": true, "MultiTenancySide": 3, @@ -7388,8 +7387,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Workorders.Delete", - "ParentName": "App.Maintenance.Workorders", + "Name": "App.Maintenance.Workorder.Delete", + "ParentName": "App.Maintenance.Workorder", "DisplayName": "Delete", "IsEnabled": true, "MultiTenancySide": 3, @@ -7397,8 +7396,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Workorders.Export", - "ParentName": "App.Maintenance.Workorders", + "Name": "App.Maintenance.Workorder.Export", + "ParentName": "App.Maintenance.Workorder", "DisplayName": "Export", "IsEnabled": true, "MultiTenancySide": 3, @@ -7406,8 +7405,8 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Workorders.Import", - "ParentName": "App.Maintenance.Workorders", + "Name": "App.Maintenance.Workorder.Import", + "ParentName": "App.Maintenance.Workorder", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3, @@ -7415,13 +7414,142 @@ }, { "GroupName": "App.Maintenance", - "Name": "App.Maintenance.Workorders.Note", - "ParentName": "App.Maintenance.Workorders", + "Name": "App.Maintenance.Workorder.Note", + "ParentName": "App.Maintenance.Workorder", "DisplayName": "Note", "IsEnabled": true, "MultiTenancySide": 3, "MenuGroup": "Erp" }, + + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderMaterial", + "ParentName": null, + "DisplayName": "App.Maintenance.WorkorderMaterial", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderMaterial.Create", + "ParentName": "App.Maintenance.WorkorderMaterial", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderMaterial.Update", + "ParentName": "App.Maintenance.WorkorderMaterial", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderMaterial.Delete", + "ParentName": "App.Maintenance.WorkorderMaterial", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderMaterial.Export", + "ParentName": "App.Maintenance.WorkorderMaterial", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderMaterial.Import", + "ParentName": "App.Maintenance.WorkorderMaterial", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderMaterial.Note", + "ParentName": "App.Maintenance.WorkorderMaterial", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderActivity", + "ParentName": null, + "DisplayName": "App.Maintenance.WorkorderActivity", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderActivity.Create", + "ParentName": "App.Maintenance.WorkorderActivity", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderActivity.Update", + "ParentName": "App.Maintenance.WorkorderActivity", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderActivity.Delete", + "ParentName": "App.Maintenance.WorkorderActivity", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderActivity.Export", + "ParentName": "App.Maintenance.WorkorderActivity", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderActivity.Import", + "ParentName": "App.Maintenance.WorkorderActivity", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { + "GroupName": "App.Maintenance", + "Name": "App.Maintenance.WorkorderActivity.Note", + "ParentName": "App.Maintenance.WorkorderActivity", + "DisplayName": "Note", + "IsEnabled": true, + "MultiTenancySide": 3, + "MenuGroup": "Erp" + }, + { "GroupName": "App.Store", "Name": "App.Store.WarehouseType", @@ -13093,4 +13221,4 @@ "MenuGroup": "Erp" } ] -} +} \ No newline at end of file diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs b/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs index 3e436a52..a404eb5e 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/SeederDefaults.cs @@ -62,7 +62,7 @@ public static class SeederDefaults ColumnResizingMode = "widget", FocusRowEnabled = true, }); - public static readonly string DefaultLayoutJson = JsonSerializer.Serialize(new LayoutDto() + public static string DefaultLayoutJson(string DefaultLayout = "grid") => JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, @@ -71,7 +71,7 @@ public static class SeederDefaults Tree = true, Gantt = true, Scheduler = true, - DefaultLayout = "grid", + DefaultLayout = DefaultLayout, CardLayoutColumn = 4 }); public static readonly string DefaultExportJson = JsonSerializer.Serialize(new ChartExportDto diff --git a/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs b/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs index f7452c79..36d8bbe1 100644 --- a/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs +++ b/api/src/Erp.Platform.Domain.Shared/Enums/TableNameEnum.cs @@ -173,6 +173,8 @@ public enum TableNameEnum WorkorderType, WorkorderStatus, Workorder, + WorkorderMaterial, + WorkorderActivity, WarehouseType, Warehouse, ZoneType, diff --git a/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs index 9557d3bc..1cfa1d5d 100644 --- a/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Erp.Platform.Domain.Shared/PlatformConsts.cs @@ -719,6 +719,45 @@ public static class PlatformConsts { return TableNameResolver.GetFullViewName($"{TableName}"); } + + public static class ListFormFieldAlignment + { + public const string Left = "left"; + public const string Center = "center"; + public const string Right = "right"; + } + + public static class ListFormFieldFormat + { + public const string Billions = "billions"; + public const string Currency = "currency"; + public const string Day = "day"; + public const string Decimal = "decimal"; + public const string Exponential = "exponential"; + public const string FixedPoint = "fixedPoint"; + public const string LargeNumber = "largeNumber"; + public const string LongDate = "longDate"; + public const string LongTime = "longTime"; + public const string Millions = "millions"; + public const string Millisecond = "millisecond"; + public const string Month = "month"; + public const string MonthAndDay = "monthAndDay"; + public const string MonthAndYear = "monthAndYear"; + public const string Percent = "percent"; + public const string Quarter = "quarter"; + public const string QuarterAndYear = "quarterAndYear"; + public const string ShortDate = "shortDate"; + public const string ShortTime = "shortTime"; + public const string Thousands = "thousands"; + public const string Trillions = "trillions"; + public const string Year = "year"; + public const string DayOfWeek = "dayOfWeek"; + public const string Hour = "hour"; + public const string LongDateLongTime = "longDateLongTime"; + public const string Minute = "minute"; + public const string Second = "second"; + public const string ShortDateShortTime = "shortDateShortTime"; + } } diff --git a/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs index c7a31dfe..b00a2f4c 100644 --- a/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Erp.Platform.Domain.Shared/TableNameResolver.cs @@ -203,6 +203,8 @@ public static class TableNameResolver { nameof(TableNameEnum.Workorder), (TablePrefix.TenantByName, MenuPrefix.Maintenance) }, { nameof(TableNameEnum.WorkorderType), (TablePrefix.TenantByName, MenuPrefix.Maintenance) }, { nameof(TableNameEnum.WorkorderStatus), (TablePrefix.TenantByName, MenuPrefix.Maintenance) }, + { nameof(TableNameEnum.WorkorderMaterial), (TablePrefix.TenantByName, MenuPrefix.Maintenance) }, + { nameof(TableNameEnum.WorkorderActivity), (TablePrefix.TenantByName, MenuPrefix.Maintenance) }, // 🔹 ACCOUNTING diff --git a/api/src/Erp.Platform.Domain/Data/SeedConsts.cs b/api/src/Erp.Platform.Domain/Data/SeedConsts.cs index c1d457fe..78ba8353 100644 --- a/api/src/Erp.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Erp.Platform.Domain/Data/SeedConsts.cs @@ -547,9 +547,12 @@ public static class SeedConsts public const string Fault = Default + ".Fault"; public const string FaultType = Default + ".FaultType"; public const string FaultStatus = Default + ".FaultStatus"; - public const string Workorder = Default + ".Workorder"; public const string WorkorderType = Default + ".WorkorderType"; public const string WorkorderStatus = Default + ".WorkorderStatus"; + public const string Workorder = Default + ".Workorder"; + public const string WorkorderMaterial = Default + ".WorkorderMaterial"; + public const string WorkorderActivity = Default + ".WorkorderActivity"; + public const string WorkorderCalendar = Default + ".WorkorderCalendar"; } public static class Accounting diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Demo.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Demo.cs index 6be20362..1b6ddcb0 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Demo.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Demo.cs @@ -9,7 +9,7 @@ public class Demo : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public string OrganizationName { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string Email { get; set; } public string PhoneNumber { get; set; } public string Address { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Lawyer.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Lawyer.cs index fa623f9d..7bbf8cf7 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Lawyer.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Administration/Lawyer.cs @@ -8,7 +8,7 @@ public class Lawyer : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string Email { get; set; } public string Address { get; set; } public string TaxOffice { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs index 64237d7a..e47ebc47 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Hr/Employee.cs @@ -10,7 +10,7 @@ public class Employee : FullAuditedEntity, IMultiTenant public Guid? TenantId { get; set; } public string Code { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string Avatar { get; set; } public string NationalId { get; set; } public DateTime BirthDate { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Intranet/Visitor.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Intranet/Visitor.cs index 19b2e900..9c7e901e 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Intranet/Visitor.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Intranet/Visitor.cs @@ -8,7 +8,7 @@ public class Visitor : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string CompanyName { get; set; } public string Email { get; set; } public string PhoneNumber { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs index abce9b2f..1310a6ee 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/Workorder.cs @@ -14,28 +14,28 @@ public class Workorder : FullAuditedEntity, IMultiTenant public Workcenter Workcenter { get; set; } public Guid? PlanId { get; set; } - public PlanWizard Plan { get; set; } + public PlanWizard PlanWizard { get; set; } - public Guid OrderTypeId { get; set; } //Preventive, Corrective, Emergency, Inspection, Calibration - public WorkorderType OrderType { get; set; } + public Guid WorkorderTypeId { get; set; } //Preventive, Corrective, Emergency, Inspection, Calibration + public WorkorderType WorkorderType { get; set; } public string Priority { get; set; } //Low, Medium, High, Urgent public string Status { get; set; } //Created, Planned, Released, InProgress, OnHold, Completed, Cancelled + public string Subject { get; set; } - public string Description { get; set; } - public string AssignedTo { get; set; } - public string MaintenanceTeamId { get; set; } + public Guid EmployeeId { get; set; } + public Employee Employee { get; set; } public DateTime? ScheduledStart { get; set; } public DateTime? ScheduledEnd { get; set; } + public decimal EstimatedCost { get; set; } + public DateTime? ActualStart { get; set; } public DateTime? ActualEnd { get; set; } + public decimal ActualCost { get; set; } - public int EstimatedCost { get; set; } - public int ActualCost { get; set; } - + public string Description { get; set; } public string Notes { get; set; } - public string CompletionNotes { get; set; } public ICollection Materials { get; set; } public ICollection Activities { get; set; } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderActivity.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderActivity.cs index f9037cb6..6f0b3731 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderActivity.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderActivity.cs @@ -8,16 +8,12 @@ public class WorkorderActivity : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public Guid WorkOrderId { get; set; } - public Workorder WorkOrder { get; set; } + public Guid WorkorderId { get; set; } + public Workorder Workorder { get; set; } - public string ActivityDescription { get; set; } - - public int PlannedDuration { get; set; } - public int ActualDuration { get; set; } - - public string PerformedBy { get; set; } - public DateTime? CompletedAt { get; set; } - public string Notes { get; set; } + public Guid EmployeeId { get; set; } + public Employee Employee { get; set; } + public int Duration { get; set; } + public string Description { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderMaterial.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderMaterial.cs index f3e60a54..0d2501ec 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderMaterial.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/Maintenance/WorkorderMaterial.cs @@ -8,16 +8,14 @@ public class WorkorderMaterial : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } - public Guid WorkOrderId { get; set; } - public Workorder WorkOrder { get; set; } + public Guid WorkorderId { get; set; } + public Workorder Workorder { get; set; } public Guid MaterialId { get; set; } public Material Material { get; set; } - public int PlannedQuantity { get; set; } - public int ActualQuantity { get; set; } - - public int UnitCost { get; set; } - public int TotalCost { get; set; } + public decimal Quantity { get; set; } + public decimal UnitCost { get; set; } + public decimal TotalCost { get; set; } } diff --git a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PartnerContact.cs b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PartnerContact.cs index 08e2ba35..3feb8a91 100644 --- a/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PartnerContact.cs +++ b/api/src/Erp.Platform.Domain/Entities/Tenant/SupplyChain/PartnerContact.cs @@ -10,7 +10,7 @@ public class PartnerContact : FullAuditedEntity, IMultiTenant public Guid PartnerId { get; set; } public Partner Partner { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string Title { get; set; } public string Department { get; set; } public string Email { get; set; } diff --git a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 33b57a30..e32a24b9 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -259,6 +259,8 @@ public class PlatformDbContext : public DbSet WorkorderTypes { get; set; } public DbSet WorkorderStatuses { get; set; } public DbSet Workorders { get; set; } + public DbSet WorkorderMaterials { get; set; } + public DbSet WorkorderActivities { get; set; } #endregion #region Mrp @@ -1364,7 +1366,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Lawyer)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.FullName).HasMaxLength(100).IsRequired(); + b.Property(x => x.Name).HasMaxLength(100).IsRequired(); b.Property(x => x.Email).HasMaxLength(100); b.Property(x => x.Address).HasMaxLength(250); b.Property(x => x.TaxOffice).HasMaxLength(50); @@ -1601,7 +1603,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.OrganizationName).IsRequired().HasMaxLength(256); - b.Property(x => x.FullName).IsRequired().HasMaxLength(256); + b.Property(x => x.Name).IsRequired().HasMaxLength(256); b.Property(x => x.Email).IsRequired().HasMaxLength(256); b.Property(x => x.PhoneNumber).IsRequired().HasMaxLength(20); b.Property(x => x.Address).IsRequired().HasMaxLength(512); @@ -1911,7 +1913,7 @@ public class PlatformDbContext : b.ConfigureByConvention(); b.Property(x => x.Code).IsRequired().HasMaxLength(50); - b.Property(x => x.FullName).HasMaxLength(200); + b.Property(x => x.Name).IsRequired().HasMaxLength(200); b.Property(x => x.Email).HasMaxLength(150); b.Property(x => x.PhoneNumber).HasMaxLength(20); b.Property(x => x.MobileNumber).HasMaxLength(20); @@ -2156,7 +2158,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Visitor)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.FullName).IsRequired().HasMaxLength(100); + b.Property(x => x.Name).IsRequired().HasMaxLength(100); b.Property(x => x.CompanyName).HasMaxLength(150); b.Property(a => a.PhoneNumber).IsRequired().HasMaxLength(20); b.Property(x => x.Email).HasMaxLength(150); @@ -2546,7 +2548,7 @@ public class PlatformDbContext : b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.PartnerContact)), Prefix.DbSchema); b.ConfigureByConvention(); - b.Property(x => x.FullName).IsRequired().HasMaxLength(128); + b.Property(x => x.Name).IsRequired().HasMaxLength(128); b.Property(x => x.Title).HasMaxLength(64); b.Property(x => x.Department).HasMaxLength(64); b.Property(x => x.Email).HasMaxLength(128); @@ -3500,7 +3502,7 @@ public class PlatformDbContext : b.HasOne(x => x.Employee) .WithMany(x => x.Quotations) .HasForeignKey(x => x.EmployeeId) - .OnDelete(DeleteBehavior.Restrict); + .OnDelete(DeleteBehavior.Restrict); }); builder.Entity(b => @@ -3522,5 +3524,57 @@ public class PlatformDbContext : .HasForeignKey(x => x.QuotationId) .OnDelete(DeleteBehavior.Cascade); }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.Workorder)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.WorkorderNumber).HasMaxLength(50); + b.Property(x => x.WorkcenterId).IsRequired(); + b.Property(x => x.WorkorderTypeId).IsRequired(); + b.Property(x => x.Priority).IsRequired().HasMaxLength(50); + b.Property(x => x.Status).IsRequired().HasMaxLength(50); + b.Property(x => x.Subject).HasMaxLength(500); + + b.Property(x => x.EstimatedCost).HasPrecision(18, 2).HasDefaultValue(0); + b.Property(x => x.ActualCost).HasPrecision(18, 2).HasDefaultValue(0); + + b.Property(x => x.Description).HasMaxLength(1000); + b.Property(x => x.Notes).HasMaxLength(1000); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderMaterial)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.WorkorderId).IsRequired(); + b.Property(x => x.MaterialId).IsRequired(); + b.Property(x => x.Quantity).HasPrecision(18, 2); + b.Property(x => x.UnitCost).HasPrecision(18, 2); + b.Property(x => x.TotalCost).HasPrecision(18, 2); + + b.HasOne(x => x.Workorder) + .WithMany(x => x.Materials) + .HasForeignKey(x => x.WorkorderId) + .OnDelete(DeleteBehavior.Restrict); + }); + + builder.Entity(b => + { + b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.WorkorderActivity)), Prefix.DbSchema); + b.ConfigureByConvention(); + + b.Property(x => x.WorkorderId).IsRequired(); + b.Property(x => x.EmployeeId).IsRequired(); + b.Property(x => x.Duration).HasDefaultValue(0); + b.Property(x => x.Description).HasMaxLength(1000); + + b.HasOne(x => x.Workorder) + .WithMany(x => x.Activities) + .HasForeignKey(x => x.WorkorderId) + .OnDelete(DeleteBehavior.Restrict); + }); } } \ No newline at end of file diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203145036_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203205612_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203145036_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203205612_Initial.Designer.cs index ec2f53f9..da39d549 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203145036_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203205612_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251203145036_Initial")] + [Migration("20251203205612_Initial")] partial class Initial { /// @@ -4136,11 +4136,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(256) .HasColumnType("nvarchar(256)"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -4160,6 +4155,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(2000) .HasColumnType("nvarchar(2000)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + b.Property("NumberOfBranches") .HasColumnType("int"); @@ -4665,10 +4665,6 @@ namespace Erp.Platform.Migrations b.Property("EmploymentTypeId") .HasColumnType("uniqueidentifier"); - b.Property("FullName") - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - b.Property("Gender") .HasColumnType("nvarchar(max)"); @@ -4711,6 +4707,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + b.Property("NationalId") .HasMaxLength(20) .HasColumnType("nvarchar(20)"); @@ -5774,11 +5775,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -5797,6 +5793,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("PhoneNumber") .HasMaxLength(20) .HasColumnType("nvarchar(20)"); @@ -8771,11 +8772,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -8804,6 +8800,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + b.Property("PartnerId") .HasColumnType("uniqueidentifier"); @@ -13739,11 +13740,6 @@ namespace Erp.Platform.Migrations b.Property("EmployeeId") .HasColumnType("uniqueidentifier"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -13758,6 +13754,11 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("PhoneNumber") .IsRequired() .HasMaxLength(20) @@ -14415,8 +14416,11 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActualCost") - .HasColumnType("int"); + b.Property("ActualCost") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("ActualEnd") .HasColumnType("datetime2"); @@ -14424,12 +14428,6 @@ namespace Erp.Platform.Migrations b.Property("ActualStart") .HasColumnType("datetime2"); - b.Property("AssignedTo") - .HasColumnType("nvarchar(max)"); - - b.Property("CompletionNotes") - .HasColumnType("nvarchar(max)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14447,10 +14445,17 @@ namespace Erp.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); - b.Property("EstimatedCost") - .HasColumnType("int"); + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("EstimatedCost") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -14466,20 +14471,20 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaintenanceTeamId") - .HasColumnType("nvarchar(max)"); - b.Property("Notes") - .HasColumnType("nvarchar(max)"); - - b.Property("OrderTypeId") - .HasColumnType("uniqueidentifier"); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("PlanId") .HasColumnType("uniqueidentifier"); + b.Property("PlanWizardId") + .HasColumnType("uniqueidentifier"); + b.Property("Priority") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("ScheduledEnd") .HasColumnType("datetime2"); @@ -14488,7 +14493,13 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2"); b.Property("Status") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -14498,22 +14509,28 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier"); b.Property("WorkorderNumber") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("WorkorderStatusId") .HasColumnType("uniqueidentifier"); + b.Property("WorkorderTypeId") + .HasColumnType("uniqueidentifier"); + b.HasKey("Id"); - b.HasIndex("OrderTypeId"); + b.HasIndex("EmployeeId"); - b.HasIndex("PlanId"); + b.HasIndex("PlanWizardId"); b.HasIndex("WorkcenterId"); b.HasIndex("WorkorderStatusId"); - b.ToTable("Workorders"); + b.HasIndex("WorkorderTypeId"); + + b.ToTable("Mnt_T_Workorder", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderActivity", b => @@ -14521,15 +14538,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActivityDescription") - .HasColumnType("nvarchar(max)"); - - b.Property("ActualDuration") - .HasColumnType("int"); - - b.Property("CompletedAt") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14546,6 +14554,18 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Duration") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -14560,27 +14580,20 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Notes") - .HasColumnType("nvarchar(max)"); - - b.Property("PerformedBy") - .HasColumnType("nvarchar(max)"); - - b.Property("PlannedDuration") - .HasColumnType("int"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkOrderId") + b.Property("WorkorderId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); - b.HasIndex("WorkOrderId"); + b.HasIndex("EmployeeId"); - b.ToTable("WorkorderActivity"); + b.HasIndex("WorkorderId"); + + b.ToTable("Mnt_T_WorkorderActivity", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderMaterial", b => @@ -14588,9 +14601,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActualQuantity") - .HasColumnType("int"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14624,29 +14634,32 @@ namespace Erp.Platform.Migrations b.Property("MaterialId") .HasColumnType("uniqueidentifier"); - b.Property("PlannedQuantity") - .HasColumnType("int"); + b.Property("Quantity") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TotalCost") - .HasColumnType("int"); + b.Property("TotalCost") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); - b.Property("UnitCost") - .HasColumnType("int"); + b.Property("UnitCost") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); - b.Property("WorkOrderId") + b.Property("WorkorderId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); b.HasIndex("MaterialId"); - b.HasIndex("WorkOrderId"); + b.HasIndex("WorkorderId"); - b.ToTable("WorkorderMaterial"); + b.ToTable("Mnt_T_WorkorderMaterial", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderStatus", b => @@ -18732,15 +18745,15 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workorder", b => { - b.HasOne("Erp.Platform.Entities.WorkorderType", "OrderType") - .WithMany("Workorders") - .HasForeignKey("OrderTypeId") + b.HasOne("Erp.Platform.Entities.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Erp.Platform.Entities.PlanWizard", "Plan") + b.HasOne("Erp.Platform.Entities.PlanWizard", "PlanWizard") .WithMany() - .HasForeignKey("PlanId"); + .HasForeignKey("PlanWizardId"); b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Workorders") @@ -18752,22 +18765,38 @@ namespace Erp.Platform.Migrations .WithMany("Workorders") .HasForeignKey("WorkorderStatusId"); - b.Navigation("OrderType"); + b.HasOne("Erp.Platform.Entities.WorkorderType", "WorkorderType") + .WithMany("Workorders") + .HasForeignKey("WorkorderTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Plan"); + b.Navigation("Employee"); + + b.Navigation("PlanWizard"); b.Navigation("Workcenter"); + + b.Navigation("WorkorderType"); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderActivity", b => { - b.HasOne("Erp.Platform.Entities.Workorder", "WorkOrder") - .WithMany("Activities") - .HasForeignKey("WorkOrderId") + b.HasOne("Erp.Platform.Entities.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("WorkOrder"); + b.HasOne("Erp.Platform.Entities.Workorder", "Workorder") + .WithMany("Activities") + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workorder"); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderMaterial", b => @@ -18778,15 +18807,15 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Erp.Platform.Entities.Workorder", "WorkOrder") + b.HasOne("Erp.Platform.Entities.Workorder", "Workorder") .WithMany("Materials") - .HasForeignKey("WorkOrderId") - .OnDelete(DeleteBehavior.Cascade) + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Material"); - b.Navigation("WorkOrder"); + b.Navigation("Workorder"); }); modelBuilder.Entity("Erp.Platform.Entities.Zone", b => diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203145036_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203205612_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203145036_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203205612_Initial.cs index 9c5ff032..e2a5f30b 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203145036_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20251203205612_Initial.cs @@ -592,7 +592,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), OrganizationName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), - FullName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false), PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), Address = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: false), @@ -701,7 +701,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - FullName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), Email = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), Address = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), TaxOffice = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), @@ -5060,7 +5060,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), PartnerId = table.Column(type: "uniqueidentifier", nullable: false), - FullName = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), + Name = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: false), Title = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Department = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), Email = table.Column(type: "nvarchar(128)", maxLength: 128, nullable: true), @@ -5436,7 +5436,7 @@ namespace Erp.Platform.Migrations Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), Code = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), - FullName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), Avatar = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), NationalId = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), BirthDate = table.Column(type: "datetime2", nullable: false), @@ -6054,7 +6054,7 @@ namespace Erp.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - FullName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), + Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false), CompanyName = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), Email = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: true), PhoneNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false), @@ -6318,28 +6318,28 @@ namespace Erp.Platform.Migrations }); migrationBuilder.CreateTable( - name: "Workorders", + name: "Mnt_T_Workorder", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WorkorderNumber = table.Column(type: "nvarchar(max)", nullable: true), + WorkorderNumber = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: true), WorkcenterId = table.Column(type: "uniqueidentifier", nullable: false), PlanId = table.Column(type: "uniqueidentifier", nullable: true), - OrderTypeId = table.Column(type: "uniqueidentifier", nullable: false), - Priority = table.Column(type: "nvarchar(max)", nullable: true), - Status = table.Column(type: "nvarchar(max)", nullable: true), - Description = table.Column(type: "nvarchar(max)", nullable: true), - AssignedTo = table.Column(type: "nvarchar(max)", nullable: true), - MaintenanceTeamId = table.Column(type: "nvarchar(max)", nullable: true), + PlanWizardId = table.Column(type: "uniqueidentifier", nullable: true), + WorkorderTypeId = table.Column(type: "uniqueidentifier", nullable: false), + Priority = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Status = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + Subject = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), ScheduledStart = table.Column(type: "datetime2", nullable: true), ScheduledEnd = table.Column(type: "datetime2", nullable: true), + EstimatedCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), ActualStart = table.Column(type: "datetime2", nullable: true), ActualEnd = table.Column(type: "datetime2", nullable: true), - EstimatedCost = table.Column(type: "int", nullable: false), - ActualCost = table.Column(type: "int", nullable: false), - Notes = table.Column(type: "nvarchar(max)", nullable: true), - CompletionNotes = table.Column(type: "nvarchar(max)", nullable: true), + ActualCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Notes = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), WorkorderStatusId = table.Column(type: "uniqueidentifier", nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), @@ -6351,26 +6351,32 @@ namespace Erp.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_Workorders", x => x.Id); + table.PrimaryKey("PK_Mnt_T_Workorder", x => x.Id); table.ForeignKey( - name: "FK_Workorders_Mnt_T_PlanWizard_PlanId", - column: x => x.PlanId, + name: "FK_Mnt_T_Workorder_Hr_T_Employee_EmployeeId", + column: x => x.EmployeeId, + principalTable: "Hr_T_Employee", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Mnt_T_Workorder_Mnt_T_PlanWizard_PlanWizardId", + column: x => x.PlanWizardId, principalTable: "Mnt_T_PlanWizard", principalColumn: "Id"); table.ForeignKey( - name: "FK_Workorders_Mnt_T_Workcenter_WorkcenterId", + name: "FK_Mnt_T_Workorder_Mnt_T_Workcenter_WorkcenterId", column: x => x.WorkcenterId, principalTable: "Mnt_T_Workcenter", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( - name: "FK_Workorders_Mnt_T_WorkorderStatus_WorkorderStatusId", + name: "FK_Mnt_T_Workorder_Mnt_T_WorkorderStatus_WorkorderStatusId", column: x => x.WorkorderStatusId, principalTable: "Mnt_T_WorkorderStatus", principalColumn: "Id"); table.ForeignKey( - name: "FK_Workorders_Mnt_T_WorkorderType_OrderTypeId", - column: x => x.OrderTypeId, + name: "FK_Mnt_T_Workorder_Mnt_T_WorkorderType_WorkorderTypeId", + column: x => x.WorkorderTypeId, principalTable: "Mnt_T_WorkorderType", principalColumn: "Id", onDelete: ReferentialAction.Cascade); @@ -6811,18 +6817,15 @@ namespace Erp.Platform.Migrations }); migrationBuilder.CreateTable( - name: "WorkorderActivity", + name: "Mnt_T_WorkorderActivity", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WorkOrderId = table.Column(type: "uniqueidentifier", nullable: false), - ActivityDescription = table.Column(type: "nvarchar(max)", nullable: true), - PlannedDuration = table.Column(type: "int", nullable: false), - ActualDuration = table.Column(type: "int", nullable: false), - PerformedBy = table.Column(type: "nvarchar(max)", nullable: true), - CompletedAt = table.Column(type: "datetime2", nullable: true), - Notes = table.Column(type: "nvarchar(max)", nullable: true), + WorkorderId = table.Column(type: "uniqueidentifier", nullable: false), + EmployeeId = table.Column(type: "uniqueidentifier", nullable: false), + Duration = table.Column(type: "int", nullable: false, defaultValue: 0), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -6833,27 +6836,32 @@ namespace Erp.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WorkorderActivity", x => x.Id); + table.PrimaryKey("PK_Mnt_T_WorkorderActivity", x => x.Id); table.ForeignKey( - name: "FK_WorkorderActivity_Workorders_WorkOrderId", - column: x => x.WorkOrderId, - principalTable: "Workorders", + name: "FK_Mnt_T_WorkorderActivity_Hr_T_Employee_EmployeeId", + column: x => x.EmployeeId, + principalTable: "Hr_T_Employee", principalColumn: "Id", onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Mnt_T_WorkorderActivity_Mnt_T_Workorder_WorkorderId", + column: x => x.WorkorderId, + principalTable: "Mnt_T_Workorder", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( - name: "WorkorderMaterial", + name: "Mnt_T_WorkorderMaterial", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - WorkOrderId = table.Column(type: "uniqueidentifier", nullable: false), + WorkorderId = table.Column(type: "uniqueidentifier", nullable: false), MaterialId = table.Column(type: "uniqueidentifier", nullable: false), - PlannedQuantity = table.Column(type: "int", nullable: false), - ActualQuantity = table.Column(type: "int", nullable: false), - UnitCost = table.Column(type: "int", nullable: false), - TotalCost = table.Column(type: "int", nullable: false), + Quantity = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + UnitCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), + TotalCost = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), @@ -6864,19 +6872,19 @@ namespace Erp.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_WorkorderMaterial", x => x.Id); + table.PrimaryKey("PK_Mnt_T_WorkorderMaterial", x => x.Id); table.ForeignKey( - name: "FK_WorkorderMaterial_Scp_T_Material_MaterialId", + name: "FK_Mnt_T_WorkorderMaterial_Mnt_T_Workorder_WorkorderId", + column: x => x.WorkorderId, + principalTable: "Mnt_T_Workorder", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_Mnt_T_WorkorderMaterial_Scp_T_Material_MaterialId", column: x => x.MaterialId, principalTable: "Scp_T_Material", principalColumn: "Id", onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "FK_WorkorderMaterial_Workorders_WorkOrderId", - column: x => x.WorkOrderId, - principalTable: "Workorders", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( @@ -7938,6 +7946,51 @@ namespace Erp.Platform.Migrations table: "Mnt_T_WorkcenterSpecification", column: "WorkcenterId"); + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_Workorder_EmployeeId", + table: "Mnt_T_Workorder", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_Workorder_PlanWizardId", + table: "Mnt_T_Workorder", + column: "PlanWizardId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_Workorder_WorkcenterId", + table: "Mnt_T_Workorder", + column: "WorkcenterId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_Workorder_WorkorderStatusId", + table: "Mnt_T_Workorder", + column: "WorkorderStatusId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_Workorder_WorkorderTypeId", + table: "Mnt_T_Workorder", + column: "WorkorderTypeId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_WorkorderActivity_EmployeeId", + table: "Mnt_T_WorkorderActivity", + column: "EmployeeId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_WorkorderActivity_WorkorderId", + table: "Mnt_T_WorkorderActivity", + column: "WorkorderId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_WorkorderMaterial_MaterialId", + table: "Mnt_T_WorkorderMaterial", + column: "MaterialId"); + + migrationBuilder.CreateIndex( + name: "IX_Mnt_T_WorkorderMaterial_WorkorderId", + table: "Mnt_T_WorkorderMaterial", + column: "WorkorderId"); + migrationBuilder.CreateIndex( name: "IX_Mrp_T_Bom_BomTypeId", table: "Mrp_T_Bom", @@ -8559,41 +8612,6 @@ namespace Erp.Platform.Migrations table: "Str_T_Zone", column: "ZoneTypeId"); - migrationBuilder.CreateIndex( - 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", - table: "Workorders", - column: "OrderTypeId"); - - migrationBuilder.CreateIndex( - name: "IX_Workorders_PlanId", - table: "Workorders", - column: "PlanId"); - - migrationBuilder.CreateIndex( - name: "IX_Workorders_WorkcenterId", - 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", @@ -8931,6 +8949,12 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Mnt_T_WorkcenterSpecification"); + migrationBuilder.DropTable( + name: "Mnt_T_WorkorderActivity"); + + migrationBuilder.DropTable( + name: "Mnt_T_WorkorderMaterial"); + migrationBuilder.DropTable( name: "Mrp_T_BomComponent"); @@ -9111,12 +9135,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Str_T_PutawayCondition"); - migrationBuilder.DropTable( - name: "WorkorderActivity"); - - migrationBuilder.DropTable( - name: "WorkorderMaterial"); - migrationBuilder.DropTable( name: "AbpEntityChanges"); @@ -9174,6 +9192,9 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Mnt_T_FaultType"); + migrationBuilder.DropTable( + name: "Mnt_T_Workorder"); + migrationBuilder.DropTable( name: "Mrp_T_Bom"); @@ -9246,9 +9267,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Str_T_Putaway"); - migrationBuilder.DropTable( - name: "Workorders"); - migrationBuilder.DropTable( name: "AbpAuditLogs"); @@ -9267,6 +9285,15 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Hr_T_Survey"); + migrationBuilder.DropTable( + name: "Mnt_T_PlanWizard"); + + migrationBuilder.DropTable( + name: "Mnt_T_WorkorderStatus"); + + migrationBuilder.DropTable( + name: "Mnt_T_WorkorderType"); + migrationBuilder.DropTable( name: "Mrp_T_BomType"); @@ -9321,18 +9348,12 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Str_T_ZoneType"); - migrationBuilder.DropTable( - name: "Mnt_T_PlanWizard"); - - migrationBuilder.DropTable( - name: "Mnt_T_WorkorderStatus"); - - migrationBuilder.DropTable( - name: "Mnt_T_WorkorderType"); - migrationBuilder.DropTable( name: "Sas_T_Branch"); + migrationBuilder.DropTable( + name: "Mnt_T_Workcenter"); + migrationBuilder.DropTable( name: "Mrp_T_OperationCategory"); @@ -9342,9 +9363,6 @@ namespace Erp.Platform.Migrations migrationBuilder.DropTable( name: "Str_T_WarehouseType"); - migrationBuilder.DropTable( - name: "Mnt_T_Workcenter"); - migrationBuilder.DropTable( name: "Mnt_T_WorkcenterStatus"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 878f8122..5a6bc9ed 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -4133,11 +4133,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(256) .HasColumnType("nvarchar(256)"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -4157,6 +4152,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(2000) .HasColumnType("nvarchar(2000)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + b.Property("NumberOfBranches") .HasColumnType("int"); @@ -4662,10 +4662,6 @@ namespace Erp.Platform.Migrations b.Property("EmploymentTypeId") .HasColumnType("uniqueidentifier"); - b.Property("FullName") - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - b.Property("Gender") .HasColumnType("nvarchar(max)"); @@ -4708,6 +4704,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + b.Property("NationalId") .HasMaxLength(20) .HasColumnType("nvarchar(20)"); @@ -5771,11 +5772,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -5794,6 +5790,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("PhoneNumber") .HasMaxLength(20) .HasColumnType("nvarchar(20)"); @@ -8768,11 +8769,6 @@ namespace Erp.Platform.Migrations .HasMaxLength(128) .HasColumnType("nvarchar(128)"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("nvarchar(128)"); - b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -8801,6 +8797,11 @@ namespace Erp.Platform.Migrations .HasMaxLength(20) .HasColumnType("nvarchar(20)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + b.Property("PartnerId") .HasColumnType("uniqueidentifier"); @@ -13736,11 +13737,6 @@ namespace Erp.Platform.Migrations b.Property("EmployeeId") .HasColumnType("uniqueidentifier"); - b.Property("FullName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -13755,6 +13751,11 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + b.Property("PhoneNumber") .IsRequired() .HasMaxLength(20) @@ -14412,8 +14413,11 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActualCost") - .HasColumnType("int"); + b.Property("ActualCost") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("ActualEnd") .HasColumnType("datetime2"); @@ -14421,12 +14425,6 @@ namespace Erp.Platform.Migrations b.Property("ActualStart") .HasColumnType("datetime2"); - b.Property("AssignedTo") - .HasColumnType("nvarchar(max)"); - - b.Property("CompletionNotes") - .HasColumnType("nvarchar(max)"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14444,10 +14442,17 @@ namespace Erp.Platform.Migrations .HasColumnName("DeletionTime"); b.Property("Description") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); - b.Property("EstimatedCost") - .HasColumnType("int"); + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + + b.Property("EstimatedCost") + .ValueGeneratedOnAdd() + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)") + .HasDefaultValue(0m); b.Property("IsDeleted") .ValueGeneratedOnAdd() @@ -14463,20 +14468,20 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MaintenanceTeamId") - .HasColumnType("nvarchar(max)"); - b.Property("Notes") - .HasColumnType("nvarchar(max)"); - - b.Property("OrderTypeId") - .HasColumnType("uniqueidentifier"); + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); b.Property("PlanId") .HasColumnType("uniqueidentifier"); + b.Property("PlanWizardId") + .HasColumnType("uniqueidentifier"); + b.Property("Priority") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("ScheduledEnd") .HasColumnType("datetime2"); @@ -14485,7 +14490,13 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2"); b.Property("Status") - .HasColumnType("nvarchar(max)"); + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") @@ -14495,22 +14506,28 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier"); b.Property("WorkorderNumber") - .HasColumnType("nvarchar(max)"); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("WorkorderStatusId") .HasColumnType("uniqueidentifier"); + b.Property("WorkorderTypeId") + .HasColumnType("uniqueidentifier"); + b.HasKey("Id"); - b.HasIndex("OrderTypeId"); + b.HasIndex("EmployeeId"); - b.HasIndex("PlanId"); + b.HasIndex("PlanWizardId"); b.HasIndex("WorkcenterId"); b.HasIndex("WorkorderStatusId"); - b.ToTable("Workorders"); + b.HasIndex("WorkorderTypeId"); + + b.ToTable("Mnt_T_Workorder", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderActivity", b => @@ -14518,15 +14535,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActivityDescription") - .HasColumnType("nvarchar(max)"); - - b.Property("ActualDuration") - .HasColumnType("int"); - - b.Property("CompletedAt") - .HasColumnType("datetime2"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14543,6 +14551,18 @@ namespace Erp.Platform.Migrations .HasColumnType("datetime2") .HasColumnName("DeletionTime"); + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("nvarchar(1000)"); + + b.Property("Duration") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(0); + + b.Property("EmployeeId") + .HasColumnType("uniqueidentifier"); + b.Property("IsDeleted") .ValueGeneratedOnAdd() .HasColumnType("bit") @@ -14557,27 +14577,20 @@ namespace Erp.Platform.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("Notes") - .HasColumnType("nvarchar(max)"); - - b.Property("PerformedBy") - .HasColumnType("nvarchar(max)"); - - b.Property("PlannedDuration") - .HasColumnType("int"); - b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("WorkOrderId") + b.Property("WorkorderId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); - b.HasIndex("WorkOrderId"); + b.HasIndex("EmployeeId"); - b.ToTable("WorkorderActivity"); + b.HasIndex("WorkorderId"); + + b.ToTable("Mnt_T_WorkorderActivity", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderMaterial", b => @@ -14585,9 +14598,6 @@ namespace Erp.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); - b.Property("ActualQuantity") - .HasColumnType("int"); - b.Property("CreationTime") .HasColumnType("datetime2") .HasColumnName("CreationTime"); @@ -14621,29 +14631,32 @@ namespace Erp.Platform.Migrations b.Property("MaterialId") .HasColumnType("uniqueidentifier"); - b.Property("PlannedQuantity") - .HasColumnType("int"); + b.Property("Quantity") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); b.Property("TenantId") .HasColumnType("uniqueidentifier") .HasColumnName("TenantId"); - b.Property("TotalCost") - .HasColumnType("int"); + b.Property("TotalCost") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); - b.Property("UnitCost") - .HasColumnType("int"); + b.Property("UnitCost") + .HasPrecision(18, 2) + .HasColumnType("decimal(18,2)"); - b.Property("WorkOrderId") + b.Property("WorkorderId") .HasColumnType("uniqueidentifier"); b.HasKey("Id"); b.HasIndex("MaterialId"); - b.HasIndex("WorkOrderId"); + b.HasIndex("WorkorderId"); - b.ToTable("WorkorderMaterial"); + b.ToTable("Mnt_T_WorkorderMaterial", (string)null); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderStatus", b => @@ -18729,15 +18742,15 @@ namespace Erp.Platform.Migrations modelBuilder.Entity("Erp.Platform.Entities.Workorder", b => { - b.HasOne("Erp.Platform.Entities.WorkorderType", "OrderType") - .WithMany("Workorders") - .HasForeignKey("OrderTypeId") + b.HasOne("Erp.Platform.Entities.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Erp.Platform.Entities.PlanWizard", "Plan") + b.HasOne("Erp.Platform.Entities.PlanWizard", "PlanWizard") .WithMany() - .HasForeignKey("PlanId"); + .HasForeignKey("PlanWizardId"); b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter") .WithMany("Workorders") @@ -18749,22 +18762,38 @@ namespace Erp.Platform.Migrations .WithMany("Workorders") .HasForeignKey("WorkorderStatusId"); - b.Navigation("OrderType"); + b.HasOne("Erp.Platform.Entities.WorkorderType", "WorkorderType") + .WithMany("Workorders") + .HasForeignKey("WorkorderTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - b.Navigation("Plan"); + b.Navigation("Employee"); + + b.Navigation("PlanWizard"); b.Navigation("Workcenter"); + + b.Navigation("WorkorderType"); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderActivity", b => { - b.HasOne("Erp.Platform.Entities.Workorder", "WorkOrder") - .WithMany("Activities") - .HasForeignKey("WorkOrderId") + b.HasOne("Erp.Platform.Entities.Employee", "Employee") + .WithMany() + .HasForeignKey("EmployeeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.Navigation("WorkOrder"); + b.HasOne("Erp.Platform.Entities.Workorder", "Workorder") + .WithMany("Activities") + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Employee"); + + b.Navigation("Workorder"); }); modelBuilder.Entity("Erp.Platform.Entities.WorkorderMaterial", b => @@ -18775,15 +18804,15 @@ namespace Erp.Platform.Migrations .OnDelete(DeleteBehavior.Cascade) .IsRequired(); - b.HasOne("Erp.Platform.Entities.Workorder", "WorkOrder") + b.HasOne("Erp.Platform.Entities.Workorder", "Workorder") .WithMany("Materials") - .HasForeignKey("WorkOrderId") - .OnDelete(DeleteBehavior.Cascade) + .HasForeignKey("WorkorderId") + .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Material"); - b.Navigation("WorkOrder"); + b.Navigation("Workorder"); }); modelBuilder.Entity("Erp.Platform.Entities.Zone", b => diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index 88a6255a..d2446bd0 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -2878,7 +2878,7 @@ "Employees": [ { "code": "EMP-001", - "fullName": "Ali Öztürk", + "name": "Ali Öztürk", "avatar": "https://i.pravatar.cc/150?img=12", "nationalId": "12345678901", "birthDate": "2020-10-29", @@ -2918,7 +2918,7 @@ }, { "code": "EMP-002", - "fullName": "Ayşe Kaya", + "name": "Ayşe Kaya", "avatar": "https://i.pravatar.cc/150?img=5", "nationalId": "12345678902", "birthDate": "2015-10-30", @@ -2958,7 +2958,7 @@ }, { "code": "EMP-003", - "fullName": "Mehmet Yılmaz", + "name": "Mehmet Yılmaz", "avatar": "https://i.pravatar.cc/150?img=8", "nationalId": "12345678903", "birthDate": "2010-10-31", @@ -2998,7 +2998,7 @@ }, { "code": "EMP-004", - "fullName": "Selin Demir", + "name": "Selin Demir", "avatar": "https://i.pravatar.cc/150?img=9", "nationalId": "12345678904", "birthDate": "2000-11-01", @@ -3038,7 +3038,7 @@ }, { "code": "EMP-005", - "fullName": "Ahmet Çelik", + "name": "Ahmet Çelik", "avatar": "https://i.pravatar.cc/150?img=33", "nationalId": "12345678905", "birthDate": "1999-11-02", @@ -3078,7 +3078,7 @@ }, { "code": "EMP-006", - "fullName": "Zeynep Arslan", + "name": "Zeynep Arslan", "avatar": "https://i.pravatar.cc/150?img=10", "nationalId": "12345678906", "birthDate": "1995-11-03", @@ -3118,7 +3118,7 @@ }, { "code": "EMP-007", - "fullName": "Burak Koç", + "name": "Burak Koç", "avatar": "https://i.pravatar.cc/150?img=14", "nationalId": "12345678907", "birthDate": "1980-11-04", @@ -3158,7 +3158,7 @@ }, { "code": "EMP-008", - "fullName": "Elif Şahin", + "name": "Elif Şahin", "avatar": "https://i.pravatar.cc/150?img=20", "nationalId": "12345678908", "birthDate": "1989-11-05", @@ -3198,7 +3198,7 @@ }, { "code": "EMP-009", - "fullName": "Canan Öztürk", + "name": "Canan Öztürk", "avatar": "https://i.pravatar.cc/150?img=25", "nationalId": "12345678909", "birthDate": "1992-11-06", @@ -3238,7 +3238,7 @@ }, { "code": "EMP-010", - "fullName": "Murat Aydın", + "name": "Murat Aydın", "avatar": "https://i.pravatar.cc/150?img=30", "nationalId": "12345678910", "birthDate": "1984-11-07", @@ -3802,7 +3802,7 @@ ], "Visitors": [ { - "fullName": "Ali Veli", + "name": "Ali Veli", "companyName": "ABC Teknoloji", "email": "ali.veli@abc.com", "phoneNumber": "5321112233", @@ -3814,7 +3814,7 @@ "photo": "https://i.pravatar.cc/150?img=12" }, { - "fullName": "Fatma Yıldız", + "name": "Fatma Yıldız", "companyName": "XYZ Danışmanlık", "email": "fatma@xyz.com", "phoneNumber": "5332223344", @@ -3825,7 +3825,7 @@ "photo": "https://i.pravatar.cc/150?img=13" }, { - "fullName": "Mehmet Kara", + "name": "Mehmet Kara", "companyName": "DEF Yazılım", "email": "mehmet@def.com", "phoneNumber": "5343334455", diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index b8dfa38a..4fbaa655 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -1126,7 +1126,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency await _employeeRepository.InsertAsync(new Employee { Code = item.Code, - FullName = item.FullName, + Name = item.Name, Avatar = item.Avatar, NationalId = item.NationalId, BirthDate = item.BirthDate, @@ -1423,14 +1423,14 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency foreach (var item in items.Visitors) { - var exists = await _visitorRepository.AnyAsync(x => x.FullName == item.FullName); + var exists = await _visitorRepository.AnyAsync(x => x.Name == item.Name); if (exists) continue; var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.EmployeeCode); await _visitorRepository.InsertAsync(new Visitor { - FullName = item.FullName, + Name = item.Name, CompanyName = item.CompanyName, Email = item.Email, PhoneNumber = item.PhoneNumber, diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs index 8d38114a..a16990c3 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs @@ -819,7 +819,7 @@ public class ExpenseRequestSeedDto public class VisitorSeedDto { - public string FullName { get; set; } + public string Name { get; set; } public string CompanyName { get; set; } public string Email { get; set; } public string PhoneNumber { get; set; } @@ -950,7 +950,7 @@ public class LeaveSeedDto public class EmployeeSeedDto { public string Code { get; set; } - public string FullName { get; set; } + public string Name { get; set; } public string Avatar { get; set; } public string NationalId { get; set; } public DateTime BirthDate { get; set; } diff --git a/ui/src/components/common/MultiSelectEmployee.tsx b/ui/src/components/common/MultiSelectEmployee.tsx index 4ffacd30..0b190e9a 100644 --- a/ui/src/components/common/MultiSelectEmployee.tsx +++ b/ui/src/components/common/MultiSelectEmployee.tsx @@ -41,7 +41,7 @@ const MultiSelectEmployee: React.FC = ({ const filteredEmployees = mockEmployees.filter( (employee: EmployeeDto) => - employee.fullName.toLowerCase().includes(searchTerm.toLowerCase()) || + employee.name.toLowerCase().includes(searchTerm.toLowerCase()) || employee.code.toLowerCase().includes(searchTerm.toLowerCase()) ); @@ -84,7 +84,7 @@ const MultiSelectEmployee: React.FC = ({ key={employee.id} className="inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-blue-100 text-blue-800" > - {employee.fullName} + {employee.name} {!disabled && (