From c768eb2e1c2329d4ad7d0c179f90f882f035a8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Sat, 8 Nov 2025 16:50:20 +0300 Subject: [PATCH] =?UTF-8?q?ListeForm=20Seeder=20ColSpan=20ve=20ColCount=20?= =?UTF-8?q?d=C3=BCzenlemesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/ListFormSeeder_Accounting.cs | 67 +- .../Seeds/ListFormSeeder_Administration.cs | 747 ++++++------------ .../Seeds/ListFormSeeder_Coordinator.cs | 228 ++---- .../Seeds/ListFormSeeder_Crm.cs | 19 +- .../Seeds/ListFormSeeder_Hr.cs | 447 ++++------- .../Seeds/ListFormSeeder_Intranet.cs | 198 ++--- .../Seeds/ListFormSeeder_Maintenance.cs | 19 +- .../Seeds/ListFormSeeder_Mrp.cs | 19 +- .../Seeds/ListFormSeeder_Participant.cs | 92 +-- .../Seeds/ListFormSeeder_Project.cs | 19 +- .../Seeds/ListFormSeeder_Saas.cs | 567 +++++-------- .../Seeds/ListFormSeeder_SupplyChain.cs | 40 +- .../Seeds/ListFormSeeder_Warehouse.cs | 19 +- .../Seeds/SeederDefaults.cs | 30 +- ui/src/views/list/List.tsx | 2 + 15 files changed, 818 insertions(+), 1695 deletions(-) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs index 5effe302..d46b0de8 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Accounting.cs @@ -88,14 +88,11 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende PermissionJson = DefaultPermissionJson(AppCodes.Accounting.Bank), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bank)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - EditingOptionJson = DefaultEditingOptionJson, + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Accounting.Bank, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 2, - ColSpan = 2, - ItemType = "group", - Items = [ + Order = 1, ColCount = 2, ColSpan = 2, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField = "IdentifierCode", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox}, @@ -385,27 +382,22 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Bank)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Accounting.Bank, Width = 600, Height = 600 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Accounting.Bank, 600, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = + [ new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "IdentifierCode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox}, - new EditingFormItemDto { Order = 5, DataField = "Address1", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "Address2", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "Country", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 8, DataField = "City", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 9, DataField = "District", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 10, DataField = "PostalCode", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 11, DataField = "PhoneNumber", ColSpan = 2, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 12, DataField = "Email", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "IdentifierCode", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox}, + new EditingFormItemDto { Order = 5, DataField = "Address1", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "Address2", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 8, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 9, DataField = "District", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 10, DataField = "PostalCode", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 11, DataField = "PhoneNumber", ColSpan = 1, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 12, DataField = "Email", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -690,22 +682,17 @@ public class ListFormSeeder_Accounting : IDataSeedContributor, ITransientDepende DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Accounting.BankAccount, Width = 600, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Accounting.BankAccount, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "BankId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "AccountNumber", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "AccountOwner", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "CanTransferMoney", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - ]} + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "BankId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "AccountNumber", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "AccountOwner", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "CanTransferMoney", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "CanTransferMoney", FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index 6c653771..1177364d 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -100,15 +100,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultPermissionJson(AppCodes.Definitions.SkillType), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SkillType)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - EditingOptionJson = DefaultEditingOptionJson, + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.SkillType, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ - new() { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ + new() { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -195,12 +192,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultPermissionJson(AppCodes.Definitions.UomCategory), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.UomCategory)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - EditingOptionJson = DefaultEditingOptionJson, - EditingFormJson = JsonSerializer.Serialize(new List() + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.UomCategory, 400, 200, true, true, true, true, false), + EditingFormJson = JsonSerializer.Serialize(new List() { - new() { - Order = 1, ColCount = 1, ColSpan = 2, ItemType = "group", Items = [ - new() { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ + new() { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -277,21 +275,14 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, AbpIdentity.PermissionGroups.Delete, AbpIdentity.PermissionGroups.Export, AbpIdentity.PermissionGroups.Import, AbpIdentity.PermissionGroups.Activity), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AbpIdentity.PermissionGroups.Default, Width = 800, Height = 350 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AbpIdentity.PermissionGroups.Default, 800, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ - new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=2, DataField="DisplayName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=3, DataField="ExtraProperties", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=1, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=2, DataField="DisplayName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=3, DataField="ExtraProperties", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, ] } }), @@ -398,25 +389,20 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, AbpIdentity.Permissions.Delete, AbpIdentity.Permissions.Export, AbpIdentity.Permissions.Import, AbpIdentity.Permissions.Activity), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AbpIdentity.Permissions.Default, Width = 800, Height = 350 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AbpIdentity.Permissions.Default, 600, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order=1, DataField="GroupName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order=2, DataField="ParentName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order=3, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=4, DataField="DisplayName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order=5, DataField="IsEnabled", ColSpan=2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order=6, DataField="MultiTenancySide", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order=7, DataField="MenuGroup", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTagBox }, - ]} + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = + [ + new EditingFormItemDto { Order=1, DataField="GroupName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order=2, DataField="ParentName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order=3, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=4, DataField="DisplayName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order=5, DataField="IsEnabled", ColSpan=1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order=6, DataField="MultiTenancySide", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order=7, DataField="MenuGroup", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTagBox }, + ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "IsEnabled", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }, @@ -426,8 +412,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ); #region Permission Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] - { + await _listFormFieldRepository.InsertManyAsync( + [ new() { ListFormCode = listFormPermissions.ListFormCode, CultureName = LanguageCodes.En, @@ -587,7 +573,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), PivotSettingsJson = DefaultPivotSettingsJson } - }); + ]); #endregion } #endregion @@ -623,24 +609,17 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.IdentityManagement.ClaimTypes), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.IdentityManagement.ClaimTypes, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.IdentityManagement.ClaimTypes, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=2, DataField="ValueType", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order=3, DataField="Required", ColSpan=2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order=4, DataField="IsStatic", ColSpan=2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order=5, DataField="Regex", ColSpan=2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=6, DataField="RegexDescription", ColSpan=2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=7, DataField="Description", ColSpan=2, EditorType2=EditorTypes.dxTextArea }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order=1, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=2, DataField="ValueType", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxSelectBox, EditorOptions = EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order=3, DataField="Required", ColSpan=1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order=4, DataField="IsStatic", ColSpan=1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order=5, DataField="Regex", ColSpan=1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=6, DataField="RegexDescription", ColSpan=1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=7, DataField="Description", ColSpan=1, EditorType2=EditorTypes.dxTextArea }, ]} }), DeleteCommand = "DELETE FROM \"AbpClaimTypes\" WHERE \"Id\"=@Id", @@ -834,19 +813,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, PlatformConsts.IdentityPermissions.Roles.Delete, PlatformConsts.IdentityPermissions.Roles.Export, PlatformConsts.IdentityPermissions.Roles.Import, PlatformConsts.IdentityPermissions.Roles.Activity), - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = PlatformConsts.IdentityPermissions.Roles.Default, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(PlatformConsts.IdentityPermissions.Roles.Default, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "IsDefault", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 3, DataField = "IsPublic", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "IsDefault", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 3, DataField = "IsPublic", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), DeleteCommand = "DELETE FROM \"AbpRoles\" WHERE \"Id\"=@Id", @@ -974,22 +946,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep PermissionJson = DefaultPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, PlatformConsts.IdentityPermissions.Users.Delete, PlatformConsts.IdentityPermissions.Users.Export, PlatformConsts.IdentityPermissions.Users.Import, PlatformConsts.IdentityPermissions.Users.Activity), DeleteCommand = $"UPDATE \"AbpUsers\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = PlatformConsts.IdentityPermissions.Users.Default, Width = 500, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(PlatformConsts.IdentityPermissions.Users.Default, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new () { Order=1,ColCount=1,ColSpan=2,ItemType="group",Items=[ - new EditingFormItemDto { Order=1, DataField="Email", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=2, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=3, DataField="Surname", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=4, DataField="PhoneNumber", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=5, DataField="Password", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=6, DataField="IsActive", ColSpan=2, EditorType2=EditorTypes.dxCheckBox }, + new () { Order=1,ColCount=1,ColSpan=1,ItemType="group",Items=[ + new EditingFormItemDto { Order=1, DataField="Email", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=2, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=3, DataField="Surname", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=4, DataField="PhoneNumber", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=5, DataField="Password", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=6, DataField="IsActive", ColSpan=1, EditorType2=EditorTypes.dxCheckBox }, ]} }), InsertServiceAddress = "list-form-dynamic-api/user-insert", @@ -1187,20 +1152,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.IpRestriction)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.IdentityManagement.IpRestrictions, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.IdentityManagement.IpRestrictions, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "ResourceType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "ResourceId", ColSpan = 2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "IP", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - ]} + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= + [ + new EditingFormItemDto { Order = 1, DataField = "ResourceType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "ResourceId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "IP", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, } @@ -1515,24 +1475,17 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.CustomEndpoint)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.DeveloperKits.CustomEndpoints, Width = 800, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.DeveloperKits.CustomEndpoints, 800, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Url", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Method", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "DataSourceCode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "Sql", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, - new EditingFormItemDto { Order = 6, DataField = "ParametersJson", ColSpan = 2, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, - new EditingFormItemDto { Order = 7, DataField = "PermissionsJson", ColSpan = 2, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, - new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new() { Order=1,ColCount=1,ColSpan=1,ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Url", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Method", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "DataSourceCode", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "Sql", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, + new EditingFormItemDto { Order = 6, DataField = "ParametersJson", ColSpan = 1, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, + new EditingFormItemDto { Order = 7, DataField = "PermissionsJson", ColSpan = 1, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, + new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -1740,25 +1693,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Reports.Categories), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Reports.Categories, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Reports.Categories, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 3, DataField = "Icon", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 3, DataField = "Icon", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, ]} }), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ReportCategory)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", @@ -1866,26 +1809,15 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.About), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.About, Width = 800, Height = 720 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.About, 800, 720, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "StatsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, - new EditingFormItemDto { Order = 2, DataField = "DescriptionsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, - new EditingFormItemDto { Order = 3, DataField = "SectionsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 1, DataField = "StatsJson", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 2, DataField = "DescriptionsJson", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 3, DataField = "SectionsJson", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, ] } }), @@ -1995,28 +1927,16 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Services), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Services, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Services, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Icon", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "Type", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "Features", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "Icon", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "Type", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "Features", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, ] } }), @@ -2182,31 +2102,19 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Product)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Orders.Products, Width = 500, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Orders.Products, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Category", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 5, DataField = "MonthlyPrice", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 6, DataField = "YearlyPrice", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 7, DataField = "IsQuantityBased", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 8, DataField = "ImageUrl", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Category", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 5, DataField = "MonthlyPrice", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 6, DataField = "YearlyPrice", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 7, DataField = "IsQuantityBased", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 8, DataField = "ImageUrl", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, ] } }), @@ -2407,26 +2315,14 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Orders.PaymentMethods), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Orders.PaymentMethods, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Orders.PaymentMethods, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Commission", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 3, DataField = "Logo", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Commission", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 3, DataField = "Logo", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, ] } }), @@ -2541,26 +2437,14 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Orders.InstallmentOptions), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Orders.InstallmentOptions, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Orders.InstallmentOptions, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Installment", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Commission", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 1, DataField = "Installment", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Commission", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, ] } }), @@ -2677,14 +2561,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Order)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Orders.PurchaseOrders, Width = 1000, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Orders.PurchaseOrders, 1000, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = @@ -3134,29 +3011,17 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BlogCategory)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.BlogManagement.BlogCategory, Width = 600, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.BlogManagement.BlogCategory, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Slug", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "Icon", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "DisplayOrder", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox } + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "Slug", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "Icon", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "DisplayOrder", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox } ] } }), @@ -3329,35 +3194,23 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.BlogPost)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.BlogManagement.BlogPosts, Width = 1000, Height = 700 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.BlogManagement.BlogPosts, 1000, 700, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { Order = 1, ColCount = 2, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Slug", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Summary", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "CoverImage", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "ReadTime", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "CategoryId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 7, DataField = "EmployeeId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 8, DataField = "ViewCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 9, DataField = "LikeCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 10, DataField = "CommentCount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 11, DataField = "IsPublished", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 12, DataField = "PublishedAt", ColSpan = 2, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "Slug", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Summary", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "CoverImage", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "ReadTime", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "CategoryId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 7, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 8, DataField = "ViewCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 9, DataField = "LikeCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 10, DataField = "CommentCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 11, DataField = "IsPublished", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 12, DataField = "PublishedAt", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 13, DataField = "ContentTr", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions=EditorOptionValues.HtmlEditorOptions }, new EditingFormItemDto { Order = 14, DataField = "ContentEn", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions=EditorOptionValues.HtmlEditorOptions } ] @@ -3673,31 +3526,20 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Demos), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Demos, Width = 500, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Demos, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "OrganizationName", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 5, DataField = "Address", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 6, DataField = "NumberOfBranches", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 7, DataField = "NumberOfUsers", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 8, DataField = "Message", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 1, DataField = "OrganizationName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 5, DataField = "Address", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 6, DataField = "NumberOfBranches", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 7, DataField = "NumberOfUsers", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 8, DataField = "Message", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, ] } }), @@ -3894,36 +3736,25 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Contact), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Contact, Width = 800, Height = 600 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Contact, 800, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Address", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "PhoneNumber", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "Location", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "TaxNumber", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "BankJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, - new EditingFormItemDto { Order = 7, DataField = "WorkHoursJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, - new EditingFormItemDto { Order = 8, DataField = "MapJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, + new EditingFormItemDto { Order = 1, DataField = "Address", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "PhoneNumber", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "Location", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "TaxNumber", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "BankJson", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, + new EditingFormItemDto { Order = 7, DataField = "WorkHoursJson", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, + new EditingFormItemDto { Order = 8, DataField = "MapJson", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, ] } }), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Contact)), - DeleteFieldsDefaultValueJson =DefaultDeleteFieldsDefaultValueJson, + DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, }); @@ -4117,14 +3948,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.WorkHour)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.WorkHour, Width = 600, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.WorkHour, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order = 1, ColCount = 2, ColSpan = 2, ItemType = "group", @@ -4366,30 +4190,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Sector)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.Sector, Width = 400, Height = 150 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Sector, 400, 150, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items =[ - new EditingFormItemDto - { - Order = 1, - DataField = "Name", - ColSpan = 2, - IsRequired = true, - EditorType2 = EditorTypes.dxTextBox - } + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), @@ -4471,24 +4278,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SkillType)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.SkillType, Width = 400, Height = 200 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.SkillType, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), @@ -4575,21 +4371,14 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SkillLevel)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.SkillLevel, Width = 600, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.SkillLevel, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions }, - new EditingFormItemDto { Order = 3, DataField = "IsDefault", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 4, DataField = "SkillTypeId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Progress", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSlider, EditorOptions=EditorOptionValues.SliderOptions }, + new EditingFormItemDto { Order = 3, DataField = "IsDefault", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 4, DataField = "SkillTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ] } }), @@ -4727,18 +4516,11 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Skill)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Skill, Width = 500, Height = 200 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.SkillLevel, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "SkillTypeId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "SkillTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -4842,24 +4624,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.UomCategory)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.UomCategory, Width = 400, Height = 200 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.UomCategory, 400, 200, true, true, true, false, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), @@ -4946,22 +4717,16 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Uom)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Uom, Width = 600, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Uom, 600, 300, true, true, true, false, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Ratio", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 4, DataField = "Rounding", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 6, DataField = "UomCategoryId", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Ratio", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 4, DataField = "Rounding", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 6, DataField = "UomCategoryId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -5133,17 +4898,11 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Behavior)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Behavior, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson( AppCodes.Definitions.Behavior, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -5224,19 +4983,14 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Disease)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Disease, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Disease, 500, 250, true, true, true, false, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= - [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - ]} + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + ] + } }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, } @@ -5316,20 +5070,11 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Document)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Document, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Document, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= - [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - ] - } + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, } @@ -5409,21 +5154,13 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EducationStatus)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.EducationStatus, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.EducationStatus, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, - ] - } + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, } @@ -5519,17 +5256,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Vaccine)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Vaccine, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Vaccine, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -5611,17 +5341,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Vehicle)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Vehicle, Width = 400, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Vehicle, 500, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, ColCount = 1, ColSpan = 2, ItemType = "group", + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items=[ new EditingFormItemDto { Order = 1, DataField = "Plate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "Brand", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, @@ -5890,22 +5613,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Psychologist)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Psychologist, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Psychologist, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items =[ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField = "PhoneNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, @@ -6075,32 +5788,22 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Lawyer)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Lawyer, Width = 600, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Lawyer, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items =[ - new EditingFormItemDto { Order = 1, DataField = "FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Email", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "MobileNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 5, DataField = "FaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 6, DataField = "Address", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 7, DataField = "TaxOffice", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 8, DataField = "TaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 9, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new() { + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "FullName", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Email", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "MobileNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 5, DataField = "FaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 6, DataField = "Address", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 7, DataField = "TaxOffice", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "TaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 9, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs index 8cb0e842..9caa0a96 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Coordinator.cs @@ -92,19 +92,12 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.QuestionPool, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.QuestionPool, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Tags", ColSpan = 2, EditorType2=EditorTypes.dxTagBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Tags", ColSpan = 1, EditorType2=EditorTypes.dxTagBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -222,18 +215,11 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Program)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Program, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Program, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -342,17 +328,10 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Schedule)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Schedule, Width = 750, Height = 700 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Schedule, 750, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, ColCount = 2, ColSpan = 2, ItemType = "group", + Order = 1, ColCount = 2, ColSpan = 1, ItemType = "group", Items = [ new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, @@ -742,22 +721,12 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationType)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.RegistrationType, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.RegistrationType, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, @@ -897,22 +866,12 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.RegistrationMethod)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.RegistrationMethod, Width = 550, Height = 350 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.RegistrationMethod, 550, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "RegistrationTypeId", IsRequired = true, ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, @@ -1079,22 +1038,12 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassType)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.ClassType, Width = 600, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.ClassType, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "RegistrationTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, @@ -1296,22 +1245,12 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Class)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Class, Width = 550, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Class, 550, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "ClassTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 4, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, @@ -1478,22 +1417,12 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Level)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = ListFormCodes.Lists.Level, Width = 650, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(ListFormCodes.Lists.Level, 650, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "ClassTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "LevelType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, @@ -1759,18 +1688,11 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ClassCancellationReason)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.ClassCancellationReason, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.ClassCancellationReason, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -1879,22 +1801,12 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LessonPeriod)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.LessonPeriod, Width = 600, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.LessonPeriod, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 2, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 4, DataField = "Day", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, @@ -2127,20 +2039,15 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionTag)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.QuestionTag, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.QuestionTag, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Color", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxColorBox }, - ]} + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= + [ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Color", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxColorBox }, + ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, } @@ -2251,20 +2158,14 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.QuestionPool)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.QuestionPool, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.QuestionPool, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Tags", ColSpan = 2, EditorType2=EditorTypes.dxTagBox }, - ]} + new() { + Order=1, ColCount=1, ColSpan=1,ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Tags", ColSpan = 1, EditorType2=EditorTypes.dxTagBox }, + ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { @@ -2391,14 +2292,7 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Question)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Question, Width = 500, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Question, 500, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { @@ -2412,18 +2306,18 @@ public class ListFormSeeder_Coordinator : IDataSeedContributor, ITransientDepend }, }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "QuestionPoolId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 2, DataField = "QuestionType", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 3, DataField = "Points", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 4, DataField = "Title", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "Content", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 6, DataField = "Difficulty", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 7, DataField = "MediaType", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 8, DataField = "MediaUrl", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 9, DataField = "CorrectAnswer", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox, EditorOptions="{\"disabled\": true}" }, - new EditingFormItemDto { Order = 10, DataField = "TimeLimit", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 11, DataField = "Explanation", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "QuestionPoolId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 2, DataField = "QuestionType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "Points", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 4, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "Content", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 6, DataField = "Difficulty", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField = "MediaType", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 8, DataField = "MediaUrl", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 9, DataField = "CorrectAnswer", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox, EditorOptions="{\"disabled\": true}" }, + new EditingFormItemDto { Order = 10, DataField = "TimeLimit", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 11, DataField = "Explanation", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs index a955a8f5..6afda7cf 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Crm.cs @@ -79,20 +79,13 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency // DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialType)), // DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, // PagerOptionJson = DefaultPagerOptionJson, - // EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - // { - // Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 }, - // AllowDeleting = true, - // AllowAdding = true, - // AllowUpdating = true, - // SendOnlyChangedFormValuesUpdate = false, - // }), + // EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialType, 500, 250, true, true, true, true, false), // EditingFormJson = JsonSerializer.Serialize(new List() { - // new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, - // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + // new() { Order=1,ColCount=1,ColSpan=1,ItemType="group", Items=[ + // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, // ]} // }), // InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs index 552df369..7138966b 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Hr.cs @@ -100,27 +100,20 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Hr.Survey), - DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Survey, Width = 500, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Survey, 500, 450, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Title", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 3, DataField = "Deadline", IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 4, DataField = "Status", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField = "IsAnonymous", IsRequired = true, EditorType2 = EditorTypes.dxCheckBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 3, DataField = "Deadline", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField = "IsAnonymous", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -277,20 +270,13 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EmploymentType)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.EmploymentType, Width = 500, Height = 200 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.EmploymentType, 500, 200, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Name", ColSpan = 2, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -381,31 +367,24 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.JobPosition)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.JobPosition, Width = 500, Height = 600 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.JobPosition, 500, 600, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 2, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField="DepartmentId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField="Level", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 6, DataField="MinSalary", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 7, DataField="MaxSalary", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 8, DataField="CurrencyId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 9, DataField="RequiredSkills", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 10, DataField="Responsibilities", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 11, DataField="Qualifications", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 12, DataField="IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox} + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField="DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField="Level", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 6, DataField="MinSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 7, DataField="MaxSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 8, DataField="CurrencyId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 9, DataField="RequiredSkills", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 10, DataField="Responsibilities", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 11, DataField="Qualifications", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 12, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox} ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -696,27 +675,20 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Department)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Department, Width = 500, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Department, 500, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 2, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField="ParentDepartmentId", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField="ManagerId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 6, DataField="CostCenterId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 7, DataField="Budget", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 8, DataField="IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox} + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField="ParentDepartmentId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField="ManagerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 6, DataField="CostCenterId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField="Budget", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 8, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox} ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -937,30 +909,23 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Badge)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Badge, Width = 500, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Badge, 500, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = [ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 2, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 2, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField="Icon", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField="Color", ColSpan = 2, EditorType2 = EditorTypes.dxColorBox }, - new EditingFormItemDto { Order = 6, DataField="BackgroundColor", ColSpan = 2, EditorType2 = EditorTypes.dxColorBox }, - new EditingFormItemDto { Order = 7, DataField="Category", ColSpan = 2, IsRequired =true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 8, DataField="Criteria", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 9, DataField="Points", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 10, DataField="Rarity", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 11, DataField="IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ + new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField="Icon", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField="Color", ColSpan = 1, EditorType2 = EditorTypes.dxColorBox }, + new EditingFormItemDto { Order = 6, DataField="BackgroundColor", ColSpan = 1, EditorType2 = EditorTypes.dxColorBox }, + new EditingFormItemDto { Order = 7, DataField="Category", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 8, DataField="Criteria", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 9, DataField="Points", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 10, DataField="Rarity", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 11, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -1249,31 +1214,24 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CostCenter)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.CostCenter, Width = 500, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.CostCenter, 500, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 2, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField="ParentCostCenterId", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField="ResponsibleEmployeeId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 6, DataField="DepartmentId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 7, DataField="CostCenterType", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 8, DataField="BudgetedAmount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 9, DataField="ActualAmount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 10, DataField="CurrencyId", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 11, DataField="FiscalYear", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 12, DataField="IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox} + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField="Name", ColSpan = 1, IsRequired =true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField="Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField="ParentCostCenterId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField="ResponsibleEmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 6, DataField="DepartmentId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField="CostCenterType", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 8, DataField="BudgetedAmount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 9, DataField="ActualAmount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 10, DataField="CurrencyId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 11, DataField="FiscalYear", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 12, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox} ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -1572,19 +1530,12 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Employee)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Employee, Width = 1000, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Employee, 1000, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, Caption="General", ColCount=1, ColSpan=1, ItemType="group", Items =[ + Order=1, Caption="General", ColCount=2, ColSpan=1, ItemType="group", Items =[ new EditingFormItemDto { Order = 1, DataField="Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 2, DataField="FullName", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 3, DataField="NationalId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, @@ -1595,7 +1546,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 8, DataField="IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, ]}, new() { - Order=2, Caption="Contact", ColCount=1, ColSpan=1, ItemType="group", Items =[ + Order=2, Caption="Contact", ColCount=2, ColSpan=1, ItemType="group", Items =[ new EditingFormItemDto { Order = 1, DataField="Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 2, DataField="City", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 3, DataField="District", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, @@ -1608,7 +1559,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency new EditingFormItemDto { Order = 10, DataField="Address2", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, ]}, new() { - Order=3, Caption="Job", ColCount=1, ColSpan=1, ItemType="group", Items =[ + Order=3, Caption="Job", ColCount=2, ColSpan=1, ItemType="group", Items =[ new EditingFormItemDto { Order = 1, DataField="HireDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 2, DataField="TerminationDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 3, DataField="EmploymentTypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, @@ -2310,28 +2261,21 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Leave)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Leave, Width = 500, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Leave, 500, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "AppliedDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox}, - new EditingFormItemDto { Order = 2, DataField = "EmployeeId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 3, DataField = "LeaveType", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 4, DataField = "StartDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorScript = EditorScriptValues.CalcTotalDaysFromDates}, - new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorScript = EditorScriptValues.CalcTotalDaysFromDates}, - new EditingFormItemDto { Order = 6, DataField = "TotalDays", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled}, - new EditingFormItemDto { Order = 7, DataField = "IsHalfDay", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox}, - new EditingFormItemDto { Order = 8, DataField = "Reason", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea}, - new EditingFormItemDto { Order = 9, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "AppliedDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox}, + new EditingFormItemDto { Order = 2, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "LeaveType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "StartDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorScript = EditorScriptValues.CalcTotalDaysFromDates}, + new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorScript = EditorScriptValues.CalcTotalDaysFromDates}, + new EditingFormItemDto { Order = 6, DataField = "TotalDays", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled}, + new EditingFormItemDto { Order = 7, DataField = "IsHalfDay", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox}, + new EditingFormItemDto { Order = 8, DataField = "Reason", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea}, + new EditingFormItemDto { Order = 9, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -2652,31 +2596,24 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Hr.Overtime), - DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Overtime)), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Overtime)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Overtime, Width = 500, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Overtime, 500, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Date", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox}, - new EditingFormItemDto { Order = 2, DataField = "EmployeeId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 4, DataField = "StartTime", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions, EditorScript = EditorScriptValues.CalcTotalHoursFromTimes}, - new EditingFormItemDto { Order = 5, DataField = "EndTime", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions, EditorScript = EditorScriptValues.CalcTotalHoursFromTimes}, - new EditingFormItemDto { Order = 6, DataField = "TotalHours", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled}, - new EditingFormItemDto { Order = 7, DataField = "Reason", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextArea}, - new EditingFormItemDto { Order = 8, DataField = "Rate", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, - new EditingFormItemDto { Order = 9, DataField = "Amount", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = "{ \"disabled\" : true, \"format\" : { \"type\" : \"fixedPoint\", \"precision\" : 2 } }"}, - new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Date", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox}, + new EditingFormItemDto { Order = 2, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "StartTime", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions, EditorScript = EditorScriptValues.CalcTotalHoursFromTimes}, + new EditingFormItemDto { Order = 5, DataField = "EndTime", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions, EditorScript = EditorScriptValues.CalcTotalHoursFromTimes}, + new EditingFormItemDto { Order = 6, DataField = "TotalHours", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.Disabled}, + new EditingFormItemDto { Order = 7, DataField = "Reason", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea}, + new EditingFormItemDto { Order = 8, DataField = "Rate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, + new EditingFormItemDto { Order = 9, DataField = "Amount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = "{ \"disabled\" : true, \"format\" : { \"type\" : \"fixedPoint\", \"precision\" : 2 } }"}, + new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -2998,28 +2935,21 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Expense)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Expense, Width = 500, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Expense, 500, 450, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "EmployeeId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 2, DataField = "Category", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 3, DataField = "Amount", IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 4, DataField = "CurrencyId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField = "RequestDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 6, DataField = "Description", EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 7, DataField = "Project", EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 8, DataField = "Status", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 9, DataField = "Notes", EditorType2 = EditorTypes.dxTextArea }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "Amount", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField = "RequestDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan=1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 7, DataField = "Project", ColSpan=1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 9, DataField = "Notes", ColSpan=1, EditorType2 = EditorTypes.dxTextArea }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -3296,31 +3226,24 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Payroll)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Payroll, Width = 400, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Payroll, 400, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 2, DataField = "PeriodYear", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 3, DataField = "PeriodMonth", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 4, DataField = "PaymentDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 5, DataField = "BaseSalary", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 6, DataField = "Overtime", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 7, DataField = "Bonus", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 8, DataField = "GrossSalary", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 9, DataField = "NetSalary", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 10, DataField = "TaxNumber", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 11, DataField = "SocialSecurity", ColSpan = 2, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ + new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 2, DataField = "PeriodYear", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 3, DataField = "PeriodMonth", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "PaymentDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 5, DataField = "BaseSalary", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 6, DataField = "Overtime", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 7, DataField = "Bonus", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 8, DataField = "GrossSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 9, DataField = "NetSalary", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 10, DataField = "TaxNumber", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 11, DataField = "SocialSecurity", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions = EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -3670,23 +3593,16 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Template360)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Template360, Width = 400, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Template360, 400, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField = "AssessorTypes", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxTagBox }, - new EditingFormItemDto { Order = 3, DataField = "IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField = "AssessorTypes", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxTagBox }, + new EditingFormItemDto { Order = 3, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -3827,27 +3743,20 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Performance360)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Performance360, Width = 500, Height = 520 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Performance360, 500, 520, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 3, DataField = "TemplateId", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 4, DataField = "StartDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 6, DataField = "Status", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 7, DataField = "DepartmentId", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 8, DataField = "TargetEmployees", ColSpan = 2, IsRequired=true, EditorType2 = EditorTypes.dxTagBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 3, DataField = "TemplateId", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "StartDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 5, DataField = "EndDate", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 6, DataField = "Status", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField = "DepartmentId", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 8, DataField = "TargetEmployees", ColSpan = 1, IsRequired=true, EditorType2 = EditorTypes.dxTagBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -4084,31 +3993,24 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Training)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Training, Width = 500, Height = 600 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Training, 500, 600, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Title", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 3, DataField = "Instructor", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "Category", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField = "Type", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 6, DataField = "Location", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "Thumbnail", EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 8, DataField = "Duration", IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 9, DataField = "StartDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 10, DataField = "EndDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 11, DataField = "MaxParticipants", EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 12, DataField = "Status", EditorType2 = EditorTypes.dxSelectBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan=1, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 3, DataField = "Instructor", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "Category", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 6, DataField = "Location", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "Thumbnail", ColSpan=1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "Duration", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 9, DataField = "StartDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 10, DataField = "EndDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 11, DataField = "MaxParticipants", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 12, DataField = "Status", ColSpan=1, EditorType2 = EditorTypes.dxSelectBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -4424,24 +4326,17 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Survey)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.Survey, Width = 500, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.Survey, 500, 450, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Title", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Description", IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 3, DataField = "Deadline", IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 4, DataField = "Status", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField = "IsAnonymous", IsRequired = true, EditorType2 = EditorTypes.dxCheckBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 3, DataField = "Deadline", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 4, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField = "IsAnonymous", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -4604,26 +4499,19 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Hr.SurveyQuestion), - DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyQuestion)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.SurveyQuestion, Width = 500, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.SurveyQuestion, 500, 400, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "SurveyId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 2, DataField = "QuestionText", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Type", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 4, DataField = "IsRequired", IsRequired = true, EditorType2 = EditorTypes.dxCheckBox } + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "SurveyId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 2, DataField = "QuestionText", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 4, DataField = "IsRequired", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxCheckBox } ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -4797,23 +4685,16 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SurveyResponse)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Hr.SurveyResponse, Width = 500, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Hr.SurveyResponse, 500, 400, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "SurveyId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 2, DataField = "EmployeeId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 3, DataField = "SubmissionTime", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "CreationTime", IsRequired = true, EditorType2 = EditorTypes.dxDateBox } + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "SurveyId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 2, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "SubmissionTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "CreationTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox } ]} }), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs index 91584261..ddd0434c 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Intranet.cs @@ -77,17 +77,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventType)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.EventType, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.EventType, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -168,17 +161,10 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.EventCategory)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.EventCategory, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.EventCategory, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { Order=1, ColCount=1, ColSpan=1,ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -259,28 +245,18 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Event)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.Event, Width = 500, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.Event, 500, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items =[ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ new EditingFormItemDto { Order = 1, DataField = "CategoryId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "TypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, new EditingFormItemDto { Order = 5, DataField = "EmployeeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan = 1, EditorType2 = EditorTypes.dxTextArea }, new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 8, DataField = "ParticipantsCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 9, DataField = "Likes", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox }, @@ -532,18 +508,11 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.Meal, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.Meal, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, ColCount = 1, ColSpan = 2, ItemType = "group", Items = [ + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ new EditingFormItemDto { Order = 1, DataField = "BranchId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, new EditingFormItemDto { Order = 2, DataField = "Date", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, new EditingFormItemDto { Order = 3, DataField = "Type", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, @@ -726,28 +695,21 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Reservation)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.Reservation, Width = 500, Height = 400 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.Reservation, 500, 400, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto {Order=1,DataField="Type", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, - new EditingFormItemDto {Order=2,DataField="ResourceName", IsRequired = true, EditorType2 = EditorTypes.dxTextBox}, - new EditingFormItemDto {Order=3,DataField="EmployeeId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, - new EditingFormItemDto {Order=4,DataField="StartDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox}, - new EditingFormItemDto {Order=5,DataField="EndDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox}, - new EditingFormItemDto {Order=6,DataField="Purpose", IsRequired = true, EditorType2 = EditorTypes.dxTextBox}, - new EditingFormItemDto {Order=8,DataField="Participants", EditorType2 = EditorTypes.dxNumberBox}, - new EditingFormItemDto {Order=9,DataField="Notes", EditorType2 = EditorTypes.dxTextArea}, - new EditingFormItemDto {Order=7,DataField="Status", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox}, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto {Order=1,DataField="Type", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxSelectBox}, + new EditingFormItemDto {Order=2,DataField="ResourceName", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxTextBox}, + new EditingFormItemDto {Order=3,DataField="EmployeeId", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxSelectBox}, + new EditingFormItemDto {Order=4,DataField="StartDate", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxDateBox}, + new EditingFormItemDto {Order=5,DataField="EndDate", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxDateBox}, + new EditingFormItemDto {Order=6,DataField="Purpose", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxTextBox}, + new EditingFormItemDto {Order=8,DataField="Participants", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox}, + new EditingFormItemDto {Order=9,DataField="Notes", ColSpan=1, EditorType2 = EditorTypes.dxTextArea}, + new EditingFormItemDto {Order=7,DataField="Status", IsRequired = true, ColSpan=1, EditorType2 = EditorTypes.dxSelectBox}, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -987,27 +949,20 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ShuttleRoute)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.ShuttleRoute, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.ShuttleRoute, 500, 300, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Name", IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Type", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 3, DataField = "DepartureTime", IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions }, - new EditingFormItemDto { Order = 4, DataField = "ArrivalTime", IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions }, - new EditingFormItemDto { Order = 5, DataField = "Capacity", EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 6, DataField = "Available", EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, - new EditingFormItemDto { Order = 7, DataField = "Route", IsRequired = true, EditorType2 = EditorTypes.dxTagBox } + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan=1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "DepartureTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions }, + new EditingFormItemDto { Order = 4, DataField = "ArrivalTime", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.TimeSpanOptions }, + new EditingFormItemDto { Order = 5, DataField = "Capacity", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 6, DataField = "Available", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new EditingFormItemDto { Order = 7, DataField = "Route", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTagBox } ] } }), @@ -1219,30 +1174,23 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Announcement)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.Announcement, Width = 500, Height = 600 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.Announcement, 500, 600, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "Title", IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Excerpt", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Content", IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions }, - new EditingFormItemDto { Order = 4, DataField = "ImageUrl", EditorType2 = EditorTypes.dxTagBox }, - new EditingFormItemDto { Order = 5, DataField = "Category", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 6, DataField = "EmployeeId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 7, DataField = "PublishDate", EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 8, DataField = "ExpiryDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 9, DataField = "IsPinned", EditorType2 = EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 10, DataField = "Departments", EditorType2 = EditorTypes.dxTagBox }, - new EditingFormItemDto { Order = 11, DataField = "Attachments", EditorType2 = EditorTypes.dxTagBox } + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan=1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Excerpt", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Content", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions }, + new EditingFormItemDto { Order = 4, DataField = "ImageUrl", ColSpan=1, EditorType2 = EditorTypes.dxTagBox }, + new EditingFormItemDto { Order = 5, DataField = "Category", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 6, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 7, DataField = "PublishDate", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 8, DataField = "ExpiryDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 9, DataField = "IsPinned", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 10, DataField = "Departments", ColSpan=1, EditorType2 = EditorTypes.dxTagBox }, + new EditingFormItemDto { Order = 11, DataField = "Attachments", ColSpan=1, EditorType2 = EditorTypes.dxTagBox } ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -1507,29 +1455,22 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Visitor)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.Visitor, Width = 500, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.Visitor, 500, 450, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =[ - new EditingFormItemDto { Order = 1, DataField = "FullName", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "CompanyName", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Email", EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order = 5, DataField = "Purpose", IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "VisitDate", IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 7, DataField = "CheckIn", EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 8, DataField = "CheckOut", EditorType2 = EditorTypes.dxDateBox }, - new EditingFormItemDto { Order = 9, DataField = "EmployeeId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 10, DataField = "Status", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items =[ + new EditingFormItemDto { Order = 1, DataField = "FullName", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "CompanyName", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan=1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "PhoneNumber", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order = 5, DataField = "Purpose", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "VisitDate", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 7, DataField = "CheckIn", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 8, DataField = "CheckOut", ColSpan=1, EditorType2 = EditorTypes.dxDateBox }, + new EditingFormItemDto { Order = 9, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 10, DataField = "Status", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] @@ -1773,24 +1714,17 @@ public class ListFormSeeder_Intranet : IDataSeedContributor, ITransientDependenc DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SocialPost)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Intranet.SocialPost, Width = 700, Height = 600 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Intranet.SocialPost, 700, 600, true, true, true, true, false), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "EmployeeId", IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 2, DataField = "Content", IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions }, - new EditingFormItemDto { Order = 3, DataField = "LikeCount", EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 4, DataField = "IsLiked", EditorType2 = EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 5, DataField = "IsOwnPost", EditorType2 = EditorTypes.dxCheckBox } + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ + new EditingFormItemDto { Order = 1, DataField = "EmployeeId", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 2, DataField = "Content", ColSpan=1, IsRequired = true, EditorType2 = EditorTypes.dxHtmlEditor, EditorOptions = EditorOptionValues.HtmlEditorOptions }, + new EditingFormItemDto { Order = 3, DataField = "LikeCount", ColSpan=1, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 4, DataField = "IsLiked", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 5, DataField = "IsOwnPost", ColSpan=1, EditorType2 = EditorTypes.dxCheckBox } ]} }), CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs index 10c1e243..f56c89d5 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Maintenance.cs @@ -79,20 +79,13 @@ public class ListFormSeeder_Maintenance : IDataSeedContributor, ITransientDepend // DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialType)), // DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, // PagerOptionJson = DefaultPagerOptionJson, - // EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - // { - // Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 }, - // AllowDeleting = true, - // AllowAdding = true, - // AllowUpdating = true, - // SendOnlyChangedFormValuesUpdate = false, - // }), + // EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialType, 500, 250, true, true, true, true, false), // EditingFormJson = JsonSerializer.Serialize(new List() { - // new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, - // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + // new() { Order=1,ColCount=1,ColSpan=1,ItemType="group", Items=[ + // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, // ]} // }), // InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs index d0959dcc..de104077 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Mrp.cs @@ -79,20 +79,13 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency // DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialType)), // DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, // PagerOptionJson = DefaultPagerOptionJson, - // EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - // { - // Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 }, - // AllowDeleting = true, - // AllowAdding = true, - // AllowUpdating = true, - // SendOnlyChangedFormValuesUpdate = false, - // }), + // EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialType, 500, 250, true, true, true, true, false), // EditingFormJson = JsonSerializer.Serialize(new List() { - // new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, - // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + // new() { Order=1,ColCount=1,ColSpan=1,ItemType="group", Items=[ + // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, // ]} // }), // InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs index d627d84b..0703e735 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Participant.cs @@ -77,18 +77,11 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MeetingMethod)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.MeetingMethod, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.MeetingMethod, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Type", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, ]} }), @@ -226,18 +219,11 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MeetingResult)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.MeetingResult, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.MeetingResult, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, ]} }), @@ -364,18 +350,11 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Source)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Source, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Source, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new() { Order=1, ColCount=1, ColSpan=1,ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -484,18 +463,11 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Interesting)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.Interesting, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Interesting, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -604,19 +576,12 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.SalesRejectionReason)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.SalesRejectionReason, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.SalesRejectionReason, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 3, DataField = "Status", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -757,18 +722,11 @@ public class ListFormSeeder_Participant : IDataSeedContributor, ITransientDepend DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.NoteType, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.NoteType, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { - Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ]} }), } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs index a0f19070..086ddbda 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Project.cs @@ -79,20 +79,13 @@ public class ListFormSeeder_Project : IDataSeedContributor, ITransientDependency // DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialType)), // DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, // PagerOptionJson = DefaultPagerOptionJson, - // EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - // { - // Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 }, - // AllowDeleting = true, - // AllowAdding = true, - // AllowUpdating = true, - // SendOnlyChangedFormValuesUpdate = false, - // }), + // EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialType, 500, 250, true, true, true, true, false), // EditingFormJson = JsonSerializer.Serialize(new List() { - // new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, - // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + // new() { Order=1,ColCount=1,ColSpan=1,ItemType="group", Items=[ + // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, // ]} // }), // InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index bded9251..bb56e9b8 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -92,14 +92,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 + ".Activity"), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Definitions.QuestionPool, Width = 900, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=2, ColSpan=1, ItemType="group", Items =[ @@ -550,18 +543,15 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency PermissionJson = DefaultPermissionJson(AppCodes.Languages.Language), DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Language)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, - EditingOptionJson = DefaultEditingOptionJson, + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Languages.Language, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = [ - new() { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new() { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new() { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new() { Order = 4, DataField = "IsEnabled", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ + new() { Order = 1, DataField = "CultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { Order = 2, DataField = "UiCultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { Order = 3, DataField = "DisplayName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new() { Order = 4, DataField = "IsEnabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ] } }), @@ -700,27 +690,20 @@ 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 + ".Activity"), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = TenantManagementPermissions.Tenants.Default, Width = 900, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(TenantManagementPermissions.Tenants.Default, 800, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ - new EditingFormItemDto { Order=1, DataField = "Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=2, DataField = "OrganizationName", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=3, DataField = "Founder", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order=5, DataField = "TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=6, DataField = "MobileNumber", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order=7, DataField = "PhoneNumber", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order=8, DataField = "FaxNumber", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order=9, DataField = "IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order=1, DataField = "Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=2, DataField = "OrganizationName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=3, DataField = "Founder", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order=5, DataField = "TaxOffice", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=6, DataField = "MobileNumber", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order=7, DataField = "PhoneNumber", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order=8, DataField = "FaxNumber", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order=9, DataField = "IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox }, ] }, new() { Order=2, ColCount=1, ColSpan=1, ItemType="group", Items = @@ -1181,27 +1164,20 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Branches), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Branches, Width = 900, Height = 450 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Branches, 900, 450, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ - new EditingFormItemDto { Order=1, DataField = "TenantId", ColSpan=2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order=2, DataField = "Code", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=3, DataField = "Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order=5, DataField = "TaxOffice", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=6, DataField = "MobileNumber", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order=7, DataField = "PhoneNumber", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order=8, DataField = "FaxNumber", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, - new EditingFormItemDto { Order=9, DataField = "IsActive", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order=1, DataField = "TenantId", ColSpan=1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order=2, DataField = "Code", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=3, DataField = "Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=4, DataField = "VknTckn", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order=5, DataField = "TaxOffice", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=6, DataField = "MobileNumber", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order=7, DataField = "PhoneNumber", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order=8, DataField = "FaxNumber", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions=EditorOptionValues.PhoneEditorOptions }, + new EditingFormItemDto { Order=9, DataField = "IsActive", ColSpan=1, IsRequired=false, EditorType2=EditorTypes.dxCheckBox }, ] }, new() { Order=2, ColCount=1, ColSpan=1, ItemType="group", Items = @@ -1632,30 +1608,23 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.SettingDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Settings.SettingDefinitions, Width = 800, Height = 600 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Settings.SettingDefinitions, 800, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "MainGroupKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "SubGroupKey", ColSpan = 2, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "NameKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "DescriptionKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 6, DataField = "DefaultValue", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "IsVisibleToClients", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 8, DataField = "Providers", ColSpan = 2, EditorType2=EditorTypes.dxTagBox }, - new EditingFormItemDto { Order = 9, DataField = "IsInherited", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 10, DataField = "IsEncrypted", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 11, DataField = "RequiredPermissionName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 12, DataField = "DataType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 13, DataField = "SelectOptions", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "MainGroupKey", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "SubGroupKey", ColSpan = 1, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "NameKey", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "DescriptionKey", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 6, DataField = "DefaultValue", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "IsVisibleToClients", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 8, DataField = "Providers", ColSpan = 1, EditorType2=EditorTypes.dxTagBox }, + new EditingFormItemDto { Order = 9, DataField = "IsInherited", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 10, DataField = "IsEncrypted", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 11, DataField = "RequiredPermissionName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 12, DataField = "DataType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 13, DataField = "SelectOptions", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -2010,22 +1979,15 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "Id", FieldDbType = DbType.Int32, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Settings.GlobalSearch, Width = 500, Height = 350 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Settings.GlobalSearch, 500, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = [ - new EditingFormItemDto { Order=1, DataField="System", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=2, DataField="Group", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=3, DataField="Term", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=4, DataField="Url", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order=5, DataField="Weight", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [ + new EditingFormItemDto { Order=1, DataField="System", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=2, DataField="Group", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=3, DataField="Term", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=4, DataField="Url", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order=5, DataField="Weight", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -2167,21 +2129,14 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Languages.Language, Width = 600, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Languages.Language, 600, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { - Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "IsEnabled", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new() { + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "UiCultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "DisplayName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "IsEnabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -2321,21 +2276,14 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.LanguageText)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Languages.LanguageText, Width = 800, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Languages.LanguageText, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "ResourceName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Key", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "Value", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "ResourceName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Key", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "Value", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, ] } }), @@ -2493,28 +2441,17 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Routes, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Routes, 600, 400, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Key", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Path", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "ComponentPath", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "RouteType", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "Authority", ColSpan = 2, EditorType2 = EditorTypes.dxAutocomplete } + new EditingFormItemDto { Order = 1, DataField = "Key", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Path", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "ComponentPath", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "RouteType", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "Authority", ColSpan = 1, EditorType2 = EditorTypes.dxAutocomplete } ] } }), @@ -2662,8 +2599,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency Description = AppCodes.Menus.Menu, SelectCommandType = SelectCommandTypeEnum.Table, SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu)), - KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, + KeyFieldName = "Code", + KeyFieldDbSourceType = DbType.String, DefaultFilter = DefaultFilterJson, SortMode = GridOptions.SortModeSingle, FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), @@ -2676,28 +2613,22 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Menu)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Menus.Menu, Width = 800, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + TreeOptionJson = DefaultTreeOptionJson("ParentCode", true), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Menus.Menu, 600, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 2, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 2, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "DisplayName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Order", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 1, EditorType2=EditorTypes.dxAutocomplete, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -2961,22 +2892,14 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.DataSource)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Listforms.DataSource, Width = 800, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Listforms.DataSource, 600, 600, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= - [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "DataSourceType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "ConnectionString", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, - ] - } + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= + [ + new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "DataSourceType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "ConnectionString", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, } @@ -3098,34 +3021,27 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PermissionJson = DefaultPermissionJson(AppCodes.Listforms.Listform), PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Listforms.Listform, Width = 800, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Listforms.Listform, 800, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "ListFormCode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "ListFormType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "SelectCommandType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 6, DataField = "SelectCommand", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "TableName", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 8, DataField = "KeyFieldName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 9, DataField = "KeyFieldDbSourceType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 10, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 11, DataField = "Title", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 12, DataField = "SortMode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 13, DataField = "DeleteServiceAddress", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 14, DataField = "InsertServiceAddress", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 15, DataField = "UpdateServiceAddress", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 16, DataField = "IsTenant", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 17, DataField = "IsOrganizationUnit", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 18, DataField = "IsSubForm", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "CultureName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "ListFormCode", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "ListFormType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "SelectCommandType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 6, DataField = "SelectCommand", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "TableName", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "KeyFieldName", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 9, DataField = "KeyFieldDbSourceType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 10, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 11, DataField = "Title", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 12, DataField = "SortMode", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 13, DataField = "DeleteServiceAddress", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 14, DataField = "InsertServiceAddress", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 15, DataField = "UpdateServiceAddress", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 16, DataField = "IsTenant", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 17, DataField = "IsOrganizationUnit", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 18, DataField = "IsSubForm", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]}, new() { Order=2,ColCount=1,ColSpan=2,ItemType="group", Items= [ @@ -3639,23 +3555,16 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.NotificationRule)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.Notifications.NotificationRules, Width = 800, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Notifications.NotificationRules, 800, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "NotificationType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "RecipientType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Channel", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "RecipientId", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 6, DataField = "IsFixed", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 7, DataField = "IsCustomized", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "NotificationType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "RecipientType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Channel", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "RecipientId", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 6, DataField = "IsFixed", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 7, DataField = "IsCustomized", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, @@ -3877,13 +3786,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Notification)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - AllowDeleting = false, - AllowAdding = false, - AllowUpdating = false, - SendOnlyChangedFormValuesUpdate = false, - }) + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Notifications.Notification, 700, 300, true, true, true, true, false), } ); @@ -4095,22 +3998,15 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.BackgroundWorker)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.BackgroundWorkers, Width = 800, Height = 650 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.BackgroundWorkers, 800, 650, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group",Items=[ - new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Cron", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "WorkerType", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "BeforeSp", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "AfterSp", ColSpan = 2, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + new() { Order=1, ColCount=1, ColSpan=1, ItemType="group",Items=[ + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Cron", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "WorkerType", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "BeforeSp", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "AfterSp", ColSpan = 1, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ] }, new() { Order=2,ColCount=1,ColSpan=2,ItemType="group",Items= [ @@ -4297,42 +4193,17 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Definitions.ContactTag), - DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTag)), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTag)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.ContactTag, Width = 400, Height = 200 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.ContactTag, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + new() { + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto - { - Order = 1, - DataField = "Name", - ColSpan = 2, - IsRequired = true, - EditorType2 = EditorTypes.dxTextBox - }, - new EditingFormItemDto - { - Order = 2, - DataField = "Category", - ColSpan = 2, - IsRequired = true, - EditorType2 = EditorTypes.dxTextBox - } + new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Category", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), @@ -4431,25 +4302,14 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ContactTitle)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.ContactTitle, Width = 400, Height = 200 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.ContactTitle, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Abbreviation", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } + new EditingFormItemDto { Order = 1, DataField = "Title", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Abbreviation", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), @@ -4548,32 +4408,20 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Currency)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.Currency, Width = 500, Height = 350 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Currency, 500, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = - [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Symbol", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "Rate", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox } - ] - } - }), + new() { + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = + [ + new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Symbol", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "Rate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 5, DataField = "IsActive", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox } + ] + } + }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, }); @@ -4710,34 +4558,16 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = DefaultPermissionJson(AppCodes.Definitions.CountryGroup), - DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CountryGroup)), + DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.CountryGroup)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.CountryGroup, Width = 400, Height = 200 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.CountryGroup, 400, 200, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto - { - Order = 1, - DataField = "Name", - ColSpan = 2, - IsRequired = true, - EditorType2 = EditorTypes.dxTextBox - } + new EditingFormItemDto { Order = 1, ColSpan = 1, DataField = "Name", IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), @@ -4815,31 +4645,20 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.Country)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.Country, Width = 600, Height = 500 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.Country, 600, 500, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 2, EditorType2 = EditorTypes.dxSelectBox }, - new EditingFormItemDto { Order = 5, DataField = "PhoneCode", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 6, DataField = "TaxLabel", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "ZipRequired", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 8, DataField = "StateRequired", ColSpan = 2, EditorType2 = EditorTypes.dxCheckBox } + new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "GroupName", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 4, DataField = "CurrencyId", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 5, DataField = "PhoneCode", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 6, DataField = "TaxLabel", ColSpan = 1, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "ZipRequired", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 8, DataField = "StateRequired", ColSpan = 1, EditorType2 = EditorTypes.dxCheckBox } ] } }), @@ -5036,27 +4855,16 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.City)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.City, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.City, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Country", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "PlateCode", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } + new EditingFormItemDto { Order = 1, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "PlateCode", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), @@ -5192,29 +5000,18 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.District)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto { Title = AppCodes.Definitions.District, Width = 500, Height = 300 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.Definitions.District, 500, 300, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List { new() { - Order = 1, - ColCount = 1, - ColSpan = 2, - ItemType = "group", - Items = + Order = 1, ColCount = 1, ColSpan = 1, ItemType = "group", Items = [ - new EditingFormItemDto { Order = 1, DataField = "Country", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "City", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "Township", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "Street", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "ZipCode", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } + new EditingFormItemDto { Order = 1, DataField = "Country", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "City", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "Township", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "Street", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "ZipCode", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox } ] } }), diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs index 7f3dd3dd..cb02105c 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_SupplyChain.cs @@ -78,21 +78,14 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialType, 500, 250, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { new() { - Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -222,21 +215,14 @@ public class ListFormSeeder_SupplyChain : IDataSeedContributor, ITransientDepend DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialGroup)), DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, PagerOptionJson = DefaultPagerOptionJson, - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialGroup, Width = 500, Height = 350 }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = true, - }), + EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialGroup, 500, 350, true, true, true, true, false), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, - new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 5, DataField = "ParentGroupId", ColSpan = 2, EditorType2=EditorTypes.dxSelectBox }, + new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items=[ + new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 5, DataField = "ParentGroupId", ColSpan = 1, EditorType2=EditorTypes.dxSelectBox }, ]} }), InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs index 6bbaf56b..05598f8a 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormSeeder_Warehouse.cs @@ -79,20 +79,13 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen // DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.MaterialType)), // DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson, // PagerOptionJson = DefaultPagerOptionJson, - // EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - // { - // Popup = new GridEditingPopupDto() { Title = AppCodes.SupplyChain.MaterialType, Width = 500, Height = 250 }, - // AllowDeleting = true, - // AllowAdding = true, - // AllowUpdating = true, - // SendOnlyChangedFormValuesUpdate = false, - // }), + // EditingOptionJson = DefaultEditingOptionJson(AppCodes.SupplyChain.MaterialType, 500, 250, true, true, true, true, false), // EditingFormJson = JsonSerializer.Serialize(new List() { - // new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items=[ - // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 2, EditorType2=EditorTypes.dxTextArea }, - // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 2, EditorType2=EditorTypes.dxCheckBox }, + // new() { Order=1,ColCount=1,ColSpan=1,ItemType="group", Items=[ + // new EditingFormItemDto { Order = 1, DataField = "Code", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 2, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + // new EditingFormItemDto { Order = 3, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea }, + // new EditingFormItemDto { Order = 4, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox }, // ]} // }), // InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson, diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs index 66153e2b..d560d10b 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDefaults.cs @@ -29,13 +29,23 @@ public static class SeederDefaults new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }); - public static readonly string DefaultEditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - ConfirmDelete = true, - }); + public static string DefaultEditingOptionJson( + string Title, + int Width, + int Height, + bool AllowDeleting, + bool AllowAdding, + bool AllowUpdating, + bool ConfirmDelete, + bool SendOnlyChangedFormValuesUpdate) => JsonSerializer.Serialize(new GridEditingDto + { + Popup = new GridEditingPopupDto() { Title = Title, Width = Width, Height = Height }, + AllowDeleting = AllowDeleting, + AllowAdding = AllowAdding, + AllowUpdating = AllowUpdating, + ConfirmDelete = ConfirmDelete, + SendOnlyChangedFormValuesUpdate = SendOnlyChangedFormValuesUpdate + }); public static readonly string DefaultFilterJson = "\"IsDeleted\" = 'false'"; public static readonly string DefaultColumnOptionJson = JsonSerializer.Serialize(new @@ -67,6 +77,12 @@ public static class SeederDefaults Mode = GridOptions.SelectionModeMultiple, SelectAllMode = GridOptions.SelectionAllModeAllPages }); + public static string DefaultTreeOptionJson(string ParentIdExpr, bool AutoExpandAll = true) => JsonSerializer.Serialize(new TreeOptionDto + { + ParentIdExpr = ParentIdExpr, + RootValue = null, + AutoExpandAll = AutoExpandAll + }); public static readonly string DefaultPagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto { Visible = true, diff --git a/ui/src/views/list/List.tsx b/ui/src/views/list/List.tsx index b4bb328e..4e2f4039 100644 --- a/ui/src/views/list/List.tsx +++ b/ui/src/views/list/List.tsx @@ -50,10 +50,12 @@ const List = () => { if (listFormStates) { setViewMode(listFormStates.layout) + return } if (gridDto) { setViewMode(gridDto?.gridOptions?.layoutDto.defaultLayout) + return } }, [gridDto])