diff --git a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs index 60b4ddd8..6800bd3a 100644 --- a/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs +++ b/api/src/Erp.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs @@ -349,6 +349,9 @@ public class GridOptionsDto : AuditedEntityDto /// Bu listform show note gösterilsin mi? public bool ShowNote { get; set; } = true; + /// Subformları hangi layout gösterilecek + public string SubFormsListFormType { get; set; } = ListFormTypeEnum.Form; + [JsonIgnore] public string SubFormsJson { get; set; } // Cagrilacak ListFormlar public SubFormDto[] SubFormsDto diff --git a/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs b/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs index 39c019ba..5d7e8046 100644 --- a/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs +++ b/api/src/Erp.Platform.Application/ListForms/Administration/ListFormsAppService.cs @@ -58,15 +58,16 @@ public class ListFormsAppService : CrudAppService< if (input.EditType == ListFormEditTabs.DetailsForm) { item.CultureName = input.CultureName; + item.ListFormType = input.ListFormType; item.Title = input.Title; item.Name = input.Name; + item.Description = input.Description; + item.IsSubForm = input.IsSubForm; + item.SubFormsListFormType = input.SubFormsListFormType; + item.ShowNote = input.ShowNote; item.Width = input.Width; item.Height = input.Height; item.FullHeight = input.FullHeight; - item.Description = input.Description; - item.IsSubForm = input.IsSubForm; - item.ShowNote = input.ShowNote; - item.ListFormType = input.ListFormType; item.LayoutJson = JsonSerializer.Serialize(input.LayoutDto); //Chart ile ilgili sütunlar diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json index b4108c47..d0a16c5e 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Erp.Platform.DbMigrator/Seeds/LanguagesData.json @@ -3546,6 +3546,12 @@ "en": "Form Type", "tr": "Form Tipi" }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.SubFormsListFormType", + "en": "Sub Forms List Form Type", + "tr": "Alt Formlar Liste Form Tipi" + }, { "resourceName": "Platform", "key": "ListForms.ListFormEdit.DetailsDescription", diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs index 7ccfcc91..525ac652 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs @@ -84,7 +84,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bank)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = @@ -102,19 +102,25 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = AppCodes.Accounting.BankAccount, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true - }, - }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value } - }) + }), + SubFormsJson = JsonSerializer.Serialize( + new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Accounting.BankAccount, + Code = AppCodes.Accounting.BankAccount, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "BankId" + }, + } + }, + } + ) } , autoSave: true); @@ -488,32 +494,27 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "BankId", + CaptionName = "App.Listform.ListformField.BankId", + Width = 0, + ListOrderNo = 6, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Bank ve Bank Account arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Accounting.Bank, - JsonSerializer.Serialize( - new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Accounting.BankAccount, - Code = AppCodes.Accounting.BankAccount, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "BankId" - }, - } - }, - } - ) - ); - #region Cash listFormName = AppCodes.Accounting.Cash; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -2316,7 +2317,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ @@ -2347,15 +2348,23 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende IsVisible = true, VisibleExpression = "(e) => e.row.data.RemainingAmount == 0" }, - new() { - Hint = "Items", - Text ="Items", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true - }, }), + SubFormsJson = JsonSerializer.Serialize( + new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Accounting.InvoiceItem, + Code = AppCodes.Accounting.InvoiceItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "InvoiceId" + }, + } + }, + } + ) }, autoSave: true ); @@ -2941,32 +2950,27 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "InvoiceId", + CaptionName = "App.Listform.ListformField.InvoiceId", + Width = 0, + ListOrderNo = 13, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Invoice ve Invoice Item arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Accounting.Invoice, - JsonSerializer.Serialize( - new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Accounting.InvoiceItem, - Code = AppCodes.Accounting.InvoiceItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "InvoiceId" - }, - } - }, - } - ) - ); - #region Waybill listFormName = AppCodes.Accounting.Waybill; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -3006,7 +3010,7 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ @@ -3036,15 +3040,23 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende IsVisible = true, VisibleExpression = "(e) => e.row.data.IsInvoiced" }, - new() { - Hint = "Items", - Text ="Items", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true - }, }), + SubFormsJson = JsonSerializer.Serialize( + new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Accounting.WaybillItem, + Code = AppCodes.Accounting.WaybillItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "WaybillId" + }, + } + }, + } + ) }, autoSave: true ); @@ -3579,31 +3591,26 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "WaybillId", + CaptionName = "App.Listform.ListformField.WaybillId", + Width = 0, + ListOrderNo = 13, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - - // Waybill ve Waybill Item arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Accounting.Waybill, - JsonSerializer.Serialize( - new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Accounting.WaybillItem, - Code = AppCodes.Accounting.WaybillItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "WaybillId" - }, - } - }, - } - ) - ); } } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 9b1e3878..ac7bf247 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -4381,7 +4381,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(DbType.String), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(DbType.String), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List { new() { @@ -4391,16 +4391,32 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ] } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = AppCodes.Definitions.Skill, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Definitions.SkillLevel, + Code = AppCodes.Definitions.SkillLevel, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.String, + ChildFieldName = "SkillTypeId" + } + } }, - }), + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Definitions.Skill, + Code = AppCodes.Definitions.Skill, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.String, + ChildFieldName = "SkillTypeId" + } + } + } + }) }, autoSave: true); #region SkillType Fields @@ -4569,6 +4585,22 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "SkillTypeId", + CaptionName = "App.Listform.ListformField.SkillTypeId", + Width = 0, + ListOrderNo = 5, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -4660,42 +4692,27 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "SkillTypeId", + CaptionName = "App.Listform.ListformField.SkillTypeId", + Width = 0, + ListOrderNo = 3, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Skill Type ile Skill Level ve Skill Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Definitions.SkillType, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Definitions.SkillLevel, - Code = AppCodes.Definitions.SkillLevel, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.String, - ChildFieldName = "SkillTypeId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Definitions.Skill, - Code = AppCodes.Definitions.Skill, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.String, - ChildFieldName = "SkillTypeId" - } - } - } - }) - ); - #region UomCategory listFormName = AppCodes.Definitions.UomCategory; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -4734,7 +4751,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.UomCategory)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, false, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 400, 200, true, true, true, false, false, true), EditingFormJson = JsonSerializer.Serialize(new List { new() { @@ -4745,16 +4762,20 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep } }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = AppCodes.Definitions.Uom, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Definitions.Uom, + Code = AppCodes.Definitions.Uom, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.String, + ChildFieldName = "UomCategoryId" + } + } }, - }), + }) }, autoSave: true); #region UomCategory Fields @@ -4980,30 +5001,27 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "UomCategoryId", + CaptionName = "App.Listform.ListformField.UomCategoryId", + Width = 0, + ListOrderNo = 7, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // UomCategory ve Uom arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Definitions.UomCategory, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Definitions.Uom, - Code = AppCodes.Definitions.Uom, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.String, - ChildFieldName = "UomCategoryId" - } - } - }, - }) - ); - #region Behavior listFormName = AppCodes.Definitions.Behavior; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs index a15b71ac..c88feaf2 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs @@ -2135,7 +2135,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1,ItemType="group", Items= [ @@ -2145,16 +2145,20 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Questions", - Text ="Questions", - UrlTarget="_blank", - AuthName = AppCodes.Definitions.Question, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabTitle = AppCodes.Definitions.Question, + TabType = ListFormTabTypeEnum.List, + Code = AppCodes.Definitions.Question, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "QuestionPoolId" + } + } + } + }) }, autoSave: true ); @@ -2525,29 +2529,26 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "QuestionPoolId", + CaptionName = "App.Listform.ListformField.QuestionPoolId", + Width = 0, + ListOrderNo = 12, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } - // QuestionPool ve Question arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Definitions.QuestionPool, - JsonSerializer.Serialize(new List() { - new { - TabTitle = AppCodes.Definitions.Question, - TabType = ListFormTabTypeEnum.List, - Code = AppCodes.Definitions.Question, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "QuestionPoolId" - } - } - } - }) - ); - #endregion } } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs index 22f12d86..0d230046 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs @@ -1113,7 +1113,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() @@ -1175,16 +1175,44 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.PartnerBank, + Code = AppCodes.SupplyChain.PartnerBank, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PartnerId" + } + } }, - }), + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.PartnerCertificate, + Code = AppCodes.SupplyChain.PartnerCertificate, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PartnerId" + } + } + }, + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.PartnerContact, + Code = AppCodes.SupplyChain.PartnerContact, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PartnerId" + } + } + } + }) }, autoSave: true); await _listFormFieldRepository.InsertManyAsync( @@ -2089,7 +2117,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Opportunity)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -2120,16 +2148,32 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { FieldName = "Stage", FieldDbType = DbType.String, Value = "Qualification", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Crm.OpportunityActivity, + Code = AppCodes.Crm.OpportunityActivity, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "OpportunityId" + } + } }, - }), + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Crm.OpportunityCompetitor, + Code = AppCodes.Crm.OpportunityCompetitor, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "OpportunityId" + } + } + }, + }) }, autoSave: true ); @@ -2751,6 +2795,22 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "OpportunityId", + CaptionName = "App.Listform.ListformField.OpportunityId", + Width = 0, + ListOrderNo = 14, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -2910,42 +2970,27 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "OpportunityId", + CaptionName = "App.Listform.ListformField.OpportunityId", + Width = 0, + ListOrderNo = 7, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Opportunity ile Activity ve Competitor arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Crm.Opportunity, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Crm.OpportunityActivity, - Code = AppCodes.Crm.OpportunityActivity, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "OpportunityId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Crm.OpportunityCompetitor, - Code = AppCodes.Crm.OpportunityCompetitor, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "OpportunityId" - } - } - }, - }) - ); - #region Activity listFormName = AppCodes.Crm.Activity; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -3303,7 +3348,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesOrder)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3334,16 +3379,20 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency new() { FieldName = "ExchangeRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "TaxRate", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Items", - Text ="Items", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Crm.SalesOrderItem, + Code = AppCodes.Crm.SalesOrderItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "SalesOrderId" + } + } + } + }) }, autoSave: true ); @@ -3928,28 +3977,25 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "SalesOrderId", + CaptionName = "App.Listform.ListformField.SalesOrderId", + Width = 0, + ListOrderNo = 14, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - - // Sales Order ve Sales Order Item arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Crm.SalesOrder, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Crm.SalesOrderItem, - Code = AppCodes.Crm.SalesOrderItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "SalesOrderId" - } - } - } - }) - ); } } diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs index 0b0c6f3d..0e69ae1d 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs @@ -4169,7 +4169,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4187,16 +4187,32 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency new() { FieldName = "IsAnonymous", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Taslak", CustomValueType = FieldCustomValueTypeEnum.Value } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible=true, + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Hr.SurveyQuestion, + Code = AppCodes.Hr.SurveyQuestion, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "SurveyId" + } + } + }, + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Hr.SurveyResponse, + Code = AppCodes.Hr.SurveyResponse, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "SurveyId" + } + } } - }), + }) }, autoSave: true ); @@ -4356,7 +4372,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4373,16 +4389,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency { new() { FieldName = "IsRequired", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Options", - Text ="Options", - UrlTarget="_blank", - AuthName = AppCodes.Hr.SurveyQuestionOption, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible=true, - }, - }), }, autoSave: true ); @@ -4484,6 +4490,22 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "SurveyId", + CaptionName = "App.Listform.ListformField.SurveyId", + Width = 0, + ListOrderNo = 14, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -4527,7 +4549,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4538,16 +4560,6 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 3, DataField = "CreationTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox } ]} }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Answers", - Text ="Answers", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible=true - }, - }), }, autoSave: true ); @@ -4621,41 +4633,26 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "SurveyId", + CaptionName = "App.Listform.ListformField.SurveyId", + Width = 0, + ListOrderNo = 5, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } - // Survey ile Survey Question ve Survey Response Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Hr.Survey, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Hr.SurveyQuestion, - Code = AppCodes.Hr.SurveyQuestion, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "SurveyId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Hr.SurveyResponse, - Code = AppCodes.Hr.SurveyResponse, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "SurveyId" - } - } - } - }) - ); #endregion } } - diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs index 08104e9f..9e1b99c6 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs @@ -1774,7 +1774,7 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPost)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 600, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 700, 600, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -1787,16 +1787,6 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc new EditingFormItemDto { Order = 5, DataField = "IsOwnPost", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox } ]} }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Comments", - Text ="Comments", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, - }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "LikeCount", FieldDbType = DbType.Int32, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs index 4418d17c..0d3105fb 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs @@ -715,7 +715,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 550, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 550, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= @@ -748,14 +748,6 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend new() { FieldName = "EstimatedDuration", FieldDbType = DbType.Int32, Value = "60", CustomValueType = FieldCustomValueTypeEnum.Value }, }), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, new() { Hint = "Work Order", Text ="Work Order", @@ -765,6 +757,32 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend IsVisible = true, }, }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Maintenance.PlanWizardMaterial, + Code = AppCodes.Maintenance.PlanWizardMaterial, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PlanWizardId" + } + } + }, + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Maintenance.PlanWizardEmployee, + Code = AppCodes.Maintenance.PlanWizardEmployee, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PlanWizardId" + } + } + } + }) }, autoSave: true ); @@ -1148,6 +1166,22 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend PivotSettingsJson = DefaultPivotSettingsJson, EditorOptions=EditorOptionValues.NumberStandartFormat() }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "PlanWizardId", + CaptionName = "App.Listform.ListformField.PlanWizardId", + Width = 0, + ListOrderNo = 4, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -1291,42 +1325,27 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "PlanWizardId", + CaptionName = "App.Listform.ListformField.PlanWizardId", + Width = 0, + ListOrderNo = 6, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Maintenance Plan ile Maintenance Plan Material ve Maintenance Plan Employee arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Maintenance.PlanWizard, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Maintenance.PlanWizardMaterial, - Code = AppCodes.Maintenance.PlanWizardMaterial, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PlanWizardId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Maintenance.PlanWizardEmployee, - Code = AppCodes.Maintenance.PlanWizardEmployee, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PlanWizardId" - } - } - } - }) - ); - #region Fault listFormName = AppCodes.Maintenance.Fault; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -2176,7 +2195,7 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ @@ -2215,15 +2234,33 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend IsVisible = true, VisibleExpression = "(e) => e.row.data.WorkorderNumber == null" }, - new() { - Hint = "Detail", - Text ="Detail", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, }), + SubFormsJson = 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" + } + } + } + }) } ); @@ -2669,7 +2706,23 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson, EditorOptions=EditorOptionValues.NumberStandartFormat() - } + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "WorkorderId", + CaptionName = "App.Listform.ListformField.WorkorderId", + Width = 0, + ListOrderNo = 6, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -2798,43 +2851,28 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson - } + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "WorkorderId", + CaptionName = "App.Listform.ListformField.WorkorderId", + Width = 0, + ListOrderNo = 5, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + 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)) diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs index 02f393c7..06f10ed6 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs @@ -865,7 +865,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 350, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ @@ -885,16 +885,32 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { FieldName = "BaseQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = AppCodes.Mrp.Bom, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Mrp.BomComponent, + Code = AppCodes.Mrp.BomComponent, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "BomId" + } + } }, - }), + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Mrp.BomOperation, + Code = AppCodes.Mrp.BomOperation, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "BomId" + } + } + } + }) }, autoSave: true ); @@ -1307,7 +1323,23 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson - } + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "BomId", + CaptionName = "App.Listform.ListformField.BomId", + Width = 0, + ListOrderNo = 12, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -1562,42 +1594,27 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "BomId", + CaptionName = "App.Listform.ListformField.BomId", + Width = 0, + ListOrderNo = 12, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Bom ile Bom Component ve Bom Operation Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Mrp.Bom, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Mrp.BomComponent, - Code = AppCodes.Mrp.BomComponent, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "BomId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Mrp.BomOperation, - Code = AppCodes.Mrp.BomOperation, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "BomId" - } - } - } - }) - ); - #region Order Type listFormName = AppCodes.Mrp.ProductionOrderType; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -1893,7 +1910,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ @@ -1931,14 +1948,6 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, }), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Items", - Text ="Items", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true - }, new() { Hint = "Work Orders", Text ="Work Orders", @@ -1949,6 +1958,20 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency VisibleExpression = "(e) => e.row.data.ConfirmedQuantity == 0" }, }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Mrp.ProductionOrderItem, + Code = AppCodes.Mrp.ProductionOrderItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "ProductionOrderId" + } + } + } + }) }, autoSave: true ); @@ -2492,31 +2515,28 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson, EditorOptions=EditorOptionValues.NumberStandartFormat() - } + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "ProductionOrderId", + CaptionName = "App.Listform.ListformField.ProductionOrderId", + Width = 0, + ListOrderNo = 9, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Production Order ve Production Order Item Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Mrp.ProductionOrder, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Mrp.ProductionOrderItem, - Code = AppCodes.Mrp.ProductionOrderItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "ProductionOrderId" - } - } - } - }) - ); - // Clone Maintenance Forms to MRP Forms await utils.CloneListFormWithFieldsAsync(AppCodes.Maintenance.WorkorderStatus, AppCodes.Mrp.WorkorderStatus); diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs index 96d676b3..fe891dd0 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs @@ -858,7 +858,7 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Projects)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 900, 550, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -901,16 +901,32 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency new() { FieldName = "ActualCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text = "Manage", - UrlTarget = "_blank", - AuthName = listFormName, - Url = $"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Project.ProjectRisk, + Code = AppCodes.Project.ProjectRisk, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "ProjectId" + } + } }, - }), + new { + TabType = ListFormTabTypeEnum.Tree, + TabTitle = AppCodes.Project.ProjectTeam, + Code = AppCodes.Project.ProjectTeam, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "ProjectId" + } + } + } + }) } ); @@ -1334,6 +1350,22 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "ProjectId", + CaptionName = "App.Listform.ListformField.ProjectId", + Width = 0, + ListOrderNo = 3, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -1443,42 +1475,27 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "ProjectId", + CaptionName = "App.Listform.ListformField.ProjectId", + Width = 0, + ListOrderNo = 4, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Project ile Risk ve Team Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Project.Projects, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Project.ProjectRisk, - Code = AppCodes.Project.ProjectRisk, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "ProjectId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.Tree, - TabTitle = AppCodes.Project.ProjectTeam, - Code = AppCodes.Project.ProjectTeam, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "ProjectId" - } - } - } - }) - ); - #region Project Phase listFormName = AppCodes.Project.ProjectPhase; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index fac29a9f..05bf3d7c 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -84,7 +84,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson(), PermissionJson = DefaultPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, TenantManagementPermissions.Tenants.Delete, TenantManagementPermissions.Tenants.Default + ".Export", TenantManagementPermissions.Tenants.Default + ".Import", TenantManagementPermissions.Tenants.Default + ".Note"), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 650, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 650, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = @@ -124,13 +124,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DialogParameters = JsonSerializer.Serialize(new { name = "@Name", id = "@Id" }), IsVisible = true, }, - new() { - Hint = "Branches", - Text = "Branches", - AuthName = AppCodes.Branches, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, }), InsertServiceAddress = "list-form-dynamic-api/tenant-insert", UpdateServiceAddress = "list-form-dynamic-api/tenant-update", @@ -141,8 +134,21 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value } - }) - + }), + SubFormsJson =JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Branches, + Code = AppCodes.Branches, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "TenantId" + } + } + }} + ) }, autoSave: true ); @@ -1006,25 +1012,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency } #endregion - // Tenant ve Branches arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - TenantManagementPermissions.Tenants.Default, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Branches, - Code = AppCodes.Branches, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "TenantId" - } - } - }} - ) - ); - #region SettingDefinition listFormName = AppCodes.Settings.SettingDefinitions; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -1760,7 +1747,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ @@ -1773,16 +1760,20 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsEnabled", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = AppCodes.Languages.LanguageText, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Languages.LanguageText, + Code = AppCodes.Languages.LanguageText, + Relation = new List() { + new { + ParentFieldName = "CultureName", + DbType = DbType.String, + ChildFieldName = "CultureName" + } + } + } + }) }, autoSave: true ); @@ -2055,25 +2046,6 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency } #endregion - // Language ve LanguageText Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Languages.Language, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Languages.LanguageText, - Code = AppCodes.Languages.LanguageText, - Relation = new List() { - new { - ParentFieldName = "CultureName", - DbType = DbType.String, - ChildFieldName = "CultureName" - } - } - } - }) - ); - #region Route listFormName = AppCodes.Routes; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs index aabd70f1..c6f15207 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_Store.cs @@ -1325,7 +1325,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 400, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, Caption="General", ItemType="group", Items= [ @@ -1349,16 +1349,20 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { FieldName = "Strategy", FieldDbType = DbType.String, Value = "FIFO", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Conditions", - Text = "Conditions", - UrlTarget = "_blank", - AuthName = listFormName, - Url = $"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Store.PutawayCondition, + Code = AppCodes.Store.PutawayCondition, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "RuleId" + } + } + } + }) }, autoSave: true ); @@ -1736,31 +1740,28 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson - } + }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "RuleId", + CaptionName = "App.Listform.ListformField.RuleId", + Width = 0, + ListOrderNo = 5, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Putaway ve Putaway Condition Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Store.Putaway, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Store.PutawayCondition, - Code = AppCodes.Store.PutawayCondition, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "RuleId" - } - } - } - }) - ); - #region Inventory listFormName = AppCodes.Store.Inventory; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -2698,7 +2699,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Giriş' WHERE \"Id\" = @Id;", - EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ @@ -2714,16 +2715,20 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { FieldName = "MovementNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "MovementDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Items", - Text ="Items", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Store.EntryItem, + Code = AppCodes.Store.EntryItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "MovementId" + } + } + } + }) }, autoSave: true ); @@ -3124,30 +3129,27 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "MovementId", + CaptionName = "App.Listform.ListformField.MovementId", + Width = 0, + ListOrderNo = 10, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Movement Entry ve Movement Entry Items Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Store.Entry, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Store.EntryItem, - Code = AppCodes.Store.EntryItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "MovementId" - } - } - } - }) - ); - #region Stock Exit listFormName = AppCodes.Store.Exit; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -3188,7 +3190,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Çıkış' WHERE \"Id\" = @Id;", - EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [ @@ -3204,16 +3206,20 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen new() { FieldName = "MovementNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "MovementDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Items", - Text ="Items", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.Store.ExitItem, + Code = AppCodes.Store.ExitItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "MovementId" + } + } + } + }) }, autoSave: true ); @@ -3625,30 +3631,27 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "MovementId", + CaptionName = "App.Listform.ListformField.MovementId", + Width = 0, + ListOrderNo = 10, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Movement Entry ve Movement Entry Items Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Store.Exit, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.Store.ExitItem, - Code = AppCodes.Store.ExitItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "MovementId" - } - } - } - }) - ); - #region Stock Transfer listFormName = AppCodes.Store.Transfer; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) diff --git a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs index b12c448b..4d41ffe1 100644 --- a/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs +++ b/api/src/Erp.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs @@ -1089,7 +1089,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Partner)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 1000, 600, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() @@ -1151,16 +1151,44 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { FieldName = "Country", FieldDbType = DbType.String, Value = "Türkiye", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible=true, + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.PartnerBank, + Code = AppCodes.SupplyChain.PartnerBank, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PartnerId" + } + } }, - }), + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.PartnerCertificate, + Code = AppCodes.SupplyChain.PartnerCertificate, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PartnerId" + } + } + }, + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.PartnerContact, + Code = AppCodes.SupplyChain.PartnerContact, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PartnerId" + } + } + } + }) }, autoSave: true ); @@ -2057,6 +2085,22 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "PartnerId", + CaptionName = "App.Listform.ListformField.PartnerId", + Width = 0, + ListOrderNo = 15, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -2202,6 +2246,22 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(AppCodes.SupplyChain.PartnerCertificate), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "PartnerId", + CaptionName = "App.Listform.ListformField.PartnerId", + Width = 0, + ListOrderNo = 6, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } @@ -2421,97 +2481,27 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "PartnerId", + CaptionName = "App.Listform.ListformField.PartnerId", + Width = 0, + ListOrderNo = 8, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Supply ile Bank, Certificate ve Contact Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.SupplyChain.Supply, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.PartnerBank, - Code = AppCodes.SupplyChain.PartnerBank, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PartnerId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.PartnerCertificate, - Code = AppCodes.SupplyChain.PartnerCertificate, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PartnerId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.PartnerContact, - Code = AppCodes.SupplyChain.PartnerContact, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PartnerId" - } - } - } - }) - ); - - // Customer ile Bank, Certificate ve Contact Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.Crm.Customer, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.PartnerBank, - Code = AppCodes.SupplyChain.PartnerBank, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PartnerId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.PartnerCertificate, - Code = AppCodes.SupplyChain.PartnerCertificate, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PartnerId" - } - } - }, - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.PartnerContact, - Code = AppCodes.SupplyChain.PartnerContact, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PartnerId" - } - } - } - }) - ); - #region Approval listFormName = AppCodes.SupplyChain.Approval; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -2551,7 +2541,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 300, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ @@ -2565,16 +2555,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value } }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible=true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.ApprovalStep, + Code = AppCodes.SupplyChain.ApprovalStep, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "ApprovalId" + } + } + } + }) }, autoSave: true ); @@ -2850,30 +2844,27 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "ApprovalId", + CaptionName = "App.Listform.ListformField.ApprovalId", + Width = 0, + ListOrderNo = 8, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Approval ve Approval Step arasında Sub Forms ilişkisinin kurulması - await utils.CloneFormLayoutAsync( - AppCodes.SupplyChain.Approval, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.ApprovalStep, - Code = AppCodes.SupplyChain.ApprovalStep, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "ApprovalId" - } - } - } - }) - ); - #region Request Type listFormName = AppCodes.SupplyChain.RequestType; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -3042,7 +3033,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Request)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 300, true, true, true, true, false, true), EditingFormJson = JsonSerializer.Serialize(new List() { new() @@ -3069,16 +3060,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Draft", CustomValueType = FieldCustomValueTypeEnum.Value }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible=true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.RequestItem, + Code = AppCodes.SupplyChain.RequestItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "RequestId" + } + } + } + }) }, autoSave: true ); @@ -3486,30 +3481,27 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "RequestId", + CaptionName = "App.Listform.ListformField.RequestId", + Width = 0, + ListOrderNo = 9, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Purchase Request ve Purchase Request Item arasında SubForm ilişki kurulması - await utils.CloneFormLayoutAsync( - AppCodes.SupplyChain.Request, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.RequestItem, - Code = AppCodes.SupplyChain.RequestItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "RequestId" - } - } - } - }) - ); - #region Quotation Status listFormName = AppCodes.SupplyChain.QuotationStatus; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -3809,7 +3801,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Quotation)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 700, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 700, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -3853,14 +3845,6 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { FieldName = "EvaluationScore", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }, }), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible = true - }, new() { ButtonPosition = UiCommandButtonPositionTypeEnum.Toolbar, Hint = "Toplu Teklif", @@ -3878,6 +3862,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend IsVisible = true }, }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.QuotationItem, + Code = AppCodes.SupplyChain.QuotationItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "QuotationId" + } + } + } + }) }, autoSave: true ); @@ -4482,30 +4480,27 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "QuotationId", + CaptionName = "App.Listform.ListformField.QuotationId", + Width = 0, + ListOrderNo = 9, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - // Quatation ve Quatation Item arasında SubForm ilişki kurulması - await utils.CloneFormLayoutAsync( - AppCodes.SupplyChain.Quotation, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.QuotationItem, - Code = AppCodes.SupplyChain.QuotationItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "QuotationId" - } - } - } - }) - ); - #region Order Status listFormName = AppCodes.SupplyChain.OrderStatus; if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName)) @@ -4672,7 +4667,7 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.PurchaseOrder)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson(), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false), + EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 500, true, true, true, true, false, true), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson(), EditingFormJson = JsonSerializer.Serialize(new List() { @@ -4698,16 +4693,20 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend new() { FieldName = "ExchangeRate", FieldDbType = DbType.Decimal, Value = "1", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Taslak", CustomValueType = FieldCustomValueTypeEnum.Value }, }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage", - Text ="Manage", - UrlTarget="_blank", - AuthName = listFormName, - Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id", - IsVisible=true, - }, - }), + SubFormsJson = JsonSerializer.Serialize(new List() { + new { + TabType = ListFormTabTypeEnum.List, + TabTitle = AppCodes.SupplyChain.PurchaseOrderItem, + Code = AppCodes.SupplyChain.PurchaseOrderItem, + Relation = new List() { + new { + ParentFieldName = "Id", + DbType = DbType.Guid, + ChildFieldName = "PurchaseOrderId" + } + } + } + }) }, autoSave: true ); @@ -5190,28 +5189,25 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend PermissionJson = DefaultFieldPermissionJson(listForm.Name), PivotSettingsJson = DefaultPivotSettingsJson }, + new() { + ListFormCode = listForm.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "PurchaseOrderId", + CaptionName = "App.Listform.ListformField.PurchaseOrderId", + Width = 0, + ListOrderNo = 7, + Visible = false, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(listForm.Name), + PivotSettingsJson = DefaultPivotSettingsJson + }, ], autoSave: true); #endregion } #endregion - - // Purchase Order ve Purchase Order Item arasında SubForm ilişki kurulması - await utils.CloneFormLayoutAsync( - AppCodes.SupplyChain.PurchaseOrder, - JsonSerializer.Serialize(new List() { - new { - TabType = ListFormTabTypeEnum.List, - TabTitle = AppCodes.SupplyChain.PurchaseOrderItem, - Code = AppCodes.SupplyChain.PurchaseOrderItem, - Relation = new List() { - new { - ParentFieldName = "Id", - DbType = DbType.Guid, - ChildFieldName = "PurchaseOrderId" - } - } - } - }) - ); } } diff --git a/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs b/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs index 62d41e91..2c2fc2af 100644 --- a/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs +++ b/api/src/Erp.Platform.Domain/Entities/Host/ListForm.cs @@ -125,6 +125,9 @@ public class ListForm : FullAuditedEntity /// Bu listform sub olarak mı kullanılacak public bool IsSubForm { get; set; } + /// Subformları hangi layout gösterilecek + public string SubFormsListFormType { get; set; } = ListFormTypeEnum.Form; + /// Bu listform show note gösterilsin mi? public bool ShowNote { get; set; } = true; diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260117151816_Initial.Designer.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260202065947_Initial.Designer.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260117151816_Initial.Designer.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260202065947_Initial.Designer.cs index 7665a082..99d48107 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260117151816_Initial.Designer.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260202065947_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Erp.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20260117151816_Initial")] + [Migration("20260202065947_Initial")] partial class Initial { /// @@ -7038,6 +7038,9 @@ namespace Erp.Platform.Migrations b.Property("SubFormsJson") .HasColumnType("text"); + b.Property("SubFormsListFormType") + .HasColumnType("nvarchar(max)"); + b.Property("TableName") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260117151816_Initial.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260202065947_Initial.cs similarity index 99% rename from api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260117151816_Initial.cs rename to api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260202065947_Initial.cs index 8aad315d..63521e0c 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260117151816_Initial.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/20260202065947_Initial.cs @@ -2501,6 +2501,7 @@ namespace Erp.Platform.Migrations IsOrganizationUnit = table.Column(type: "bit", nullable: false), ListFormType = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: true), IsSubForm = table.Column(type: "bit", nullable: false), + SubFormsListFormType = table.Column(type: "nvarchar(max)", nullable: true), ShowNote = table.Column(type: "bit", nullable: false), SubFormsJson = table.Column(type: "text", nullable: true), WidgetsJson = table.Column(type: "text", nullable: true), diff --git a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index 2ee970d7..9fb09f92 100644 --- a/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Erp.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -7035,6 +7035,9 @@ namespace Erp.Platform.Migrations b.Property("SubFormsJson") .HasColumnType("text"); + b.Property("SubFormsListFormType") + .HasColumnType("nvarchar(max)"); + b.Property("TableName") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); diff --git a/ui/src/proxy/form/models.ts b/ui/src/proxy/form/models.ts index cffc5ff7..e9937623 100644 --- a/ui/src/proxy/form/models.ts +++ b/ui/src/proxy/form/models.ts @@ -569,6 +569,7 @@ export interface GridOptionsDto extends AuditedEntityDto { listFormType: string isSubForm: boolean showNote: boolean + subFormsListFormType: string subFormsJson?: string subFormsDto: SubFormDto[] extraFilterJson?: string diff --git a/ui/src/views/admin/listForm/edit/FormTabDetails.tsx b/ui/src/views/admin/listForm/edit/FormTabDetails.tsx index d6ce2047..39df60c4 100644 --- a/ui/src/views/admin/listForm/edit/FormTabDetails.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabDetails.tsx @@ -18,9 +18,13 @@ const schema = Yup.object().shape({ title: Yup.string().required('Title Required'), name: Yup.string(), description: Yup.string(), - pageSize: Yup.number(), isSubForm: Yup.boolean(), + subFormsListFormType: Yup.string(), showNote: Yup.boolean(), + width: Yup.number(), + height: Yup.number(), + fullHeight: Yup.boolean(), + defaultLayout: Yup.string(), layoutDto: Yup.object().shape({ grid: Yup.boolean(), pivot: Yup.boolean(), @@ -174,6 +178,35 @@ function FormTabDetails( /> + + + {({ field, form }: FieldProps) => ( +