From 73359891fc6518f5a4b6596f78c0e810d5846290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Sat, 1 Nov 2025 23:50:27 +0300 Subject: [PATCH] =?UTF-8?q?ListSeeder=20d=C3=BCzenlemesi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/LanguagesData.json | 2 +- .../Seeds/ListSeeder.cs | 19530 ++++------------ .../Enums/LookUpQueryValues.cs | 20 +- ui/src/views/intranet/Dashboard.tsx | 7 +- 4 files changed, 4656 insertions(+), 14903 deletions(-) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json index 4da17110..be05e331 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/LanguagesData.json @@ -4013,7 +4013,7 @@ "resourceName": "Platform", "key": "ListForms.ListFormEdit.TabPaging", "en": "Paging", - "tr": "Sayfalam" + "tr": "Sayfalama" }, { "resourceName": "Platform", diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListSeeder.cs index 45efd475..84e3b61d 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListSeeder.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Data; using System.Text.Json; using System.Threading.Tasks; -using DocumentFormat.OpenXml.Spreadsheet; using Kurs.Languages.Languages; using Kurs.Platform.Entities; using Kurs.Platform.Enums; @@ -18,8 +17,6 @@ using Volo.Abp.TenantManagement; using static Kurs.Platform.PlatformConsts; using AbpIdentity = Kurs.Platform.Data.Seeds.SeedConsts.AbpIdentity; using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes; -using Kurs.Languages.Entities; -using Kurs.Settings.Entities; namespace Kurs.Platform.Data.Seeds; @@ -45,6 +42,115 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency _configuration = configuration; } + private readonly string DefaultColumnOptionJson = JsonSerializer.Serialize(new + { + ColumnFixingEnabled = true, + ColumnAutoWidth = true, + ColumnChooserEnabled = true, + AllowColumnResizing = true, + AllowColumnReordering = true, + ColumnResizingMode = "widget", + }); + private readonly string DefaultLayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 4 + }); + private readonly string DefaultSelectionSingleJson = JsonSerializer.Serialize(new SelectionDto + { + Mode = GridOptions.SelectionModeSingle, + AllowSelectAll = false + }); + private readonly string DefaultSelectionMultipleJson = JsonSerializer.Serialize(new SelectionDto + { + AllowSelectAll = true, + Mode = GridOptions.SelectionModeMultiple, + SelectAllMode = GridOptions.SelectionAllModeAllPages + }); + private readonly string DefaultPagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto + { + Visible = true, + AllowedPageSizes = "10,20,50,100", + ShowPageSizeSelector = true, + ShowNavigationButtons = true, + ShowInfo = false, + InfoText = "Page {0} of {1} ({2} items)", + DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, + ScrollingMode = GridColumnOptions.ScrollingModeStandard, + LoadPanelEnabled = "auto", + LoadPanelText = "Loading..." + }); + private readonly string DefaultColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + AllowReordering = true, + }); + private readonly string DefaultPivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }); + private readonly string DefaultValidationRuleRequiredJson = JsonSerializer.Serialize(new ValidationRuleDto[] + { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } + }); + private readonly string DefaultValidationRuleEmailJson = JsonSerializer.Serialize(new ValidationRuleDto[] + { + new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } + }); + private string DefaultPermissionJson(string c, string r, string u, string d, string e, string i, string a) + { + return JsonSerializer.Serialize(new PermissionCrudDto + { + C = c, + R = r, + U = u, + D = d, + E = e, + I = i, + A = a, + }); + } + private string DefaultPermissionJson(string permissionName) + { + return JsonSerializer.Serialize(new PermissionCrudDto + { + C = permissionName + ".Create", + R = permissionName, + U = permissionName + ".Update", + D = permissionName + ".Delete", + E = permissionName + ".Export", + I = permissionName + ".Import", + A = permissionName + ".Activity", + }); + } + private string DefaultFieldPermissionJson(string permissionName) + { + return JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = permissionName + ".Create", + R = permissionName, + U = permissionName + ".Update", + E = true, + I = false, + Deny = false + }); + } + private string DefaultFieldPermissionJson(string c, string r, string u, bool e, bool i, bool d) + { + return JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = c, + R = r, + U = u, + E = e, + I = i, + Deny = d + }); + } + public async Task SeedAsync(DataSeedContext context) { #region Tenant @@ -55,7 +161,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Tenant, Name = TenantManagementPermissions.Tenants.Default, @@ -70,67 +176,17 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - D = TenantManagementPermissions.Tenants.Delete, - E = TenantManagementPermissions.Tenants.Default + ".Export", - I = TenantManagementPermissions.Tenants.Default + ".Import", - A = TenantManagementPermissions.Tenants.Default + ".Activity", - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + 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 = "Tenant Form", - Width = 900, - Height = 450 - }, + Popup = new GridEditingPopupDto() { Title = TenantManagementPermissions.Tenants.Default, Width = 900, Height = 450 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -212,658 +268,375 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #region Tenants Fields await _listFormFieldRepository.InsertManyAsync( - [ - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 500, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Name", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "OrganizationName", - Width = 200, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Founder", - Width = 200, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "VknTckn", - Width = 100, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "TaxOffice", - Width = 150, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Country", - Width = 100, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.CountryValues, - CascadeEmptyFields = "City,District,Street" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "City", - Width = 100, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.CityValues, - CascadeRelationField = "Country", - CascadeFilterOperator="=", - CascadeParentFields = "Country", - CascadeEmptyFields = "District,Street" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "District", - Width = 100, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.DistrictValues, - CascadeRelationField = "City", - CascadeFilterOperator="=", - CascadeParentFields = "Country,City", - CascadeEmptyFields = "Street", - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Street", - Width = 100, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.StreetValues, - CascadeRelationField = "District", - CascadeFilterOperator="=", - CascadeParentFields = "Country,City,District" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Address1", - Width = 150, - ListOrderNo = 11, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Address2", - Width = 150, - ListOrderNo = 12, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "PostalCode", - Width = 100, - ListOrderNo = 13, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Email", - Width = 170, - ListOrderNo = 14, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Website", - Width = 170, - ListOrderNo = 15, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Mobile", - Width = 100, - ListOrderNo = 16, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Phone", - Width = 100, - ListOrderNo = 17, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Fax", - Width = 100, - ListOrderNo = 18, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsActive", - Width = 100, - ListOrderNo = 19, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormTenants.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "MenuGroup", - Width = 100, - ListOrderNo = 20, - Visible = true, - IsActive = true, - IsDeleted = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Kurs", Name="Kurs" }, - new () { Key="Erp", Name="Erp" }, - }), - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = TenantManagementPermissions.Tenants.Create, - R = TenantManagementPermissions.Tenants.Default, - U = TenantManagementPermissions.Tenants.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); + [ + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 500, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 100, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "OrganizationName", + Width = 200, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Founder", + Width = 200, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "VknTckn", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "TaxOffice", + Width = 150, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Country", + Width = 100, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.CountryValues, + CascadeEmptyFields = "City,District,Street" + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "City", + Width = 100, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.CityValues, + CascadeRelationField = "Country", + CascadeFilterOperator="=", + CascadeParentFields = "Country", + CascadeEmptyFields = "District,Street" + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "District", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.DistrictValues, + CascadeRelationField = "City", + CascadeFilterOperator="=", + CascadeParentFields = "Country,City", + CascadeEmptyFields = "Street", + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Street", + Width = 100, + ListOrderNo = 10, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.StreetValues, + CascadeRelationField = "District", + CascadeFilterOperator="=", + CascadeParentFields = "Country,City,District" + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Address1", + Width = 150, + ListOrderNo = 11, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Address2", + Width = 150, + ListOrderNo = 12, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "PostalCode", + Width = 100, + ListOrderNo = 13, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Email", + Width = 170, + ListOrderNo = 14, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Website", + Width = 170, + ListOrderNo = 15, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Mobile", + Width = 100, + ListOrderNo = 16, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Phone", + Width = 100, + ListOrderNo = 17, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Fax", + Width = 100, + ListOrderNo = 18, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 100, + ListOrderNo = 19, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormTenants.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "MenuGroup", + Width = 100, + ListOrderNo = 20, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key="Kurs", Name="Kurs" }, + new () { Key="Erp", Name="Erp" }, + }), + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(TenantManagementPermissions.Tenants.Create, TenantManagementPermissions.Tenants.Default, TenantManagementPermissions.Tenants.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } @@ -877,7 +650,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Branch, Name = AppCodes.Branches, @@ -893,67 +666,17 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - D = AppCodes.Branches + ".Delete", - E = AppCodes.Branches + ".Export", - I = AppCodes.Branches + ".Import", - A = AppCodes.Branches + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Branches), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Branch Form", - Width = 900, - Height = 450 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Branches, Width = 900, Height = 450 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -1041,628 +764,356 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #region Branches Fields await _listFormFieldRepository.InsertManyAsync( - [ - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 500, - ListOrderNo = 0, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + [ + new ListFormField { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "TenantId", - Width = 200, - ListOrderNo = 1, - Visible = true, - IsActive = true, - IsDeleted = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.TenantValues, - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Name", - Width = 200, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "VknTckn", - Width = 100, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "TaxOffice", - Width = 150, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - - - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Country", - Width = 100, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.CountryValues, - CascadeEmptyFields = "City,District,Street" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "City", - Width = 100, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.CityValues, - CascadeRelationField = "Country", - CascadeFilterOperator="=", - CascadeParentFields = "Country", - CascadeEmptyFields = "District,Street" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "District", - Width = 100, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.DistrictValues, - CascadeRelationField = "City", - CascadeFilterOperator="=", - CascadeParentFields = "Country,City", - CascadeEmptyFields = "Street", - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Street", - Width = 100, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.StreetValues, - CascadeRelationField = "District", - CascadeFilterOperator="=", - CascadeParentFields = "Country,City,District" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Address1", - Width = 150, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Address2", - Width = 150, - ListOrderNo = 11, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "PostalCode", - Width = 100, - ListOrderNo = 12, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Email", - Width = 170, - ListOrderNo = 13, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Website", - Width = 170, - ListOrderNo = 14, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Mobile", - Width = 100, - ListOrderNo = 15, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Phone", - Width = 100, - ListOrderNo = 16, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Fax", - Width = 100, - ListOrderNo = 17, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormBranches.ListFormCode, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsActive", - Width = 100, - ListOrderNo = 18, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Branches + ".Create", - R = AppCodes.Branches, - U = AppCodes.Branches + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 500, + ListOrderNo = 0, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "TenantId", + Width = 200, + ListOrderNo = 1, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.TenantValues, + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Code", + Width = 100, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 200, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "VknTckn", + Width = 100, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "TaxOffice", + Width = 150, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Country", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.CountryValues, + CascadeEmptyFields = "City,District,Street" + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "City", + Width = 100, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.CityValues, + CascadeRelationField = "Country", + CascadeFilterOperator="=", + CascadeParentFields = "Country", + CascadeEmptyFields = "District,Street" + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "District", + Width = 100, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.DistrictValues, + CascadeRelationField = "City", + CascadeFilterOperator="=", + CascadeParentFields = "Country,City", + CascadeEmptyFields = "Street", + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Street", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto + { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.StreetValues, + CascadeRelationField = "District", + CascadeFilterOperator="=", + CascadeParentFields = "Country,City,District" + }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Address1", + Width = 150, + ListOrderNo = 10, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Address2", + Width = 150, + ListOrderNo = 11, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "PostalCode", + Width = 100, + ListOrderNo = 12, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Email", + Width = 170, + ListOrderNo = 13, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Website", + Width = 170, + ListOrderNo = 14, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Mobile", + Width = 100, + ListOrderNo = 15, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Phone", + Width = 100, + ListOrderNo = 16, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Fax", + Width = 100, + ListOrderNo = 17, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormBranches.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 100, + ListOrderNo = 18, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Branches), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -1675,7 +1126,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.PermissionGroup, Name = AbpIdentity.PermissionGroups.Default, @@ -1690,67 +1141,17 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AbpIdentity.PermissionGroups.Create, - R = AbpIdentity.PermissionGroups.Default, - U = AbpIdentity.PermissionGroups.Update, - D = AbpIdentity.PermissionGroups.Delete, - E = AbpIdentity.PermissionGroups.Export, - I = AbpIdentity.PermissionGroups.Import, - A = AbpIdentity.PermissionGroups.Activity, - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + 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 = "Permissio Groups Form", - Width = 800, - Height = 350 - }, + Popup = new GridEditingPopupDto() { Title = AbpIdentity.PermissionGroups.Default, Width = 800, Height = 350 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -1781,8 +1182,6 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new() { ListFormCode = listFormPermissionGroups.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, FieldName = "Id", @@ -1791,28 +1190,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.PermissionGroups.Create, - R = AbpIdentity.PermissionGroups.Default, - U = AbpIdentity.PermissionGroups.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPermissionGroups.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", @@ -1822,28 +1205,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.PermissionGroups.Create, - R = AbpIdentity.PermissionGroups.Default, - U = AbpIdentity.PermissionGroups.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPermissionGroups.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "DisplayName", @@ -1853,28 +1220,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.PermissionGroups.Create, - R = AbpIdentity.PermissionGroups.Default, - U = AbpIdentity.PermissionGroups.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPermissionGroups.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "ExtraProperties", @@ -1884,23 +1235,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.PermissionGroups.Create, - R = AbpIdentity.PermissionGroups.Default, - U = AbpIdentity.PermissionGroups.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.PermissionGroups.Create, AbpIdentity.PermissionGroups.Default, AbpIdentity.PermissionGroups.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -1915,15 +1252,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() - { - Grid = true, - Card = true, - Pivot = true, - Chart = true, - DefaultLayout = "grid", - CardLayoutColumn = 4 - }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Permission, Name = AbpIdentity.Permissions.Default, @@ -1938,62 +1267,16 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - D = AbpIdentity.Permissions.Delete, - E = AbpIdentity.Permissions.Export, - I = AbpIdentity.Permissions.Import, - A = AbpIdentity.Permissions.Activity - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + 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 = "Permission Form", - Width = 800, - Height = 350 - }, + Popup = new GridEditingPopupDto() { Title = AbpIdentity.Permissions.Default, Width = 800, Height = 350 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -2030,11 +1313,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #region Permission Fields await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { + new() { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, FieldName = "Id", @@ -2043,29 +1323,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, - new ListFormField - { + new() { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "GroupName", @@ -2083,32 +1346,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = $"SELECT \"AbpPermissions\".\"GroupName\" AS \"Key\", \"AbpPermissions\".\"GroupName\" as \"Name\" FROM \"AbpPermissions\" GROUP BY \"AbpPermissions\".\"GroupName\" ORDER BY \"AbpPermissions\".\"GroupName\"", }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, - new ListFormField - { + new() { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "ParentName", @@ -2118,29 +1362,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", @@ -2150,29 +1378,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "DisplayName", @@ -2183,38 +1395,19 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsDeleted = false, AllowSearch = false, LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Boolean, FieldName = "IsEnabled", @@ -2223,29 +1416,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Int16, FieldName = "MultiTenancySide", @@ -2266,29 +1443,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key=3,Name="Both" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormPermissions.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "MenuGroup", @@ -2307,23 +1468,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Erp",Name="Erp" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AbpIdentity.Permissions.Create, - R = AbpIdentity.Permissions.Default, - U = AbpIdentity.Permissions.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AbpIdentity.Permissions.Create, AbpIdentity.Permissions.Default, AbpIdentity.Permissions.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -2338,15 +1485,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() - { - Grid = true, - Card = false, - Pivot = false, - Chart = false, - DefaultLayout = "grid", - CardLayoutColumn = 4 - }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Role, Name = PlatformConsts.IdentityPermissions.Roles.Default, @@ -2361,68 +1500,27 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = PlatformConsts.IdentityPermissions.Roles.Create, - R = PlatformConsts.IdentityPermissions.Roles.Default, - U = PlatformConsts.IdentityPermissions.Roles.Update, - D = PlatformConsts.IdentityPermissions.Roles.Delete, - E = PlatformConsts.IdentityPermissions.Roles.Default + ".Export", - I = PlatformConsts.IdentityPermissions.Roles.Default + ".Import", - A = PlatformConsts.IdentityPermissions.Roles.Default + ".Activity", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + 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 = "Role Form", - Width = 500, - Height = 300 - }, + Popup = new GridEditingPopupDto() { Title = PlatformConsts.IdentityPermissions.Roles.Default, Width = 500, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, SendOnlyChangedFormValuesUpdate = false, }), EditingFormJson = JsonSerializer.Serialize(new List() { - //Items=["Name","IsDefault","IsPublic"] } - new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items= - [ + 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, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, new EditingFormItemDto { Order = 3, DataField = "IsPublic", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - ] - } + ]} }), DeleteCommand = "DELETE FROM \"AbpRoles\" WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -2461,108 +1559,61 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ); #region Roles Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] - { - new ListFormField - { - ListFormCode = listFormRoles.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Name", - Width = 400, - ListOrderNo = 1, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Roles.Create, - R = PlatformConsts.IdentityPermissions.Roles.Default, - U = PlatformConsts.IdentityPermissions.Roles.Update, - E = true, - I = true, - Deny = false , - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormRoles.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsDefault", - Width = 85, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Roles.Create, - R = PlatformConsts.IdentityPermissions.Roles.Default, - U = PlatformConsts.IdentityPermissions.Roles.Update, - E = true, - I = true, - Deny = false , - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormRoles.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsPublic", - Width = 85, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Roles.Create, - R = PlatformConsts.IdentityPermissions.Roles.Default, - U = PlatformConsts.IdentityPermissions.Roles.Update, - E = true, - I = true, - Deny = false , - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - }); + await _listFormFieldRepository.InsertManyAsync( + [ + new() { + ListFormCode = listFormRoles.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 400, + ListOrderNo = 1, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormRoles.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsDefault", + Width = 85, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormRoles.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsPublic", + Width = 85, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Roles.Create, PlatformConsts.IdentityPermissions.Roles.Default, PlatformConsts.IdentityPermissions.Roles.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -2575,15 +1626,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() - { - Grid = true, - Card = false, - Pivot = false, - Chart = false, - DefaultLayout = "grid", - CardLayoutColumn = 4 - }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.User, Name = PlatformConsts.IdentityPermissions.Users.Default, @@ -2599,67 +1642,29 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - D = PlatformConsts.IdentityPermissions.Users.Delete, - E = PlatformConsts.IdentityPermissions.Users.Export, - I = PlatformConsts.IdentityPermissions.Users.Import, - A = PlatformConsts.IdentityPermissions.Users.Activity, - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + 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 = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new FieldsDefaultValue() { - FieldName = "DeleterId", - FieldDbType = DbType.Guid, - Value = "@USERID", - CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new FieldsDefaultValue() { - FieldName = "Id", - FieldDbType = DbType.Guid, - Value = "@ID", - CustomValueType = FieldCustomValueTypeEnum.CustomKey } + new FieldsDefaultValue() { + FieldName = "DeleterId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new FieldsDefaultValue() { + FieldName = "Id", + FieldDbType = DbType.Guid, + Value = "@ID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "User Form", - Width = 500, - Height = 400 - }, + Popup = new GridEditingPopupDto() { Title = PlatformConsts.IdentityPermissions.Users.Default, Width = 500, Height = 400 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -2680,269 +1685,167 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency InsertServiceAddress = "list-form-dynamic-api/user-insert", UpdateServiceAddress = "list-form-dynamic-api/user-update", CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new CommandColumnDto() { - Hint = "Detail", - Text ="Detail", - UrlTarget="_blank", - AuthName=PlatformConsts.IdentityPermissions.Users.Update, - Url="/admin/users/detail/@Id" - }, - new CommandColumnDto() { - Hint = "Permission", - Text = "Permission", - AuthName = PlatformConsts.IdentityPermissions.Users.ManagePermissions, - DialogName = "UsersPermission", - DialogParameters = JsonSerializer.Serialize(new { - name = "@Email", - id = "@Id" - }) - }, + new CommandColumnDto() { + Hint = "Detail", + Text ="Detail", + UrlTarget="_blank", + AuthName=PlatformConsts.IdentityPermissions.Users.Update, + Url="/admin/users/detail/@Id" + }, + new CommandColumnDto() { + Hint = "Permission", + Text = "Permission", + AuthName = PlatformConsts.IdentityPermissions.Users.ManagePermissions, + DialogName = "UsersPermission", + DialogParameters = JsonSerializer.Serialize(new { + name = "@Email", + id = "@Id" + }) + }, }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new FieldsDefaultValue() { - FieldName = "IsActive", - FieldDbType = DbType.Boolean, - Value = "true", - CustomValueType = FieldCustomValueTypeEnum.Value } - }) + new FieldsDefaultValue() { + FieldName = "IsActive", + FieldDbType = DbType.Boolean, + Value = "true", + CustomValueType = FieldCustomValueTypeEnum.Value } + }) } - ); + ); #region Users Fields await _listFormFieldRepository.InsertManyAsync( [ new ListFormField - { - ListFormCode = listFormUsers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 125, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + ListFormCode = listFormUsers.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 125, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormUsers.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Email", + Width = 250, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - AllowReordering = true, + new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) }, + new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormUsers.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 150, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormUsers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Email", - Width = 250, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] + ListFormCode = listFormUsers.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Surname", + Width = 150, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) }, - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ListFormCode = listFormUsers.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "PhoneNumber", + Width = 150, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormUsers.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormUsers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Name", - Width = 150, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormUsers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Surname", - Width = 150, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormUsers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "PhoneNumber", - Width = 150, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormUsers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsActive", - Width = 100, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormUsers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Password", - Width = 100, - ListOrderNo = 7, - Visible = false, - IsActive = false, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = PlatformConsts.IdentityPermissions.Users.Create, - R = PlatformConsts.IdentityPermissions.Users.Default, - U = PlatformConsts.IdentityPermissions.Users.Update, - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = false - }) - }, + ListFormCode = listFormUsers.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Password", + Width = 100, + ListOrderNo = 7, + Visible = false, + IsActive = false, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(PlatformConsts.IdentityPermissions.Users.Create, PlatformConsts.IdentityPermissions.Users.Default, PlatformConsts.IdentityPermissions.Users.Update, true, true, false), + PivotSettingsJson = DefaultPivotSettingsJson + }, ]); #endregion } @@ -2956,7 +1859,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Language, Name = AppCodes.Languages.Language, @@ -2972,46 +1875,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Languages.Language + ".Create", - R = AppCodes.Languages.Language, - U = AppCodes.Languages.Language + ".Update", - D = AppCodes.Languages.Language + ".Delete", - E = AppCodes.Languages.Language + ".Export", - I = AppCodes.Languages.Language + ".Import", - A = AppCodes.Languages.Language + ".Activity", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Languages.Language), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Language))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -3025,27 +1895,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Language Form", - Width = 600, - Height = 300 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Languages.Language, Width = 600, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -3102,8 +1955,6 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new ListFormField { ListFormCode = listFormLanguages.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, FieldName = "Id", @@ -3113,32 +1964,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Languages.Language + ".Create", - R = AppCodes.Languages.Language, - U = AppCodes.Languages.Language + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormLanguages.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "CultureName", @@ -3150,32 +1983,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Languages.Language + ".Create", - R = AppCodes.Languages.Language, - U = AppCodes.Languages.Language + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormLanguages.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "UiCultureName", @@ -3185,32 +2000,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Languages.Language + ".Create", - R = AppCodes.Languages.Language, - U = AppCodes.Languages.Language + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormLanguages.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "DisplayName", @@ -3220,32 +2017,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Languages.Language + ".Create", - R = AppCodes.Languages.Language, - U = AppCodes.Languages.Language + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listFormLanguages.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Boolean, FieldName = "IsEnabled", @@ -3254,23 +2033,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Languages.Language + ".Create", - R = AppCodes.Languages.Language, - U = AppCodes.Languages.Language + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.Language), + PivotSettingsJson = DefaultPivotSettingsJson }, }); @@ -3286,7 +2051,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.LanguageText, Name = AppCodes.Languages.LanguageText, @@ -3302,46 +2067,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Languages.LanguageText + ".Create", - R = AppCodes.Languages.LanguageText, - U = AppCodes.Languages.LanguageText + ".Update", - D = AppCodes.Languages.LanguageText + ".Delete", - E = AppCodes.Languages.LanguageText + ".Export", - I = AppCodes.Languages.LanguageText + ".Import", - A = AppCodes.Languages.LanguageText + ".Activity" - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Languages.LanguageText), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.LanguageText))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -3355,27 +2087,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "LanguageText Form", - Width = 800, - Height = 300 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Languages.LanguageText, Width = 800, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -3414,206 +2129,114 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #region LanguageText Fields await _listFormFieldRepository.InsertManyAsync([ new ListFormField - { - ListFormCode = listFormLanguageTexts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ListFormCode = listFormLanguageTexts.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + SortIndex = 0, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.LanguageText), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Languages.LanguageText + ".Create", - R = AppCodes.Languages.LanguageText, - U = AppCodes.Languages.LanguageText + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormLanguageTexts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "CultureName", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { + ListFormCode = listFormLanguageTexts.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "CultureName", + Width = 100, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.CultureValues - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.CultureValues + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.LanguageText), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormLanguageTexts.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ResourceName", + Width = 150, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + LookupJson = JsonSerializer.Serialize(new LookupDto { - AllowReordering = true, + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new() { Key="AbpAccount",Name="AbpAccount" }, + new() { Key="Platform",Name="Platform" }, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.LanguageText), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Languages.LanguageText + ".Create", - R = AppCodes.Languages.LanguageText, - U = AppCodes.Languages.LanguageText + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormLanguageTexts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ResourceName", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key="AbpAccount",Name="AbpAccount" }, - new() { Key="Platform",Name="Platform" }, + ListFormCode = listFormLanguageTexts.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Key", + Width = 350, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.LanguageKeyValues }), - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.LanguageText), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Languages.LanguageText + ".Create", - R = AppCodes.Languages.LanguageText, - U = AppCodes.Languages.LanguageText + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormLanguageTexts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Key", - Width = 350, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.LanguageKeyValues - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Languages.LanguageText + ".Create", - R = AppCodes.Languages.LanguageText, - U = AppCodes.Languages.LanguageText + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormLanguageTexts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Value", - Width = 350, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Languages.LanguageText + ".Create", - R = AppCodes.Languages.LanguageText, - U = AppCodes.Languages.LanguageText + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); + ListFormCode = listFormLanguageTexts.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Value", + Width = 350, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Languages.LanguageText), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } @@ -3623,131 +2246,73 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Menu)) { var listFormMenus = await _listFormRepository.InsertAsync( - new ListForm() - { - ListFormType = ListFormTypeEnum.List, - IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() + new ListForm() { - Grid = true, - Card = true, - Pivot = true, - Chart = true, - DefaultLayout = "grid", - CardLayoutColumn = 4 - }), - CultureName = LanguageCodes.En, - ListFormCode = ListFormCodes.Lists.Menu, - Name = AppCodes.Menus.Menu, - Title = AppCodes.Menus.Menu, - DataSourceCode = SeedConsts.DataSources.DefaultCode, - IsTenant = false, - IsBranch = false, - IsOrganizationUnit = false, - Description = AppCodes.Menus.Menu, - SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu)), - KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, - DefaultFilter = "\"IsDeleted\" = 'false'", - SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - D = AppCodes.Menus.Menu + ".Delete", - E = AppCodes.Menus.Menu + ".Export", - I = AppCodes.Menus.Menu + ".Import", - A = AppCodes.Menus.Menu + ".Activity", - }), - DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() { - FieldName = "DeleterId", - FieldDbType = DbType.Guid, - Value = "@USERID", - CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() { - FieldName = "Id", - FieldDbType = DbType.Guid, - Value = "@ID", - CustomValueType = FieldCustomValueTypeEnum.CustomKey } - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = DefaultLayoutJson, + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Menu, + Name = AppCodes.Menus.Menu, + Title = AppCodes.Menus.Menu, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = false, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Menus.Menu, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu)), + KeyFieldName = "Id", + KeyFieldDbSourceType = DbType.Guid, + DefaultFilter = "\"IsDeleted\" = 'false'", + SortMode = GridOptions.SortModeSingle, + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Menus.Menu), + DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "DeleterId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "Id", + FieldDbType = DbType.Guid, + Value = "@ID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey } + }), + PagerOptionJson = DefaultPagerOptionJson, + EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Title = "Menu Form", - Width = 800, - Height = 500 - }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = 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 = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, - new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - ] - } - }), - InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + Popup = new GridEditingPopupDto() { Title = AppCodes.Menus.Menu, Width = 800, Height = 500 }, + AllowDeleting = true, + AllowAdding = true, + AllowUpdating = true, + SendOnlyChangedFormValuesUpdate = 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 = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + new EditingFormItemDto { Order = 4, DataField = "Url", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "Icon", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "ParentCode", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 7, DataField = "CssClass", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 8, DataField = "RequiredPermissionName", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 9, DataField = "Target", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 10, DataField = "IsDisabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 11, DataField = "ElementId", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, @@ -3763,433 +2328,232 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency FieldDbType = DbType.Boolean, Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value } - }), - FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new FieldsDefaultValue() { - FieldName = "IsDisabled", - FieldDbType = DbType.Boolean, - Value = "false", - CustomValueType = FieldCustomValueTypeEnum.Value } - }) - } - ); + }), + FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new FieldsDefaultValue() { + FieldName = "IsDisabled", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }) + } + ); #region Menu Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, + await _listFormFieldRepository.InsertManyAsync([ + new ListFormField + { + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Code", + Width = 300, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DisplayName", + Width = 300, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.LanguageKeyValues }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "Order", + Width = 50, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 300, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Url", + Width = 250, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Icon", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ParentCode", + Width = 200, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.MenuCodeValues }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "CssClass", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DisplayName", - Width = 300, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.LanguageKeyValues - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "RequiredPermissionName", + Width = 200, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.PermissionNameValues }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Target", + Width = 100, + ListOrderNo = 10, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "Order", - Width = 50, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsDisabled", + Width = 100, + ListOrderNo = 11, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Url", - Width = 250, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Icon", - Width = 100, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ParentCode", - Width = 200, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = $"SELECT \"Code\" AS \"Key\", \"DisplayName\" AS \"Name\" FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu))}\" WHERE \"IsDeleted\" = 'false' AND \"IsDisabled\" = 'false' ORDER BY \"ParentCode\", \"Order\"" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "CssClass", - Width = 100, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "RequiredPermissionName", - Width = 200, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = $"SELECT \"Name\" AS \"Key\", CONCAT(\"Name\", ' (', \"DisplayName\", ')') AS \"Name\" FROM \"AbpPermissions\" WHERE \"IsEnabled\" = 'true' ORDER BY \"Name\"" - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Target", - Width = 100, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsDisabled", - Width = 100, - ListOrderNo = 11, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormMenus.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ElementId", - Width = 100, - ListOrderNo = 12, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Menus.Menu + ".Create", - R = AppCodes.Menus.Menu, - U = AppCodes.Menus.Menu + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - }); + ListFormCode = listFormMenus.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ElementId", + Width = 100, + ListOrderNo = 12, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Menus.Menu), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } @@ -4203,7 +2567,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Listform, Name = AppCodes.Listforms.Listform, @@ -4219,38 +2583,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeMultiple, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true, - ApplyFilter = GridOptions.FilterRowApplyFilterAuto - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - AllowSelectAll = true, - Mode = GridOptions.SelectionModeMultiple, - SelectAllMode = GridOptions.SelectionAllModeAllPages - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true, ApplyFilter = GridOptions.FilterRowApplyFilterAuto }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionMultipleJson, + ColumnOptionJson = DefaultColumnOptionJson, DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.ListForm)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { @@ -4264,76 +2602,44 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - D = AppCodes.Listforms.Listform + ".Delete", - E = AppCodes.Listforms.Listform + ".Export", - I = AppCodes.Listforms.Listform + ".Import", - A = AppCodes.Listforms.Listform + ".Activity", - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PermissionJson = DefaultPermissionJson(AppCodes.Listforms.Listform), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "ListForms Form", - Width = 800, - Height = 500 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Listforms.Listform, Width = 800, Height = 500 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, SendOnlyChangedFormValuesUpdate = false, }), EditingFormJson = JsonSerializer.Serialize(new List() { - //Items=["CultureName","Name","Description","ListFormCode","SelectCommandType","SelectCommand","TableName","KeyFieldName", - //"KeyFieldDbSourceType","Title","SortMode","PermissionJson","DeleteServiceAddress","InsertServiceAddress","UpdateServiceAddress"] }, - 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, IsRequired = false, 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 11, DataField = "Title", ColSpan = 2, IsRequired = false, 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 14, DataField = "InsertServiceAddress", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 15, DataField = "UpdateServiceAddress", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 16, DataField = "IsTenant", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 17, DataField = "IsOrganizationUnit", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 18, DataField = "IsSubForm", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - ] - }, - new() { Order=2,ColCount=1,ColSpan=2,ItemType="group", Items= - [ - new EditingFormItemDto { Order = 1, DataField = "PermissionJson:C", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "PermissionJson:R", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "PermissionJson:U", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 4, DataField = "PermissionJson:D", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - ] - } - + 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, IsRequired = false, 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 11, DataField = "Title", ColSpan = 2, IsRequired = false, 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 14, DataField = "InsertServiceAddress", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 15, DataField = "UpdateServiceAddress", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 16, DataField = "IsTenant", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 17, DataField = "IsOrganizationUnit", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 18, DataField = "IsSubForm", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + ]}, + new() { + Order=2,ColCount=1,ColSpan=2,ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "PermissionJson:C", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "PermissionJson:R", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "PermissionJson:U", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "PermissionJson:D", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { @@ -4421,18 +2727,15 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = GridOptions.SortModeNone, CustomValueType = FieldCustomValueTypeEnum.Value }, }), - } ); #region ListForms Fields await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { + new ListFormField + { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "CultureName", @@ -4465,47 +2768,23 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new ColumnsHeaderDataSourceDto { Text = LanguageNames.Zh, Value = new List { "CultureName", "=", LanguageCodes.Zh } }, } }), - //ColumnHeaderJson = "{\"AllowHeaderFiltering\":true, \"DataSource\":[{ \"Text\": \"English\", \"Value\":[\"CultureName\", \"=\", \"en\"]}, { \"Text\": \"Türkçe\", \"Value\": [\"CultureName\", \"=\", \"tr\"]}, { \"Text\": \"Spanish\", \"Value\": [\"CultureName\", \"=\", \"sp\"] }] }", AllowSearch = true, - ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto - { - SelectedFilterOperation = "=", - FilterValue = "en" - }), + ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto { SelectedFilterOperation = "=", FilterValue = "en" }), LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", LookupQuery = LookupQueryValues.CultureValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Name", @@ -4514,32 +2793,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Description", @@ -4548,29 +2809,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "ListFormCode", @@ -4581,32 +2826,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsDeleted = false, SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "ListFormType", @@ -4615,9 +2842,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - + LookupJson = JsonSerializer.Serialize(new LookupDto{ DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -4627,32 +2852,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { Key=ListFormTypeEnum.Chart, Name=ListFormTypeEnum.Chart.ToString() }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Int32, FieldName = "SelectCommandType", @@ -4661,9 +2868,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - + LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -4675,32 +2880,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { Key=SelectCommandTypeEnum.StoredProcedure,Name=SelectCommandTypeEnum.StoredProcedure.ToString() }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "SelectCommand", @@ -4709,32 +2896,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "TableName", @@ -4743,29 +2912,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "KeyFieldName", @@ -4774,32 +2927,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Int32, FieldName = "KeyFieldDbSourceType", @@ -4808,12 +2943,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - LookupJson = JsonSerializer.Serialize(new LookupDto - { - + ValidationRuleJson = DefaultValidationRuleRequiredJson, + LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -4847,29 +2978,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { Key=DbType.DateTimeOffset,Name=DbType.DateTimeOffset.ToString() }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Title", @@ -4878,29 +2993,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "SortMode", @@ -4909,9 +3008,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - + LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -4921,29 +3018,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { Key=GridOptions.SortModeMultiple,Name=GridOptions.SortModeMultiple }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Boolean, FieldName = "IsTenant", @@ -4952,29 +3033,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Boolean, FieldName = "IsOrganizationUnit", @@ -4983,29 +3048,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Boolean, FieldName = "IsSubForm", @@ -5014,29 +3063,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "PermissionJson", @@ -5045,29 +3078,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "DeleteServiceAddress", @@ -5076,29 +3093,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "InsertServiceAddress", @@ -5107,29 +3108,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { ListFormCode = listForms.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "UpdateServiceAddress", @@ -5138,23 +3123,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Listform + ".Create", - R = AppCodes.Listforms.Listform, - U = AppCodes.Listforms.Listform + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.Listform), + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -5169,7 +3140,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.SettingDefinition, Name = AppCodes.Settings.SettingDefinitions, @@ -5185,46 +3156,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - D = AppCodes.Settings.SettingDefinitions + ".Delete", - E = AppCodes.Settings.SettingDefinitions + ".Export", - I = AppCodes.Settings.SettingDefinitions + ".Import", - A = AppCodes.Settings.SettingDefinitions + ".Activity" - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Settings.SettingDefinitions), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.SettingDefinition)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { @@ -5238,53 +3176,32 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "SettingDefinition Form", - Width = 800, - Height = 400 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Settings.SettingDefinitions, Width = 800, Height = 400 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, SendOnlyChangedFormValuesUpdate = false, }), EditingFormJson = JsonSerializer.Serialize(new List() { - //Items=["MainGroupKey","SubGroupKey","Code","NameKey","DescriptionKey","DefaultValue","IsVisibleToClients","Providers", - //"IsInherited","IsEncrypted","RequiredPermissionName","DataType","SelectOptions","Order"] }, - new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= - [ - new EditingFormItemDto { Order = 1, DataField = "MainGroupKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 2, DataField = "SubGroupKey", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, 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.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 5, DataField = "DescriptionKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 6, DataField = "DefaultValue", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 7, DataField = "IsVisibleToClients", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 8, DataField = "Providers", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 9, DataField = "IsInherited", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 10, DataField = "IsEncrypted", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - new EditingFormItemDto { Order = 11, DataField = "RequiredPermissionName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, - ] - } + new() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= [ + new EditingFormItemDto { Order = 1, DataField = "MainGroupKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 2, DataField = "SubGroupKey", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, 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.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 5, DataField = "DescriptionKey", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 6, DataField = "DefaultValue", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 7, DataField = "IsVisibleToClients", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 8, DataField = "Providers", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 9, DataField = "IsInherited", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 10, DataField = "IsEncrypted", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + new EditingFormItemDto { Order = 11, DataField = "RequiredPermissionName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 14, DataField = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -5324,580 +3241,309 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ); #region SettingDefinition Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + await _listFormFieldRepository.InsertManyAsync([ + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Code", + Width = 400, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "MainGroupKey", + Width = 200, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.LanguageKeyValues + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "SubGroupKey", + Width = 200, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.LanguageKeyValues + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "Order", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "NameKey", + Width = 250, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.LanguageKeyValues + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DescriptionKey", + Width = 250, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.LanguageKeyValues + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "RequiredPermissionName", + Width = 400, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.PermissionNameValues + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Providers", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { - AllowReordering = true, + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new() { Key="U", Name="User" }, + new() { Key="T", Name="Tenant"}, + new() { Key="G", Name="Global"}, + new() { Key="C", Name="Configuration"}, + new() { Key="D", Name="Default"}, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DefaultValue", + Width = 100, + ListOrderNo = 10, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 400, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DataType", + Width = 100, + ListOrderNo = 11, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { - AllowReordering = true, + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new() { Key="Bool", Name="Bool" }, + new() { Key="Number", Name="Number"}, + new() { Key="Text", Name="Text"}, + new() { Key="Memo", Name="Memo"}, + new() { Key="List", Name="List"}, + }) }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "SelectOptions", + Width = 100, + ListOrderNo = 12, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "MainGroupKey", - Width = 200, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.LanguageKeyValues - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsVisibleToClients", + Width = 150, + ListOrderNo = 13, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsInherited", + Width = 100, + ListOrderNo = 14, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "SubGroupKey", - Width = 200, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.LanguageKeyValues - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "Order", - Width = 100, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "NameKey", - Width = 250, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.LanguageKeyValues - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DescriptionKey", - Width = 250, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.LanguageKeyValues - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "RequiredPermissionName", - Width = 400, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = $"SELECT \"Name\" AS \"Key\", CONCAT(\"Name\", ' (', \"DisplayName\", ')') AS \"Name\" FROM \"AbpPermissions\" WHERE \"IsEnabled\" = 'true' ORDER BY \"Name\"" - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Providers", - Width = 100, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key="U", Name="User" }, - new() { Key="T", Name="Tenant"}, - new() { Key="G", Name="Global"}, - new() { Key="C", Name="Configuration"}, - new() { Key="D", Name="Default"}, - }), - - //TODO: Tasi grid editingform - // EditorTemplateTagBox = new EditorTagBoxDto() - // { - // ApplyValueMode = "useButtons", - // SearchEnabled = true, - // MaxDisplayedTags = 3 - // } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DefaultValue", - Width = 100, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DataType", - Width = 100, - ListOrderNo = 11, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key="Bool", Name="Bool" }, - new() { Key="Number", Name="Number"}, - new() { Key="Text", Name="Text"}, - new() { Key="Memo", Name="Memo"}, - new() { Key="List", Name="List"}, - }) - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "SelectOptions", - Width = 100, - ListOrderNo = 12, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsVisibleToClients", - Width = 150, - ListOrderNo = 13, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsInherited", - Width = 100, - ListOrderNo = 14, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormSettingDefinitions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsEncrypted", - Width = 100, - ListOrderNo = 15, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.SettingDefinitions + ".Create", - R = AppCodes.Settings.SettingDefinitions, - U = AppCodes.Settings.SettingDefinitions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - }); + ListFormCode = listFormSettingDefinitions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsEncrypted", + Width = 100, + ListOrderNo = 15, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.SettingDefinitions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -5910,7 +3556,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.DataSource, Name = AppCodes.Listforms.DataSource, @@ -5926,46 +3572,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Listforms.DataSource + ".Create", - R = AppCodes.Listforms.DataSource, - U = AppCodes.Listforms.DataSource + ".Update", - D = AppCodes.Listforms.DataSource + ".Delete", - E = AppCodes.Listforms.DataSource + ".Export", - I = AppCodes.Listforms.DataSource + ".Import", - A = AppCodes.Listforms.DataSource + ".Activity", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Listforms.DataSource), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.DataSource)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new FieldsDefaultValue() { @@ -5979,27 +3592,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Data Source Form", - Width = 800, - Height = 500 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Listforms.DataSource, Width = 800, Height = 500 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -6030,151 +3626,82 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ); #region Data Source Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { - ListFormCode = listFormDataSources.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, + await _listFormFieldRepository.InsertManyAsync([ + new ListFormField + { + ListFormCode = listFormDataSources.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.DataSource), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormDataSources.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Code", + Width = 300, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.DataSource), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new ListFormField + { + ListFormCode = listFormDataSources.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "DataSourceType", + Width = 300, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new() { Key = 1, Name = "Mssql" }, + new() { Key = 2, Name = "Postgresql" }, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.DataSource + ".Create", - R = AppCodes.Listforms.DataSource, - U = AppCodes.Listforms.DataSource + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormDataSources.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Code", - Width = 300, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.DataSource + ".Create", - R = AppCodes.Listforms.DataSource, - U = AppCodes.Listforms.DataSource + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormDataSources.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "DataSourceType", - Width = 300, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key = 1, Name = "Mssql" }, - new() { Key = 2, Name = "Postgresql" }, - }), - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.DataSource + ".Create", - R = AppCodes.Listforms.DataSource, - U = AppCodes.Listforms.DataSource + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormDataSources.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ConnectionString", - Width = 250, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.DataSource + ".Create", - R = AppCodes.Listforms.DataSource, - U = AppCodes.Listforms.DataSource + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - }); + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.DataSource), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormDataSources.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ConnectionString", + Width = 250, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Listforms.DataSource), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -6190,7 +3717,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.BackgroundWorker, Name = AppCodes.BackgroundWorkers, @@ -6206,36 +3733,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new() { ButtonPosition= UiCommandButtonPositionTypeEnum.Toolbar, @@ -6259,16 +3762,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency OnClick="UiEvalService.ApiGenerateBackgroundWorkers();" }, }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - D = AppCodes.BackgroundWorkers + ".Delete", - E = AppCodes.BackgroundWorkers + ".Export", - I = AppCodes.BackgroundWorkers + ".Import", - A = AppCodes.BackgroundWorkers + ".Activity", - }), + PermissionJson = DefaultPermissionJson(AppCodes.BackgroundWorkers), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.BackgroundWorker)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -6282,51 +3776,31 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Background Worker Form", - Width = 800, - Height = 500 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.BackgroundWorkers, Width = 800, Height = 500 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, SendOnlyChangedFormValuesUpdate = 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 5, DataField = "AfterSp", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, - ] + 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, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "AfterSp", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "IsActive", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox }, + ] }, - new() { Order=2,ColCount=1,ColSpan=2,ItemType="group",Items= - [ - new EditingFormItemDto { Order = 1, DataField = "Options:MailType", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "Options:MailSubject", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 3, DataField = "Options:MailTemplate", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, - new EditingFormItemDto { Order = 4, DataField = "Options:Tablo", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - ] - } + new() { Order=2,ColCount=1,ColSpan=2,ItemType="group",Items= [ + new EditingFormItemDto { Order = 1, DataField = "Options:MailType", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 2, DataField = "Options:MailSubject", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Options:MailTemplate", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 4, DataField = "Options:Tablo", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -6351,275 +3825,140 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ); #region Background Worker Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, + await _listFormFieldRepository.InsertManyAsync([ + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 200, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Cron", + Width = 100, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "WorkerType", + Width = 150, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new() { Key=1,Name="MailQueueWorker" }, + new() { Key=2,Name="SqlWorker" }, + new() { Key=3,Name="NotificationWorker" }, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Name", - Width = 200, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Cron", - Width = 100, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "WorkerType", - Width = 150, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key=1,Name="MailQueueWorker" }, - new() { Key=2,Name="SqlWorker" }, - new() { Key=3,Name="NotificationWorker" }, - }), - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "BeforeSp", - Width = 150, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "AfterSp", - Width = 150, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Options", - Width = 200, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormBackgroundWorkers.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsActive", - Width = 50, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BackgroundWorkers + ".Create", - R = AppCodes.BackgroundWorkers, - U = AppCodes.BackgroundWorkers + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - }); + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "BeforeSp", + Width = 150, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "AfterSp", + Width = 150, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Options", + Width = 200, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormBackgroundWorkers.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 50, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BackgroundWorkers), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -6632,7 +3971,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.NotificationRule, Name = AppCodes.Notifications.NotificationRules, @@ -6648,46 +3987,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - D = AppCodes.Notifications.NotificationRules + ".Delete", - E = AppCodes.Notifications.NotificationRules + ".Export", - I = AppCodes.Notifications.NotificationRules + ".Import", - A = AppCodes.Notifications.NotificationRules + ".Activity", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Notifications.NotificationRules), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.NotificationRule)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -6701,19 +4007,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -6787,297 +4081,163 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #region Notification Rule Fields await _listFormFieldRepository.InsertManyAsync([ new ListFormField - { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + { + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "NotificationType", + Width = 200, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.WebService, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = "GET;notification-rule/notification-types;{};a;a;null", + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "RecipientType", + Width = 200, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key="All",Name="All" }, + new () { Key="User",Name="User" }, + new () { Key="Role",Name="Role" }, + new () { Key="OrganizationUnit",Name="OrganizationUnit" }, + new () { Key="Custom",Name="Custom" }, + }), + }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "RecipientId", + Width = 200, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() + { + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Channel", + Width = 100, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { - AllowReordering = true, + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key="Sms",Name="Sms" }, + new () { Key="Mail",Name="Mail" }, + new () { Key="Rocket",Name="Rocket" }, + new () { Key="Desktop",Name="Desktop" }, + new () { Key="UiActivity",Name="UiActivity" }, + new () { Key="UiToast",Name="UiToast" }, + new () { Key="WhatsApp",Name="WhatsApp" }, + new () { Key="Telegram",Name="Telegram" }, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsActive", + Width = 85, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "NotificationType", - Width = 200, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.WebService, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = "GET;notification-rule/notification-types;{};a;a;null", - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsFixed", + Width = 85, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "RecipientType", - Width = 200, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="All",Name="All" }, - new () { Key="User",Name="User" }, - new () { Key="Role",Name="Role" }, - new () { Key="OrganizationUnit",Name="OrganizationUnit" }, - new () { Key="Custom",Name="Custom" }, - }), - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "RecipientId", - Width = 200, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Channel", - Width = 100, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Sms",Name="Sms" }, - new () { Key="Mail",Name="Mail" }, - new () { Key="Rocket",Name="Rocket" }, - new () { Key="Desktop",Name="Desktop" }, - new () { Key="UiActivity",Name="UiActivity" }, - new () { Key="UiToast",Name="UiToast" }, - new () { Key="WhatsApp",Name="WhatsApp" }, - new () { Key="Telegram",Name="Telegram" }, - }), - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsActive", - Width = 85, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsFixed", - Width = 85, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotificationRules.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsCustomized", - Width = 85, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.NotificationRules + ".Create", - R = AppCodes.Notifications.NotificationRules, - U = AppCodes.Notifications.NotificationRules + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); + ListFormCode = listFormNotificationRules.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsCustomized", + Width = 85, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.NotificationRules), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -7090,7 +4250,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Notification, Name = AppCodes.Notifications.Notification, @@ -7106,46 +4266,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - D = AppCodes.Notifications.Notification + ".Delete", - E = AppCodes.Notifications.Notification + ".Export", - I = AppCodes.Notifications.Notification + ".Import", - A = AppCodes.Notifications.Notification + ".Activity", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Notifications.Notification), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Notification)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -7159,19 +4286,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { AllowDeleting = false, @@ -7184,283 +4299,151 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #region Notification Fields await _listFormFieldRepository.InsertManyAsync([ - new ListFormField - { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + new ListFormField + { + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() + { + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "NotificationChannel", + Width = 150, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { - AllowReordering = true, + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key="Sms",Name="Sms" }, + new () { Key="Mail",Name="Mail" }, + new () { Key="Rocket",Name="Rocket" }, + new () { Key="Desktop",Name="Desktop" }, + new () { Key="UiActivity",Name="UiActivity" }, + new () { Key="UiToast",Name="UiToast" }, + new () { Key="WhatsApp",Name="WhatsApp" }, + new () { Key="Telegram",Name="Telegram" }, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "NotificationChannel", - Width = 150, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Sms",Name="Sms" }, - new () { Key="Mail",Name="Mail" }, - new () { Key="Rocket",Name="Rocket" }, - new () { Key="Desktop",Name="Desktop" }, - new () { Key="UiActivity",Name="UiActivity" }, - new () { Key="UiToast",Name="UiToast" }, - new () { Key="WhatsApp",Name="WhatsApp" }, - new () { Key="Telegram",Name="Telegram" }, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "NotificationType", + Width = 200, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.WebService, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = "GET;notification-rule/notification-types;{};a;a;null", }), - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Identifier", + Width = 250, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Message", + Width = 200, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsSent", + Width = 85, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "NotificationType", - Width = 200, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.WebService, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = "GET;notification-rule/notification-types;{};a;a;null", - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Boolean, + FieldName = "IsRead", + Width = 85, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Identifier", - Width = 250, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Message", - Width = 200, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsSent", - Width = 85, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Boolean, - FieldName = "IsRead", - Width = 85, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormNotifications.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.DateTime, - FieldName = "ReadTime", - Width = 85, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Notifications.Notification + ".Create", - R = AppCodes.Notifications.Notification, - U = AppCodes.Notifications.Notification + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); + ListFormCode = listFormNotifications.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.DateTime, + FieldName = "ReadTime", + Width = 85, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Notifications.Notification), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -7473,7 +4456,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.IpRestriction, Name = AppCodes.IdentityManagement.IpRestrictions, @@ -7489,46 +4472,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.IdentityManagement.IpRestrictions + ".Create", - R = AppCodes.IdentityManagement.IpRestrictions, - U = AppCodes.IdentityManagement.IpRestrictions + ".Update", - D = AppCodes.IdentityManagement.IpRestrictions + ".Delete", - E = AppCodes.IdentityManagement.IpRestrictions + ".Export", - I = AppCodes.IdentityManagement.IpRestrictions + ".Import", - A = AppCodes.IdentityManagement.IpRestrictions + ".Activity", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.IdentityManagement.IpRestrictions), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.IpRestriction)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -7542,40 +4492,21 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Ip Restriction Form", - Width = 800, - Height = 500 - }, + Popup = new GridEditingPopupDto() { Title = ListFormCodes.Lists.IpRestriction, Width = 800, Height = 500 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, SendOnlyChangedFormValuesUpdate = 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, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, - new EditingFormItemDto { Order = 3, DataField = "IP", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, - ] - } + 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, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton }, + new EditingFormItemDto { Order = 3, DataField = "IP", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextBox }, + ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -7595,154 +4526,86 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #region Ip Restriction Fields await _listFormFieldRepository.InsertManyAsync([ new() { - ListFormCode = listFormIpRestrictions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + ListFormCode = listFormIpRestrictions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.IpRestrictions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormIpRestrictions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ResourceType", + Width = 300, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { - AllowReordering = true, + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key="User",Name="User" }, + new () { Key="Role",Name="Role" }, + new () { Key="Global",Name="Global" }, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.IpRestrictions + ".Create", - R = AppCodes.IdentityManagement.IpRestrictions, - U = AppCodes.IdentityManagement.IpRestrictions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormIpRestrictions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ResourceType", - Width = 300, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="User",Name="User" }, - new () { Key="Role",Name="Role" }, - new () { Key="Global",Name="Global" }, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.IpRestrictions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormIpRestrictions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ResourceId", + Width = 300, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = $"SELECT \"UserName\" AS \"Key\", \"UserName\" AS \"Name\" FROM \"AbpUsers\" UNION SELECT \"Name\" AS \"Key\", \"Name\" AS \"Name\" FROM \"AbpRoles\"", }), - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.IpRestrictions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { - C = AppCodes.IdentityManagement.IpRestrictions + ".Create", - R = AppCodes.IdentityManagement.IpRestrictions, - U = AppCodes.IdentityManagement.IpRestrictions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormIpRestrictions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ResourceId", - Width = 300, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = $"SELECT \"UserName\" AS \"Key\", \"UserName\" AS \"Name\" FROM \"AbpUsers\" UNION SELECT \"Name\" AS \"Key\", \"Name\" AS \"Name\" FROM \"AbpRoles\"", - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.IpRestrictions + ".Create", - R = AppCodes.IdentityManagement.IpRestrictions, - U = AppCodes.IdentityManagement.IpRestrictions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() - { - ListFormCode = listFormIpRestrictions.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "IP", - Width = 85, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.IpRestrictions + ".Create", - R = AppCodes.IdentityManagement.IpRestrictions, - U = AppCodes.IdentityManagement.IpRestrictions + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); + ListFormCode = listFormIpRestrictions.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "IP", + Width = 85, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.IpRestrictions), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -7755,7 +4618,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.CustomEndpoint, Name = AppCodes.DeveloperKits.CustomEndpoints, @@ -7771,55 +4634,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - ButtonPosition= UiCommandButtonPositionTypeEnum.Toolbar, - Hint = "Swagger", - Text = "Swagger", - AuthName=AppCodes.DeveloperKits.CustomEndpoints, - Url= swaggerRootUrl + "/swagger/index.html", - }, - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - D = AppCodes.DeveloperKits.CustomEndpoints + ".Delete", - E = AppCodes.DeveloperKits.CustomEndpoints + ".Export", - I = AppCodes.DeveloperKits.CustomEndpoints + ".Import", - A = AppCodes.DeveloperKits.CustomEndpoints + ".Activity", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.CustomEndpoint)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -7833,45 +4654,26 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Custom Endpoint Form", - Width = 800, - Height = 500 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.DeveloperKits.CustomEndpoints, Width = 800, Height = 500 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, SendOnlyChangedFormValuesUpdate = 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, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, - new EditingFormItemDto { Order = 7, DataField = "PermissionsJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, - new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, - ] - } + 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, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, + new EditingFormItemDto { Order = 7, DataField = "PermissionsJson", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{ \"height\" : 60 }" }, + new EditingFormItemDto { Order = 8, DataField = "Description", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + ]} }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -7885,312 +4687,174 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), + CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { + new() { + ButtonPosition= UiCommandButtonPositionTypeEnum.Toolbar, + Hint = "Swagger", + Text = "Swagger", + AuthName=AppCodes.DeveloperKits.CustomEndpoints, + Url= swaggerRootUrl + "/swagger/index.html", + }, + }), } ); #region Custom Endpoint Fields await _listFormFieldRepository.InsertManyAsync([ - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 100, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 150, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Description", + Width = 350, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Url", + Width = 100, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Method", + Width = 80, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { - AllowReordering = true, + DataSourceType = UiLookupDataSourceTypeEnum.StaticData, + DisplayExpr = "name", + ValueExpr = "key", + LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { + new () { Key="GET",Name="GET" }, + new () { Key="POSt",Name="POST" }, + }), }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Name", - Width = 150, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DataSourceCode", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = LookupQueryValues.DataSourceValues, }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Description", - Width = 350, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Url", - Width = 100, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Method", - Width = 80, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, - DisplayExpr = "name", - ValueExpr = "key", - LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="GET",Name="GET" }, - new () { Key="POSt",Name="POST" }, - }), - }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DataSourceCode", - Width = 100, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = LookupQueryValues.DataSourceValues, - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Sql", - Width = 200, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ParametersJson", - Width = 200, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormCustomEndpoints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "PermissionsJson", - Width = 200, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.DeveloperKits.CustomEndpoints + ".Create", - R = AppCodes.DeveloperKits.CustomEndpoints, - U = AppCodes.DeveloperKits.CustomEndpoints + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Sql", + Width = 200, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "ParametersJson", + Width = 200, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + new() { + ListFormCode = listFormCustomEndpoints.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "PermissionsJson", + Width = 200, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.DeveloperKits.CustomEndpoints), + PivotSettingsJson = DefaultPivotSettingsJson + }, + ]); #endregion } #endregion @@ -8203,7 +4867,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.GlobalSearch, Name = AppCodes.Settings.GlobalSearch, @@ -8218,67 +4882,17 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Int32, SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Settings.GlobalSearch + ".Create", - R = AppCodes.Settings.GlobalSearch, - U = AppCodes.Settings.GlobalSearch + ".Update", - D = AppCodes.Settings.GlobalSearch + ".Delete", - E = AppCodes.Settings.GlobalSearch + ".Export", - I = AppCodes.Settings.GlobalSearch + ".Import", - A = AppCodes.Settings.GlobalSearch + ".Activity", - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Settings.GlobalSearch), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Global Search Form", - Width = 500, - Height = 350 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.Settings.GlobalSearch, Width = 500, Height = 350 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -8286,15 +4900,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items = - [ + 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 }, - ] - } + ]} }), FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { new() { @@ -8316,8 +4928,6 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency [ new() { ListFormCode = listFormGlobalSearch.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Int32, FieldName = "Id", @@ -8326,28 +4936,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.GlobalSearch + ".Create", - R = AppCodes.Settings.GlobalSearch, - U = AppCodes.Settings.GlobalSearch + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.GlobalSearch), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormGlobalSearch.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "System", @@ -8357,28 +4951,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.GlobalSearch + ".Create", - R = AppCodes.Settings.GlobalSearch, - U = AppCodes.Settings.GlobalSearch + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.GlobalSearch), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormGlobalSearch.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Group", @@ -8388,28 +4966,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.GlobalSearch + ".Create", - R = AppCodes.Settings.GlobalSearch, - U = AppCodes.Settings.GlobalSearch + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.GlobalSearch), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormGlobalSearch.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Term", @@ -8419,28 +4981,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.GlobalSearch + ".Create", - R = AppCodes.Settings.GlobalSearch, - U = AppCodes.Settings.GlobalSearch + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.GlobalSearch), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormGlobalSearch.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Url", @@ -8450,28 +4996,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.GlobalSearch + ".Create", - R = AppCodes.Settings.GlobalSearch, - U = AppCodes.Settings.GlobalSearch + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.GlobalSearch), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormGlobalSearch.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Single, FieldName = "Weight", @@ -8481,23 +5011,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Settings.GlobalSearch + ".Create", - R = AppCodes.Settings.GlobalSearch, - U = AppCodes.Settings.GlobalSearch + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Settings.GlobalSearch), + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -8512,7 +5028,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.AuditLog, Name = AppCodes.AuditLogs, @@ -8527,59 +5043,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - D = AppCodes.AuditLogs + ".Delete", - E = AppCodes.AuditLogs + ".Export", - I = AppCodes.AuditLogs + ".Import", - A = AppCodes.AuditLogs + ".Activity", - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.AuditLogs), + PagerOptionJson = DefaultPagerOptionJson, CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { new CommandColumnDto() { Hint = "Details", @@ -8599,8 +5070,6 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency [ new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Guid, FieldName = "Id", @@ -8609,28 +5078,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "HttpStatusCode", @@ -8640,28 +5093,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "HttpMethod", @@ -8671,28 +5108,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "Url", @@ -8702,28 +5123,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "UserName", @@ -8733,28 +5138,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "ClientIpAddress", @@ -8764,28 +5153,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.DateTime, FieldName = "ExecutionTime", @@ -8795,28 +5168,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.Int32, FieldName = "ExecutionDuration", @@ -8826,28 +5183,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAuditLog.ListFormCode, - RoleId = null, - UserId = null, CultureName = LanguageCodes.En, SourceDbType = DbType.String, FieldName = "ApplicationName", @@ -8857,23 +5198,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.AuditLogs + ".Create", - R = AppCodes.AuditLogs, - U = AppCodes.AuditLogs + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.AuditLogs), + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -8888,7 +5215,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.ClaimType, Name = AppCodes.IdentityManagement.ClaimTypes, @@ -8903,67 +5230,17 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldName = "Id", KeyFieldDbSourceType = DbType.Guid, SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - D = AppCodes.IdentityManagement.ClaimTypes + ".Delete", - E = AppCodes.IdentityManagement.ClaimTypes + ".Export", - I = AppCodes.IdentityManagement.ClaimTypes + ".Import", - A = AppCodes.IdentityManagement.ClaimTypes + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto() - { - Title = "Claim Types Form", - Width = 500, - Height = 550 - }, + Popup = new GridEditingPopupDto() { Title = AppCodes.IdentityManagement.ClaimTypes, Width = 500, Height = 550 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -9039,23 +5316,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -9069,23 +5332,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -9100,7 +5349,6 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsDeleted = false, LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -9111,23 +5359,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key=3,Name="DateTime" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -9140,23 +5374,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -9169,23 +5389,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -9199,23 +5405,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -9229,23 +5421,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -9259,23 +5437,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.IdentityManagement.ClaimTypes + ".Create", - R = AppCodes.IdentityManagement.ClaimTypes, - U = AppCodes.IdentityManagement.ClaimTypes + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.IdentityManagement.ClaimTypes), + PivotSettingsJson = DefaultPivotSettingsJson } ]); #endregion @@ -9290,7 +5454,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Route, Name = AppCodes.Routes, @@ -9310,30 +5474,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Routes + ".Create", - R = AppCodes.Routes, - U = AppCodes.Routes + ".Update", - D = AppCodes.Routes + ".Delete", - E = AppCodes.Routes + ".Export", - I = AppCodes.Routes + ".Import", - A = AppCodes.Routes + ".Activity" - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Routes), DeleteCommand = $"UPDATE \"{FullNameTable(TableNameEnum.Route)}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { @@ -9352,27 +5495,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Route Form", - Width = 500, - Height = 300 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Routes, Width = 500, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -9380,8 +5506,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -9428,19 +5553,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Routes + ".Create", - R = AppCodes.Routes, - U = AppCodes.Routes + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Routes), }, new() { @@ -9454,23 +5568,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Routes + ".Create", - R = AppCodes.Routes, - U = AppCodes.Routes + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Routes), }, new() { @@ -9484,23 +5584,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Routes + ".Create", - R = AppCodes.Routes, - U = AppCodes.Routes + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Routes), }, new() { @@ -9514,23 +5600,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Routes + ".Create", - R = AppCodes.Routes, - U = AppCodes.Routes + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Routes), }, new() { @@ -9546,7 +5618,6 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency AllowSearch = false, LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -9556,23 +5627,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="authenticated",Name="Authenticated" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Routes + ".Create", - R = AppCodes.Routes, - U = AppCodes.Routes + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Routes), }, new() { @@ -9586,19 +5643,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Routes + ".Create", - R = AppCodes.Routes, - U = AppCodes.Routes + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Routes), } ]); #endregion @@ -9613,7 +5659,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.ReportCategory, Name = AppCodes.Reports.Categories, @@ -9633,43 +5679,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Reports.Categories + ".Create", - R = AppCodes.Reports.Categories, - U = AppCodes.Reports.Categories + ".Update", - D = AppCodes.Reports.Categories + ".Delete", - E = AppCodes.Reports.Categories + ".Export", - I = AppCodes.Reports.Categories + ".Import", - A = AppCodes.Reports.Categories + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Reports.Categories), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -9685,8 +5698,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -9749,23 +5761,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Reports.Categories + ".Create", - R = AppCodes.Reports.Categories, - U = AppCodes.Reports.Categories + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Reports.Categories), }, new() { @@ -9779,23 +5777,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Reports.Categories + ".Create", - R = AppCodes.Reports.Categories, - U = AppCodes.Reports.Categories + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Reports.Categories), }, new() { @@ -9809,19 +5793,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Reports.Categories + ".Create", - R = AppCodes.Reports.Categories, - U = AppCodes.Reports.Categories + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Reports.Categories), }, new() { @@ -9835,19 +5808,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Reports.Categories + ".Create", - R = AppCodes.Reports.Categories, - U = AppCodes.Reports.Categories + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Reports.Categories), }, ]); #endregion @@ -9863,7 +5825,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.About, Name = AppCodes.About, @@ -9883,51 +5845,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.About + ".Create", - R = AppCodes.About, - U = AppCodes.About + ".Update", - D = AppCodes.About + ".Delete", - E = AppCodes.About + ".Export", - I = AppCodes.About + ".Import", - A = AppCodes.About + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.About), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "About Form", - Width = 800, - Height = 720 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.About, Width = 800, Height = 720 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -9935,8 +5859,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -9999,19 +5922,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.About + ".Create", - R = AppCodes.About, - U = AppCodes.About + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.About), }, new() { @@ -10025,23 +5937,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.About + ".Create", - R = AppCodes.About, - U = AppCodes.About + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.About), }, new() { @@ -10055,23 +5953,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.About + ".Create", - R = AppCodes.About, - U = AppCodes.About + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.About), }, new() { @@ -10085,23 +5969,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.About + ".Create", - R = AppCodes.About, - U = AppCodes.About + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.About), }, ]); #endregion @@ -10116,7 +5986,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Service, Name = AppCodes.Services, @@ -10136,51 +6006,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Services + ".Create", - R = AppCodes.Services, - U = AppCodes.Services + ".Update", - D = AppCodes.Services + ".Delete", - E = AppCodes.Services + ".Export", - I = AppCodes.Services + ".Import", - A = AppCodes.Services + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Services), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Service Form", - Width = 500, - Height = 450 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Services, Width = 500, Height = 450 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -10188,8 +6020,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -10254,23 +6085,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Services + ".Create", - R = AppCodes.Services, - U = AppCodes.Services + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Services), }, new() { @@ -10290,23 +6107,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Services + ".Create", - R = AppCodes.Services, - U = AppCodes.Services + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Services), }, new() { @@ -10320,23 +6123,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Services + ".Create", - R = AppCodes.Services, - U = AppCodes.Services + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Services), }, new() { @@ -10356,19 +6145,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Services), }, new() { @@ -10382,13 +6160,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", @@ -10397,19 +6171,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="support",Name="Support" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Services + ".Create", - R = AppCodes.Services, - U = AppCodes.Services + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Services), }, new() { @@ -10423,23 +6186,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Services + ".Create", - R = AppCodes.Services, - U = AppCodes.Services + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Services), } ]); #endregion @@ -10454,7 +6203,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Product, Name = AppCodes.Orders.Products, @@ -10474,30 +6223,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - D = AppCodes.Orders.Products + ".Delete", - E = AppCodes.Orders.Products + ".Export", - I = AppCodes.Orders.Products + ".Import", - A = AppCodes.Orders.Products + ".Activity" - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Orders.Products), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Product))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { @@ -10516,27 +6244,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Product Form", - Width = 500, - Height = 400 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Orders.Products, Width = 500, Height = 400 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -10544,8 +6255,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -10602,19 +6312,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), }, new() { @@ -10628,23 +6327,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -10665,19 +6350,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -10709,23 +6383,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Public.products.categories.Ek Hizmetler",Name="Ek Hizmetler" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), }, new() { @@ -10741,19 +6401,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), }, new() { @@ -10769,19 +6418,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), }, new() { @@ -10795,19 +6433,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), }, new() { @@ -10821,19 +6448,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.Products + ".Create", - R = AppCodes.Orders.Products, - U = AppCodes.Orders.Products + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.Products), }, ]); #endregion @@ -10848,7 +6464,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.PaymentMethod, Name = AppCodes.Orders.PaymentMethods, @@ -10867,51 +6483,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Orders.PaymentMethods + ".Create", - R = AppCodes.Orders.PaymentMethods, - U = AppCodes.Orders.PaymentMethods + ".Update", - D = AppCodes.Orders.PaymentMethods + ".Delete", - E = AppCodes.Orders.PaymentMethods + ".Export", - I = AppCodes.Orders.PaymentMethods + ".Import", - A = AppCodes.Orders.PaymentMethods + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Orders.PaymentMethods), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Payment Method Form", - Width = 500, - Height = 300 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Orders.PaymentMethods, Width = 500, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -10919,8 +6497,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -10966,23 +6543,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PaymentMethods + ".Create", - R = AppCodes.Orders.PaymentMethods, - U = AppCodes.Orders.PaymentMethods + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PaymentMethods), }, new() { @@ -10996,23 +6559,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PaymentMethods + ".Create", - R = AppCodes.Orders.PaymentMethods, - U = AppCodes.Orders.PaymentMethods + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PaymentMethods), }, new() { @@ -11028,19 +6577,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PaymentMethods + ".Create", - R = AppCodes.Orders.PaymentMethods, - U = AppCodes.Orders.PaymentMethods + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PaymentMethods), }, new() { @@ -11054,23 +6592,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PaymentMethods + ".Create", - R = AppCodes.Orders.PaymentMethods, - U = AppCodes.Orders.PaymentMethods + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PaymentMethods), }, ]); #endregion @@ -11085,7 +6609,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.InstallmentOption, Name = AppCodes.Orders.InstallmentOptions, @@ -11104,51 +6628,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Orders.InstallmentOptions + ".Create", - R = AppCodes.Orders.InstallmentOptions, - U = AppCodes.Orders.InstallmentOptions + ".Update", - D = AppCodes.Orders.InstallmentOptions + ".Delete", - E = AppCodes.Orders.InstallmentOptions + ".Export", - I = AppCodes.Orders.InstallmentOptions + ".Import", - A = AppCodes.Orders.InstallmentOptions + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Orders.InstallmentOptions), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Installment Option Form", - Width = 500, - Height = 300 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Orders.InstallmentOptions, Width = 500, Height = 300 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -11156,8 +6642,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -11203,23 +6688,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Services + ".Create", - R = AppCodes.Services, - U = AppCodes.Services + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.InstallmentOptions), }, new() { @@ -11233,23 +6704,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.InstallmentOptions + ".Create", - R = AppCodes.Orders.InstallmentOptions, - U = AppCodes.Orders.InstallmentOptions + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.InstallmentOptions), }, new() { @@ -11263,23 +6720,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.InstallmentOptions + ".Create", - R = AppCodes.Orders.InstallmentOptions, - U = AppCodes.Orders.InstallmentOptions + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.InstallmentOptions), }, new() { @@ -11295,19 +6738,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.InstallmentOptions + ".Create", - R = AppCodes.Orders.InstallmentOptions, - U = AppCodes.Orders.InstallmentOptions + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.InstallmentOptions), }, ]); #endregion @@ -11322,7 +6754,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.PurchaseOrder, Name = AppCodes.Orders.PurchaseOrders, @@ -11342,30 +6774,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - D = AppCodes.Orders.PurchaseOrders + ".Delete", - E = AppCodes.Orders.PurchaseOrders + ".Export", - I = AppCodes.Orders.PurchaseOrders + ".Import", - A = AppCodes.Orders.PurchaseOrders + ".Activity" - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Orders.PurchaseOrders), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Order))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { @@ -11384,27 +6795,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Purchase Order Form", - Width = 1000, - Height = 500 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Orders.PurchaseOrders, Width = 1000, Height = 500 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -11480,23 +6874,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders) }, new() { @@ -11510,23 +6890,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11540,19 +6906,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11566,23 +6921,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11596,19 +6937,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11622,19 +6952,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11648,19 +6967,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11682,19 +6990,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency LookupQuery = LookupQueryValues.CountryValues, CascadeEmptyFields = "City,District" }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11719,19 +7016,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeParentFields = "Country", CascadeEmptyFields = "District" }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11755,19 +7041,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeFilterOperator="=", CascadeParentFields = "Country,City", }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11781,19 +7056,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11807,19 +7071,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11833,19 +7086,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11859,19 +7101,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11887,19 +7118,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11915,19 +7135,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11943,19 +7152,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -11976,19 +7174,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.PaymentMethodValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), }, new() { @@ -12009,19 +7196,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.InstallmentValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Orders.PurchaseOrders + ".Create", - R = AppCodes.Orders.PurchaseOrders, - U = AppCodes.Orders.PurchaseOrders + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Orders.PurchaseOrders), } ]); #endregion @@ -12036,7 +7212,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.BlogCategory, Name = AppCodes.BlogManagement.BlogCategory, @@ -12056,30 +7232,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - D = AppCodes.BlogManagement.BlogCategory + ".Delete", - E = AppCodes.BlogManagement.BlogCategory + ".Export", - I = AppCodes.BlogManagement.BlogCategory + ".Import", - A = AppCodes.BlogManagement.BlogCategory + ".Activity", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.BlogManagement.BlogCategory), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogCategory))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { @@ -12098,27 +7253,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Blog Category Form", - Width = 600, - Height = 400 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.BlogManagement.BlogCategory, Width = 600, Height = 400 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -12126,8 +7264,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -12182,19 +7319,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogCategory), }, new() { @@ -12208,10 +7334,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -12219,19 +7342,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogCategory), }, new() { @@ -12245,23 +7357,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogCategory), }, new() { @@ -12275,10 +7373,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -12286,19 +7381,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogCategory), }, new() { @@ -12312,23 +7396,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogCategory), }, new() { @@ -12342,19 +7412,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogCategory), }, new() { @@ -12368,19 +7427,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogCategory + ".Create", - R = AppCodes.BlogManagement.BlogCategory, - U = AppCodes.BlogManagement.BlogCategory + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogCategory), } ]); #endregion @@ -12395,7 +7443,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.BlogPost, Name = AppCodes.BlogManagement.BlogPosts, @@ -12415,30 +7463,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - D = AppCodes.BlogManagement.BlogPosts + ".Delete", - E = AppCodes.BlogManagement.BlogPosts + ".Export", - I = AppCodes.BlogManagement.BlogPosts + ".Import", - A = AppCodes.BlogManagement.BlogPosts + ".Activity" - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.BlogManagement.BlogPosts), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.BlogPost))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] { @@ -12457,27 +7484,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Blog Post Form", - Width = 1000, - Height = 600 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.BlogManagement.BlogPosts, Width = 1000, Height = 600 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -12485,8 +7495,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -12553,19 +7562,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12579,10 +7577,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -12590,19 +7585,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12616,23 +7600,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12646,10 +7616,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -12657,19 +7624,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12683,23 +7639,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12713,19 +7655,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12746,19 +7677,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.BlogCategoryValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12772,19 +7692,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12798,19 +7707,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12824,19 +7722,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12850,19 +7737,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12876,19 +7752,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12902,19 +7767,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), }, new() { @@ -12928,19 +7782,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.BlogManagement.BlogPosts + ".Create", - R = AppCodes.BlogManagement.BlogPosts, - U = AppCodes.BlogManagement.BlogPosts + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.BlogManagement.BlogPosts), } ]); #endregion @@ -12955,7 +7798,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Demo, Name = AppCodes.Demos, @@ -12975,51 +7818,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - D = AppCodes.Demos + ".Delete", - E = AppCodes.Demos + ".Export", - I = AppCodes.Demos + ".Import", - A = AppCodes.Demos + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Demos), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Demo Form", - Width = 500, - Height = 500 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Demos, Width = 500, Height = 500 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -13027,8 +7832,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -13083,7 +7887,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }) }); - #region Report Categories Fields + #region Demos Fields await _listFormFieldRepository.InsertManyAsync([ new() { @@ -13096,23 +7900,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13126,23 +7916,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13156,19 +7932,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13186,19 +7951,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) }, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13212,19 +7966,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13238,19 +7981,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13264,19 +7996,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13290,19 +8011,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, new() { @@ -13316,19 +8026,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Demos + ".Create", - R = AppCodes.Demos, - U = AppCodes.Demos + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Demos), }, ]); #endregion @@ -13344,7 +8043,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Contact, Name = AppCodes.Contact, @@ -13364,51 +8063,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - D = AppCodes.Contact + ".Delete", - E = AppCodes.Contact + ".Export", - I = AppCodes.Contact + ".Import", - A = AppCodes.Contact + ".Activity" - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson= DefaultPermissionJson(AppCodes.Contact), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Contact Form", - Width = 800, - Height = 600 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Contact, Width = 800, Height = 600 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -13416,8 +8077,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -13485,19 +8145,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13517,23 +8166,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.LanguageKeyValues }), - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13547,23 +8182,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13582,19 +8203,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) }, new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) }, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13608,23 +8218,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13638,23 +8234,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13668,23 +8250,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13698,23 +8266,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, new() { @@ -13728,23 +8282,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Contact + ".Create", - R = AppCodes.Contact, - U = AppCodes.Contact + ".Update", - E = true, - I = true, - Deny = false - }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Contact), }, ]); #endregion @@ -13760,7 +8300,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.ContactTag, Name = AppCodes.Parameters.ContactTag, @@ -13780,30 +8320,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = false }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Parameters.ContactTag + ".Create", - R = AppCodes.Parameters.ContactTag, - U = AppCodes.Parameters.ContactTag + ".Update", - D = AppCodes.Parameters.ContactTag + ".Delete", - E = AppCodes.Parameters.ContactTag + ".Export", - I = AppCodes.Parameters.ContactTag + ".Import", - A = AppCodes.Parameters.ContactTag + ".Activity", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Parameters.ContactTag), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTag))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -13820,27 +8339,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Contact Tag Form", - Width = 400, - Height = 200 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Parameters.ContactTag, Width = 400, Height = 200 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -13848,8 +8350,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -13907,20 +8408,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Parameters.ContactTag + ".Create", - R = AppCodes.Parameters.ContactTag, - U = AppCodes.Parameters.ContactTag + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Parameters.ContactTag), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -13936,24 +8426,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Parameters.ContactTag + ".Create", - R = AppCodes.Parameters.ContactTag, - U = AppCodes.Parameters.ContactTag + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Parameters.ContactTag), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -13967,24 +8443,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Parameters.ContactTag + ".Create", - R = AppCodes.Parameters.ContactTag, - U = AppCodes.Parameters.ContactTag + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Parameters.ContactTag), + PivotSettingsJson = DefaultPivotSettingsJson } ]); #endregion @@ -13999,7 +8461,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.ContactTitle, Name = AppCodes.Parameters.ContactTitle, @@ -14019,30 +8481,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = false }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Parameters.ContactTitle + ".Create", - R = AppCodes.Parameters.ContactTitle, - U = AppCodes.Parameters.ContactTitle + ".Update", - D = AppCodes.Parameters.ContactTitle + ".Delete", - E = AppCodes.Parameters.ContactTitle + ".Export", - I = AppCodes.Parameters.ContactTitle + ".Import", - A = AppCodes.Parameters.ContactTitle + ".Activity", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, + PermissionJson = DefaultPermissionJson(AppCodes.Parameters.ContactTitle), DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.ContactTitle))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { @@ -14059,27 +8500,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { - Popup = new GridEditingPopupDto - { - Title = "Contact Title Form", - Width = 400, - Height = 200 - }, + Popup = new GridEditingPopupDto { Title = AppCodes.Parameters.ContactTitle, Width = 400, Height = 200 }, AllowDeleting = true, AllowAdding = true, AllowUpdating = true, @@ -14087,8 +8511,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -14116,15 +8539,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() - { + new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() - { + new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", @@ -14146,20 +8567,9 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Parameters.ContactTitle + ".Create", - R = AppCodes.Parameters.ContactTitle, - U = AppCodes.Parameters.ContactTitle + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Parameters.ContactTitle), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -14175,24 +8585,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Parameters.ContactTitle + ".Create", - R = AppCodes.Parameters.ContactTitle, - U = AppCodes.Parameters.ContactTitle + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Parameters.ContactTitle), + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -14206,24 +8602,10 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Parameters.ContactTitle + ".Create", - R = AppCodes.Parameters.ContactTitle, - U = AppCodes.Parameters.ContactTitle + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, + PermissionJson = DefaultFieldPermissionJson(AppCodes.Parameters.ContactTitle), + PivotSettingsJson = DefaultPivotSettingsJson } ]); #endregion @@ -14238,7 +8620,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Currency, Name = AppCodes.Parameters.Currency, @@ -14258,20 +8640,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Parameters.Currency + ".Create", @@ -14300,19 +8670,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -14411,10 +8769,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Currency + ".Create", @@ -14437,14 +8792,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Currency + ".Create", @@ -14467,10 +8816,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Currency + ".Create", @@ -14493,14 +8839,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Currency + ".Create", @@ -14525,14 +8865,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Currency + ".Create", @@ -14555,10 +8889,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Currency + ".Create", @@ -14582,7 +8913,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.CountryGroup, Name = AppCodes.Parameters.CountryGroup, @@ -14602,20 +8933,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Parameters.CountryGroup + ".Create", @@ -14644,19 +8963,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -14672,8 +8979,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -14723,10 +9029,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.CountryGroup + ".Create", @@ -14749,14 +9052,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.CountryGroup + ".Create", @@ -14780,7 +9077,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Country, Name = AppCodes.Parameters.Country, @@ -14800,20 +9097,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Parameters.Country + ".Create", @@ -14842,19 +9127,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -14870,8 +9143,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -14921,10 +9193,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -14947,14 +9216,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -14977,14 +9240,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -15014,10 +9271,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.CountryGroupValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -15047,10 +9301,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.CurrencyValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -15073,10 +9324,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -15099,10 +9347,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -15124,10 +9369,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -15149,10 +9391,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.Country + ".Create", @@ -15177,7 +9416,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.City, Name = AppCodes.Parameters.City, @@ -15197,20 +9436,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Parameters.City + ".Create", @@ -15239,19 +9466,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -15267,8 +9482,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -15321,10 +9535,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.City + ".Create", @@ -15354,14 +9565,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.CountryValues }), - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.City + ".Create", @@ -15384,14 +9589,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.City + ".Create", @@ -15414,14 +9613,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.City + ".Create", @@ -15444,14 +9637,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.City + ".Create", @@ -15475,7 +9662,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.District, Name = AppCodes.Parameters.District, @@ -15495,11 +9682,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), + SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = JsonSerializer.Serialize(new { ColumnFixingEnabled = true, @@ -15538,19 +9721,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -15566,8 +9737,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -15622,10 +9792,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.District + ".Create", @@ -15656,14 +9823,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency LookupQuery = LookupQueryValues.CountryValues, CascadeEmptyFields = "City" }), - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.District + ".Create", @@ -15696,14 +9857,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeFilterOperator="=", CascadeParentFields = "Country" }), - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.District + ".Create", @@ -15726,14 +9881,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.District + ".Create", @@ -15756,14 +9905,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.District + ".Create", @@ -15786,14 +9929,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.District + ".Create", @@ -15816,14 +9953,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = false, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Parameters.District + ".Create", @@ -15848,7 +9979,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Sector, Name = AppCodes.Definitions.Sector, @@ -15868,11 +9999,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = false }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), + SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = JsonSerializer.Serialize(new { ColumnFixingEnabled = true, @@ -15909,19 +10036,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -15937,8 +10052,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -15958,15 +10072,13 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() - { + new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() - { + new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", @@ -15988,10 +10100,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Sector + ".Create", @@ -16001,7 +10110,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -16017,14 +10126,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Sector + ".Create", @@ -16034,7 +10137,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } ]); #endregion @@ -16049,7 +10152,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.SkillType, Name = AppCodes.Definitions.SkillType, @@ -16069,11 +10172,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), + SelectionJson = DefaultSelectionSingleJson, ColumnOptionJson = JsonSerializer.Serialize(new { ColumnFixingEnabled = true, @@ -16112,19 +10211,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -16140,8 +10227,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -16200,10 +10286,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillType + ".Create", @@ -16226,14 +10309,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillType + ".Create", @@ -16257,7 +10334,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.SkillLevel, Name = AppCodes.Definitions.SkillLevel, @@ -16273,36 +10350,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -16326,19 +10379,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -16405,10 +10446,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -16418,10 +10456,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSkillLevel.ListFormCode, @@ -16439,10 +10474,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -16452,10 +10484,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -16469,10 +10498,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -16482,10 +10508,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -16502,10 +10525,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -16515,10 +10535,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -16541,10 +10558,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -16554,10 +10568,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -16572,7 +10583,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Skill, Name = AppCodes.Definitions.Skill, @@ -16588,36 +10599,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Skill + ".Create", @@ -16641,19 +10628,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -16712,10 +10687,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Skill + ".Create", @@ -16725,10 +10697,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -16747,10 +10716,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Skill + ".Create", @@ -16760,10 +10726,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -16786,10 +10749,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SkillLevel + ".Create", @@ -16799,10 +10759,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -16817,7 +10774,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.UomCategory, Name = AppCodes.Definitions.UomCategory, @@ -16837,20 +10794,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.UomCategory + ".Create", @@ -16879,19 +10824,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto @@ -16907,8 +10840,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -16967,10 +10899,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.UomCategory + ".Create", @@ -16993,14 +10922,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new[] - { - new ValidationRuleDto { Type = "required" } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.UomCategory + ".Create", @@ -17024,7 +10947,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Uom, Name = AppCodes.Definitions.Uom, @@ -17040,36 +10963,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Uom + ".Create", @@ -17093,19 +10992,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -17168,10 +11055,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Uom + ".Create", @@ -17181,10 +11065,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -17203,10 +11084,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Uom + ".Create", @@ -17216,10 +11094,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -17246,10 +11121,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Uom + ".Create", @@ -17259,10 +11131,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -17281,10 +11150,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Uom + ".Create", @@ -17294,10 +11160,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -17316,10 +11179,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Uom + ".Create", @@ -17329,10 +11189,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new ListFormField { @@ -17355,10 +11212,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Uom + ".Create", @@ -17368,10 +11222,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -17414,20 +11265,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Behavior + ".Create", @@ -17451,19 +11290,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -17517,13 +11344,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Behavior + ".Create", @@ -17533,10 +11355,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBehavior.ListFormCode, @@ -17551,13 +11370,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Behavior + ".Create", @@ -17567,10 +11381,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -17613,20 +11424,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Disease + ".Create", @@ -17650,19 +11449,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -17715,13 +11502,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Disease + ".Create", @@ -17731,10 +11513,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDisease.ListFormCode, @@ -17749,13 +11528,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Disease + ".Create", @@ -17765,10 +11539,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -17811,20 +11582,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Document + ".Create", @@ -17848,19 +11607,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -17913,13 +11660,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Document + ".Create", @@ -17929,10 +11671,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDocument.ListFormCode, @@ -17947,13 +11686,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Document + ".Create", @@ -17963,10 +11697,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -18009,20 +11740,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.EducationStatus + ".Create", @@ -18046,19 +11765,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -18112,13 +11819,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.EducationStatus + ".Create", @@ -18128,10 +11830,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEducationStatus.ListFormCode, @@ -18144,13 +11843,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.EducationStatus + ".Create", @@ -18160,10 +11854,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEducationStatus.ListFormCode, @@ -18178,10 +11869,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.EducationStatus + ".Create", @@ -18191,10 +11879,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -18237,20 +11922,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.MeetingMethod + ".Create", @@ -18274,19 +11947,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -18348,13 +12009,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingMethod + ".Create", @@ -18364,10 +12020,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMeetingMethod.ListFormCode, @@ -18382,13 +12035,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingMethod + ".Create", @@ -18398,10 +12046,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMeetingMethod.ListFormCode, @@ -18414,9 +12059,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -18428,10 +12071,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Hibrit",Name="Hibrit" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingMethod + ".Create", @@ -18441,10 +12081,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -18458,9 +12095,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -18470,10 +12105,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingMethod + ".Create", @@ -18483,7 +12115,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -18526,20 +12158,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.MeetingResult + ".Create", @@ -18563,19 +12183,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -18637,13 +12245,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingResult + ".Create", @@ -18653,10 +12256,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMeetingResult.ListFormCode, @@ -18669,13 +12269,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingResult + ".Create", @@ -18685,10 +12280,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMeetingResult.ListFormCode, @@ -18703,13 +12295,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency AllowSearch = true, SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingResult + ".Create", @@ -18719,10 +12306,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -18736,9 +12320,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -18748,10 +12330,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.MeetingResult + ".Create", @@ -18761,7 +12340,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -18804,20 +12383,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Program + ".Create", @@ -18841,19 +12408,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -18914,13 +12469,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Program + ".Create", @@ -18930,10 +12480,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormProgram.ListFormCode, @@ -18948,13 +12495,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Program + ".Create", @@ -18964,10 +12506,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormProgram.ListFormCode, @@ -18980,9 +12519,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -18992,10 +12529,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Program + ".Create", @@ -19005,10 +12539,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -19051,20 +12582,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Interesting + ".Create", @@ -19088,19 +12607,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -19161,13 +12668,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Interesting + ".Create", @@ -19177,10 +12679,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormInteresting.ListFormCode, @@ -19195,13 +12694,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Interesting + ".Create", @@ -19211,10 +12705,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormInteresting.ListFormCode, @@ -19227,9 +12718,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -19239,10 +12728,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Interesting + ".Create", @@ -19252,10 +12738,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -19298,20 +12781,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.SalesRejectionReason + ".Create", @@ -19335,19 +12806,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -19410,13 +12869,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SalesRejectionReason + ".Create", @@ -19426,10 +12880,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSalesRejectionReason.ListFormCode, @@ -19444,13 +12895,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SalesRejectionReason + ".Create", @@ -19460,10 +12906,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -19491,10 +12934,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="İletişim",Name="İletişim" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -19504,7 +12944,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSalesRejectionReason.ListFormCode, @@ -19517,9 +12957,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -19529,10 +12967,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.SalesRejectionReason + ".Create", @@ -19542,10 +12977,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -19588,20 +13020,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Source + ".Create", @@ -19625,19 +13045,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -19698,13 +13106,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Source + ".Create", @@ -19714,10 +13117,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSource.ListFormCode, @@ -19732,13 +13132,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Source + ".Create", @@ -19748,10 +13143,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSource.ListFormCode, @@ -19764,9 +13156,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -19776,10 +13166,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Source + ".Create", @@ -19789,10 +13176,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -19835,20 +13219,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Vaccine + ".Create", @@ -19872,19 +13244,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -19938,13 +13298,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vaccine + ".Create", @@ -19954,10 +13309,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVaccine.ListFormCode, @@ -19972,13 +13324,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vaccine + ".Create", @@ -19988,10 +13335,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -20034,20 +13378,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.NoteType + ".Create", @@ -20071,19 +13403,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -20137,13 +13457,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.NoteType + ".Create", @@ -20153,10 +13468,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormNoteType.ListFormCode, @@ -20171,13 +13483,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.NoteType + ".Create", @@ -20187,10 +13494,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -20233,20 +13537,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.ClassCancellationReason + ".Create", @@ -20270,19 +13562,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -20343,13 +13623,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassCancellationReason + ".Create", @@ -20359,10 +13634,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormClassCancellationReason.ListFormCode, @@ -20377,13 +13649,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassCancellationReason + ".Create", @@ -20393,10 +13660,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormClassCancellationReason.ListFormCode, @@ -20409,9 +13673,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", @@ -20421,10 +13683,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassCancellationReason + ".Create", @@ -20434,10 +13693,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -20480,20 +13736,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20517,19 +13761,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -20631,13 +13863,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20647,10 +13874,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormWorkHour.ListFormCode, @@ -20665,13 +13889,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20681,10 +13900,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Saat alanları new() { @@ -20697,10 +13913,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20710,10 +13923,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormWorkHour.ListFormCode, @@ -20725,10 +13935,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20738,10 +13945,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Günlük kolonlar new() @@ -20755,10 +13959,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20768,10 +13969,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -20784,10 +13982,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20797,10 +13992,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -20813,10 +14005,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20826,10 +14015,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -20842,10 +14028,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20855,10 +14038,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -20871,10 +14051,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20884,10 +14061,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -20900,10 +14074,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20913,10 +14084,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -20929,10 +14097,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.WorkHour + ".Create", @@ -20942,10 +14107,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -20988,20 +14150,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21025,19 +14175,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -21111,13 +14249,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21127,7 +14260,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVehicle.ListFormCode, @@ -21142,13 +14275,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21158,7 +14286,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVehicle.ListFormCode, @@ -21170,10 +14298,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21183,7 +14308,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVehicle.ListFormCode, @@ -21195,10 +14320,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21208,7 +14330,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Driver bilgileri new() @@ -21222,10 +14344,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21235,10 +14354,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -21251,10 +14367,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21264,10 +14377,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -21280,10 +14390,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21293,10 +14400,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -21309,10 +14413,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21322,10 +14423,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Assistant Driver bilgileri @@ -21340,10 +14438,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21353,10 +14448,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -21369,10 +14461,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21382,10 +14471,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -21398,10 +14484,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21411,10 +14494,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -21427,10 +14507,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Vehicle + ".Create", @@ -21440,10 +14517,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() { @@ -21464,10 +14538,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto{ C = AppCodes.Definitions.Vehicle + ".Create", R = AppCodes.Definitions.Vehicle, U = AppCodes.Definitions.Vehicle + ".Update", E = true, I = true, Deny = false}), PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto{ IsPivot = true}) }, @@ -21512,20 +14583,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Psychologist + ".Create", @@ -21554,19 +14613,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -21582,8 +14629,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -21600,22 +14646,19 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() - { + new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() - { + new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() - { + new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", @@ -21651,10 +14694,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Psychologist + ".Create", @@ -21664,7 +14704,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -21685,10 +14725,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Psychologist + ".Create", @@ -21698,7 +14735,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Phone new() @@ -21712,10 +14749,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Psychologist + ".Create", @@ -21725,7 +14759,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Email new() @@ -21739,14 +14773,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Psychologist + ".Create", @@ -21756,7 +14784,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Address new() @@ -21770,10 +14798,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Psychologist + ".Create", @@ -21783,7 +14808,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -21806,10 +14831,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Psychologist + ".Create", @@ -21819,7 +14841,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -21862,20 +14884,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -21892,19 +14902,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -21979,10 +14977,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -21992,7 +14987,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // String alanlar new() @@ -22016,10 +15011,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22029,10 +15021,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22045,10 +15034,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22058,10 +15044,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22074,14 +15057,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22091,10 +15068,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22107,10 +15081,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22120,10 +15091,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22136,10 +15104,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22149,10 +15114,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22165,10 +15127,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22178,10 +15137,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Telefon ve Fax alanları @@ -22196,10 +15152,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22209,10 +15162,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22225,10 +15175,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22238,10 +15185,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22254,10 +15198,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22267,10 +15208,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22283,10 +15221,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22296,10 +15231,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22312,10 +15244,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22325,10 +15254,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Description ve Status @@ -22343,10 +15269,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Lawyer + ".Create", @@ -22356,10 +15279,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -22385,10 +15305,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto{ C = AppCodes.Definitions.Lawyer + ".Create", R = AppCodes.Definitions.Lawyer, U = AppCodes.Definitions.Lawyer + ".Update", E = true, I = true, Deny = false }), PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto{ IsPivot = true }) }, @@ -22434,20 +15351,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.RegistrationType + ".Create", @@ -22464,19 +15369,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -22492,8 +15385,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -22542,10 +15434,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationType + ".Create", @@ -22555,7 +15444,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -22579,10 +15468,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationType + ".Create", @@ -22592,7 +15478,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -22613,10 +15499,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationType + ".Create", @@ -22626,7 +15509,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -22649,10 +15532,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationType + ".Create", @@ -22662,7 +15542,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -22705,20 +15585,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.RegistrationMethod + ".Create", @@ -22735,19 +15603,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -22763,8 +15619,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -22813,10 +15668,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationMethod + ".Create", @@ -22826,7 +15678,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -22851,10 +15703,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationMethod + ".Create", @@ -22864,7 +15713,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // RegistrationTypeId new() @@ -22887,10 +15736,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeFilterOperator="=", CascadeParentFields = "BranchId", }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationMethod + ".Create", @@ -22900,7 +15746,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -22921,10 +15767,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationMethod + ".Create", @@ -22934,7 +15777,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -22957,10 +15800,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.RegistrationMethod + ".Create", @@ -22970,7 +15810,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -23013,20 +15853,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23043,19 +15871,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -23071,8 +15887,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -23124,10 +15939,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23137,7 +15949,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -23162,10 +15974,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23175,7 +15984,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // RegistrationTypeId new() @@ -23198,10 +16007,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeFilterOperator="=", CascadeParentFields = "BranchId", }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23211,7 +16017,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -23232,10 +16038,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23245,7 +16048,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // MinStudentCount new() @@ -23259,10 +16062,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23272,7 +16072,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // MaxStudentCount new() @@ -23286,10 +16086,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23299,7 +16096,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -23322,10 +16119,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.ClassType + ".Create", @@ -23335,7 +16129,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -23378,20 +16172,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Class + ".Create", @@ -23408,19 +16190,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -23436,8 +16206,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -23486,10 +16255,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Class + ".Create", @@ -23499,7 +16265,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -23524,10 +16290,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Class + ".Create", @@ -23537,7 +16300,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // ClassTypeId new() @@ -23560,10 +16323,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeFilterOperator="=", CascadeParentFields = "BranchId", }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Class + ".Create", @@ -23573,7 +16333,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -23594,10 +16354,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Class + ".Create", @@ -23607,7 +16364,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -23630,10 +16387,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Class + ".Create", @@ -23643,7 +16397,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -23686,20 +16440,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Level + ".Create", @@ -23716,19 +16458,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -23744,8 +16474,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -23799,10 +16528,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -23812,7 +16538,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -23837,10 +16563,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -23850,7 +16573,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // ClassTypeId new() @@ -23873,10 +16596,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeFilterOperator="=", CascadeParentFields = "BranchId", }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -23886,7 +16606,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // LevelType new() @@ -23913,10 +16633,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Sınav Eğitimi",Name="Sınav Eğitimi" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -23926,7 +16643,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Order new() @@ -23947,10 +16664,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -23960,7 +16674,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -23979,10 +16693,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -23992,7 +16703,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // LessonCount new() @@ -24006,10 +16717,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -24019,7 +16727,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // LessonDuration new() @@ -24033,10 +16741,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -24046,7 +16751,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // MonthlyPaymentRate new() @@ -24062,10 +16767,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -24075,7 +16777,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -24098,10 +16800,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Level + ".Create", @@ -24111,7 +16810,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -24154,20 +16853,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24184,19 +16871,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -24212,8 +16887,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -24259,10 +16933,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24272,7 +16943,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -24297,10 +16968,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24310,7 +16978,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -24331,10 +16999,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24344,7 +17009,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Day new() @@ -24363,10 +17028,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24376,7 +17038,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Lesson1-4 new() @@ -24399,10 +17061,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Ek",Name="Ek Öğretmen" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24412,10 +17071,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -24437,10 +17093,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Ek",Name="Ek Öğretmen" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24450,10 +17103,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -24475,10 +17125,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Ek",Name="Ek Öğretmen" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24488,10 +17135,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -24513,10 +17157,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Ek",Name="Ek Öğretmen" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.LessonPeriod + ".Create", @@ -24526,10 +17167,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -24572,20 +17210,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24609,19 +17235,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -24742,13 +17356,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24758,7 +17367,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() { @@ -24777,10 +17386,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.BranchValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24790,7 +17396,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() { @@ -24806,13 +17412,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 2, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24822,7 +17423,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() { @@ -24844,10 +17445,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Pasif",Name="Pasif" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto{ C = AppCodes.Definitions.Schedule + ".Create", R = AppCodes.Definitions.Schedule, U = AppCodes.Definitions.Schedule + ".Update", E = true, I = true, Deny = false}), PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto{ IsPivot = true}) }, @@ -24863,10 +17461,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24876,10 +17471,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -24892,10 +17484,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24905,10 +17494,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -24921,10 +17507,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24934,10 +17517,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -24950,10 +17530,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24963,10 +17540,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -24979,10 +17553,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -24992,10 +17563,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Öğle Arası @@ -25010,10 +17578,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25023,10 +17588,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25039,10 +17601,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25052,10 +17611,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25068,10 +17624,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25081,10 +17634,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Günler @@ -25099,10 +17649,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25112,10 +17659,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25128,10 +17672,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25141,10 +17682,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25157,10 +17695,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25170,10 +17705,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25186,10 +17718,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25199,10 +17728,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25215,10 +17741,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25228,10 +17751,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25244,10 +17764,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25257,10 +17774,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -25273,10 +17787,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Schedule + ".Create", @@ -25286,10 +17797,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); @@ -25305,7 +17813,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.Bank, Name = AppCodes.Accounting.Bank, @@ -25321,36 +17829,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25374,19 +17858,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -25469,10 +17941,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25482,10 +17951,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -25505,10 +17971,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.BranchValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25518,7 +17981,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25536,10 +17999,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25549,10 +18009,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25568,10 +18025,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25581,10 +18035,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25597,10 +18048,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25610,10 +18058,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25626,10 +18071,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25639,10 +18081,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25663,10 +18102,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency LookupQuery = LookupQueryValues.CountryValues, CascadeEmptyFields = "City,District,Street" }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25676,10 +18112,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25703,10 +18136,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeParentFields = "Country", CascadeEmptyFields = "District,Street" }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25716,10 +18146,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25743,10 +18170,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeParentFields = "Country,City", CascadeEmptyFields = "Street", }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25756,10 +18180,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25772,10 +18193,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25785,10 +18203,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25801,10 +18216,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25814,10 +18226,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBank.ListFormCode, @@ -25830,14 +18239,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.Bank + ".Create", @@ -25847,10 +18250,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -25865,7 +18265,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { ListFormType = ListFormTypeEnum.List, IsSubForm = false, - LayoutJson = JsonSerializer.Serialize(new LayoutDto() { Grid = true, Card = true, Pivot = true, Chart = true, DefaultLayout = "grid", CardLayoutColumn = 4 }), + LayoutJson = DefaultLayoutJson, CultureName = LanguageCodes.En, ListFormCode = ListFormCodes.Lists.BankAccount, Name = AppCodes.Accounting.BankAccount, @@ -25881,36 +18281,12 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency KeyFieldDbSourceType = DbType.Guid, DefaultFilter = "\"IsDeleted\" = 'false'", SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Accounting.BankAccount + ".Create", @@ -25934,19 +18310,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -26014,10 +18378,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.BankAccount + ".Create", @@ -26027,10 +18388,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBankAccount.ListFormCode, @@ -26050,10 +18408,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.BankValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.BankAccount + ".Create", @@ -26063,10 +18418,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBankAccount.ListFormCode, @@ -26084,10 +18436,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.BankAccount + ".Create", @@ -26097,10 +18446,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBankAccount.ListFormCode, @@ -26117,10 +18463,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.BankAccount + ".Create", @@ -26130,10 +18473,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBankAccount.ListFormCode, @@ -26153,10 +18493,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.CurrencyValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.BankAccount + ".Create", @@ -26166,10 +18503,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBankAccount.ListFormCode, @@ -26182,10 +18516,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Accounting.BankAccount + ".Create", @@ -26195,10 +18526,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, }); #endregion @@ -26242,20 +18570,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.QuestionTag + ".Create", @@ -26279,19 +18595,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -26347,13 +18651,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionTag + ".Create", @@ -26363,10 +18662,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTag.ListFormCode, @@ -26381,13 +18677,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionTag + ".Create", @@ -26397,10 +18688,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTag.ListFormCode, @@ -26413,10 +18701,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionTag + ".Create", @@ -26426,10 +18711,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTag.ListFormCode, @@ -26442,10 +18724,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionTag + ".Create", @@ -26455,10 +18734,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -26501,20 +18777,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.QuestionPool + ".Create", @@ -26538,19 +18802,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -26616,13 +18868,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionPool + ".Create", @@ -26632,10 +18879,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestionPool.ListFormCode, @@ -26650,13 +18894,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionPool + ".Create", @@ -26666,10 +18905,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestionPool.ListFormCode, @@ -26682,10 +18918,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionPool + ".Create", @@ -26695,10 +18928,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestionPool.ListFormCode, @@ -26717,10 +18947,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.QuestionTagValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.QuestionPool + ".Create", @@ -26730,10 +18957,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -26776,20 +19000,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Definitions.Question + ".Create", @@ -26813,19 +19025,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -26912,13 +19112,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -26928,10 +19123,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -26944,19 +19136,14 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, DisplayExpr = "Name", ValueExpr = "Key", LookupQuery = LookupQueryValues.QuestionPoolValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -26966,10 +19153,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -26982,9 +19166,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -27001,10 +19183,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "calculation", Name="Hesaplama" } }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27014,10 +19193,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27031,13 +19207,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27047,10 +19218,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27063,10 +19231,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27076,10 +19241,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27092,10 +19254,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27105,10 +19264,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27121,10 +19277,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -27144,10 +19297,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27160,10 +19310,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27173,10 +19320,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27189,10 +19333,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27202,10 +19343,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27218,10 +19356,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -27242,10 +19377,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27258,10 +19390,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27271,10 +19400,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormQuestion.ListFormCode, @@ -27287,10 +19413,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Definitions.Question + ".Create", @@ -27300,10 +19423,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -27347,20 +19467,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.EmploymentType + ".Create", @@ -27384,19 +19492,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -27468,13 +19564,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.EmploymentType + ".Create", @@ -27484,10 +19575,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmploymentType.ListFormCode, @@ -27500,13 +19588,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.EmploymentType + ".Create", @@ -27516,10 +19599,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -27562,20 +19642,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Badge + ".Create", @@ -27599,19 +19667,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -27684,13 +19740,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27700,10 +19751,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27716,13 +19764,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27732,10 +19775,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27748,13 +19788,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27764,10 +19799,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27780,10 +19812,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27793,10 +19822,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27832,10 +19858,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "❤️", Name= "❤️ Kalp" } }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27845,10 +19868,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27861,10 +19881,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27874,10 +19891,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27890,10 +19904,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27903,10 +19914,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27937,10 +19945,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "Special", Name= "Special" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27950,10 +19955,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27966,10 +19968,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -27979,10 +19978,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -27997,10 +19993,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -28010,10 +20003,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -28039,10 +20029,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "Legendary", Name= "Legendary" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -28052,10 +20039,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormBadge.ListFormCode, @@ -28068,10 +20052,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Badge + ".Create", @@ -28081,10 +20062,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -28127,20 +20105,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28164,19 +20130,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -28259,13 +20213,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28275,10 +20224,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28291,13 +20237,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28307,10 +20248,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28323,13 +20261,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28339,10 +20272,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28354,10 +20284,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28367,10 +20294,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28383,10 +20307,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -28403,10 +20324,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28419,13 +20337,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -28451,10 +20364,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28469,10 +20379,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28482,10 +20389,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28500,10 +20404,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28513,10 +20414,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28536,10 +20434,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.CurrencyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28549,10 +20444,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28565,10 +20457,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28578,10 +20467,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28594,10 +20480,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28607,10 +20490,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28623,10 +20503,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28636,10 +20513,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormJobPosition.ListFormCode, @@ -28652,10 +20526,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.JobPosition + ".Create", @@ -28665,10 +20536,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -28711,20 +20579,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Department + ".Create", @@ -28748,19 +20604,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -28839,13 +20683,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Department + ".Create", @@ -28855,10 +20694,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -28871,13 +20707,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Department + ".Create", @@ -28887,10 +20718,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -28903,13 +20731,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Department + ".Create", @@ -28919,10 +20742,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -28934,10 +20754,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Department + ".Create", @@ -28947,10 +20764,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -28963,10 +20777,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -28983,10 +20794,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -28999,13 +20807,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -29022,10 +20825,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -29038,13 +20838,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -29061,10 +20856,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -29079,10 +20871,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Department + ".Create", @@ -29092,10 +20881,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormDepartment.ListFormCode, @@ -29108,10 +20894,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Department + ".Create", @@ -29121,10 +20904,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -29167,20 +20947,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29204,19 +20972,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -29290,13 +21046,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29306,10 +21057,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29322,13 +21070,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29338,10 +21081,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29354,13 +21094,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29370,10 +21105,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29385,10 +21117,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29398,10 +21127,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29414,10 +21140,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -29434,10 +21157,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29450,13 +21170,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -29473,10 +21188,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29489,13 +21201,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -29512,10 +21219,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29544,10 +21248,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "Administrative", Name="Administrative" } }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29557,10 +21258,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29575,10 +21273,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29588,10 +21283,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29606,10 +21298,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29619,10 +21308,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29642,10 +21328,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.CurrencyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29655,10 +21338,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29673,10 +21353,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29686,10 +21363,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormCostCenter.ListFormCode, @@ -29702,10 +21376,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.CostCenter + ".Create", @@ -29715,10 +21386,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -29761,20 +21429,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Employee + ".Create", @@ -29798,19 +21454,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -29920,13 +21564,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -29936,10 +21575,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -29952,13 +21588,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -29968,10 +21599,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -29984,13 +21612,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30000,10 +21623,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30015,10 +21635,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30028,10 +21645,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30044,10 +21658,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30057,10 +21668,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30073,13 +21681,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -30100,10 +21703,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30116,13 +21716,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -30144,10 +21739,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30160,13 +21752,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -30189,10 +21776,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30205,10 +21789,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30218,10 +21799,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -30235,10 +21813,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30248,10 +21823,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30264,10 +21836,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30277,10 +21846,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30301,10 +21867,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency LookupQuery = LookupQueryValues.CountryValues, CascadeEmptyFields = "City,District,Street" }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30314,10 +21877,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30341,10 +21901,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeParentFields = "Country", CascadeEmptyFields = "District,Street" }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30354,10 +21911,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30381,10 +21935,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency CascadeParentFields = "Country,City", CascadeEmptyFields = "Street", }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30394,10 +21945,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30410,10 +21958,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30423,10 +21968,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30439,10 +21981,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30452,10 +21991,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30468,10 +22004,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30481,10 +22014,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30497,14 +22027,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30514,10 +22038,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -30531,10 +22052,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30544,10 +22062,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30560,10 +22075,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30573,10 +22085,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30589,10 +22098,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30602,10 +22108,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30618,10 +22121,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30631,10 +22131,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30647,10 +22144,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30660,10 +22154,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30683,10 +22174,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmploymentTypeValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30696,10 +22184,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30719,10 +22204,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.JobPositionValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30732,10 +22214,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30755,10 +22234,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.DepartmentValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30768,10 +22244,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30784,10 +22257,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30797,10 +22267,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30820,10 +22287,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30833,10 +22297,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30851,10 +22312,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30864,10 +22322,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30887,10 +22342,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.CurrencyValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30900,10 +22352,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30927,10 +22376,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "Months", Name= "Months" } }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30940,10 +22386,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30963,10 +22406,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.BankAccountValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -30976,10 +22416,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEmployee.ListFormCode, @@ -30999,10 +22436,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.BadgeValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Employee + ".Create", @@ -31012,10 +22446,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -31058,20 +22489,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Leave + ".Create", @@ -31095,19 +22514,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -31215,13 +22622,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31231,10 +22633,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31247,13 +22646,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -31270,10 +22664,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31302,13 +22693,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "Unpaid", Name="Unpaid" } }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31318,10 +22704,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31333,13 +22716,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31349,10 +22727,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31365,13 +22740,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31381,10 +22751,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31398,13 +22765,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31414,10 +22776,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31430,10 +22789,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31443,10 +22799,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31459,13 +22812,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31475,10 +22823,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31491,13 +22836,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -31519,10 +22859,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31535,10 +22872,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31548,10 +22882,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31571,10 +22902,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31584,10 +22912,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31600,10 +22925,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31613,10 +22935,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormLeave.ListFormCode, @@ -31629,10 +22948,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Leave + ".Create", @@ -31642,10 +22958,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -31688,20 +23001,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Overtime + ".Create", @@ -31725,19 +23026,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -31840,13 +23129,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -31856,10 +23140,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -31872,13 +23153,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -31895,10 +23171,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -31910,13 +23183,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -31926,10 +23194,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -31942,13 +23207,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -31958,10 +23218,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -31975,13 +23232,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -31991,10 +23243,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32007,13 +23256,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -32023,10 +23267,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32039,13 +23280,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -32066,10 +23302,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32084,10 +23317,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -32097,10 +23327,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32113,13 +23340,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -32141,10 +23363,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32157,10 +23376,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -32170,10 +23386,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32193,10 +23406,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -32206,10 +23416,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32222,10 +23429,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -32235,10 +23439,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormOvertime.ListFormCode, @@ -32251,10 +23452,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Overtime + ".Create", @@ -32264,10 +23462,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -32310,20 +23505,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32347,19 +23530,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -32517,13 +23688,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32533,10 +23699,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32549,13 +23712,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -32572,10 +23730,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32588,13 +23743,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32604,10 +23754,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32640,13 +23787,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key=12, Name= "12-Aralık" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32656,10 +23798,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32671,13 +23810,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32687,10 +23821,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32705,13 +23836,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32721,10 +23847,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32739,10 +23862,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32752,10 +23872,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32770,10 +23887,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32783,10 +23897,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32801,10 +23912,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32814,10 +23922,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32832,10 +23937,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32845,10 +23947,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32863,10 +23962,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32876,10 +23972,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPayroll.ListFormCode, @@ -32894,10 +23987,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Payroll + ".Create", @@ -32907,10 +23997,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -32924,13 +24011,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -32953,10 +24035,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -32999,20 +24078,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Template360 + ".Create", @@ -33036,19 +24103,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -33126,13 +24181,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Template360 + ".Create", @@ -33142,10 +24192,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTemplate360.ListFormCode, @@ -33158,13 +24205,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Template360 + ".Create", @@ -33174,10 +24216,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTemplate360.ListFormCode, @@ -33190,10 +24229,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Template360 + ".Create", @@ -33203,10 +24239,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTemplate360.ListFormCode, @@ -33219,9 +24252,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -33238,10 +24269,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "external", Name= "External" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Template360 + ".Create", @@ -33251,10 +24279,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -33297,20 +24322,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33334,19 +24347,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -33428,13 +24429,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33444,10 +24440,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33460,13 +24453,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33476,10 +24464,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33492,10 +24477,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33505,10 +24487,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33521,9 +24500,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -33531,10 +24508,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.Template360Values }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33544,10 +24518,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33559,13 +24530,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33575,10 +24541,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33591,13 +24554,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33607,10 +24565,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33623,9 +24578,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -33638,10 +24591,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "Cancelled", Name= "Cancelled" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33651,10 +24601,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33667,9 +24614,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -33677,10 +24622,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.DepartmentValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33690,10 +24632,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormPerformans360.ListFormCode, @@ -33706,9 +24645,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -33716,10 +24653,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Performance360 + ".Create", @@ -33729,10 +24663,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -33776,20 +24707,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.EventType + ".Create", @@ -33813,19 +24732,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -33878,13 +24785,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.EventType + ".Create", @@ -33894,10 +24796,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEventType.ListFormCode, @@ -33912,13 +24811,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.EventType + ".Create", @@ -33928,10 +24822,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -33974,20 +24865,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.EventCategory + ".Create", @@ -34011,19 +24890,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -34076,13 +24943,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.EventCategory + ".Create", @@ -34092,10 +24954,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormEventCategory.ListFormCode, @@ -34110,13 +24969,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.EventCategory + ".Create", @@ -34126,10 +24980,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -34172,20 +25023,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.Event + ".Create", @@ -34202,19 +25041,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -34230,8 +25057,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -34286,10 +25112,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34299,7 +25122,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // CategoryId new() @@ -34323,10 +25146,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.EventCategoryValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34336,7 +25156,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // TypeId new() @@ -34360,10 +25180,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "Key", LookupQuery = LookupQueryValues.EventTypeValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34373,7 +25190,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Name new() @@ -34394,10 +25211,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34407,7 +25221,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Place new() @@ -34421,10 +25235,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34434,7 +25245,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Description new() @@ -34448,10 +25259,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34461,7 +25269,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // OrganizerId new() @@ -34481,10 +25289,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.UserValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34494,7 +25299,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // ParticipantsCount new() @@ -34508,10 +25313,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34521,7 +25323,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // ParticipantsCount new() @@ -34535,10 +25337,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = true, IsActive = true, IsDeleted = false, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34548,7 +25347,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Status new() @@ -34572,10 +25371,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Cancelled",Name="Cancelled" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Event + ".Create", @@ -34585,7 +25381,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -34628,20 +25424,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Training + ".Create", @@ -34665,19 +25449,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -34769,13 +25541,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -34785,10 +25552,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -34801,13 +25565,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -34817,10 +25576,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -34833,10 +25589,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -34846,10 +25599,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -34862,13 +25612,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -34878,10 +25623,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -34907,13 +25649,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "other", Name="Other" } }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -34923,10 +25660,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -34950,13 +25684,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "hybrid", Name="Hybrid" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -34966,10 +25695,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -34982,10 +25708,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -34995,10 +25718,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -35011,10 +25731,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -35024,10 +25741,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -35040,10 +25754,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -35053,10 +25764,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -35069,13 +25777,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -35085,10 +25788,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -35101,13 +25801,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -35117,10 +25812,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -35133,10 +25825,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -35146,10 +25835,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -35162,10 +25848,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -35175,10 +25858,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormTraining.ListFormCode, @@ -35202,10 +25882,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "completed", Name="Completed" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Training + ".Create", @@ -35215,10 +25892,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -35261,20 +25935,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.Meal + ".Create", @@ -35288,34 +25950,20 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Meal))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() - { + new() { FieldName = "DeleterId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() - { + new() { FieldName = "Id", FieldDbType = DbType.Guid, Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -35331,8 +25979,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), EditingFormJson = JsonSerializer.Serialize(new List() { - new() - { + new() { Order = 1, ColCount = 1, ColSpan = 2, @@ -35348,22 +25995,19 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency }), InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() - { + new() { FieldName = "CreationTime", FieldDbType = DbType.DateTime, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() - { + new() { FieldName = "CreatorId", FieldDbType = DbType.Guid, Value = "@USERID", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() - { + new() { FieldName = "IsDeleted", FieldDbType = DbType.Boolean, Value = "false", @@ -35392,10 +26036,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Meal + ".Create", @@ -35405,7 +26046,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // BranchId new() @@ -35429,10 +26070,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Meal + ".Create", @@ -35442,7 +26080,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Date new() @@ -35463,10 +26101,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency { new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Meal + ".Create", @@ -35476,7 +26111,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Type new() @@ -35501,10 +26136,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "dinner", Name="Dinner" } }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Meal + ".Create", @@ -35514,7 +26146,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson }, // Materials new() @@ -35554,10 +26186,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key="Roka Salatası", Name="Roka Salatası" } }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Meal + ".Create", @@ -35567,7 +26196,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -35610,20 +26239,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35647,19 +26264,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -35736,13 +26341,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35752,10 +26352,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -35779,13 +26376,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "equipment", Name="Equipment" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35795,10 +26387,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -35811,10 +26400,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35824,10 +26410,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -35847,13 +26430,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues, }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35863,10 +26441,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -35879,13 +26454,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35895,10 +26465,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -35911,13 +26478,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35927,10 +26489,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -35943,10 +26502,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35956,10 +26512,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -35972,10 +26525,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -35985,10 +26535,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -36001,10 +26548,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -36014,10 +26558,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormReservation.ListFormCode, @@ -36042,10 +26583,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "completed", Name="Completed" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Reservation + ".Create", @@ -36055,10 +26593,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -36101,20 +26636,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36138,19 +26661,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -36224,13 +26735,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36240,10 +26746,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormShuttleRoute.ListFormCode, @@ -36256,13 +26759,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36272,10 +26770,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormShuttleRoute.ListFormCode, @@ -36298,13 +26793,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "evening", Name= "Evening" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36314,10 +26804,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormShuttleRoute.ListFormCode, @@ -36330,13 +26817,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36346,10 +26828,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormShuttleRoute.ListFormCode, @@ -36362,13 +26841,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36378,10 +26852,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormShuttleRoute.ListFormCode, @@ -36394,10 +26865,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36407,10 +26875,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormShuttleRoute.ListFormCode, @@ -36423,10 +26888,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36436,10 +26898,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormShuttleRoute.ListFormCode, @@ -36469,10 +26928,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "Ümraniye", Name="Ümraniye" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.ShuttleRoute + ".Create", @@ -36482,10 +26938,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -36528,20 +26981,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36565,19 +27006,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -36656,13 +27085,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36672,10 +27096,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36688,13 +27109,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36704,10 +27120,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36720,13 +27133,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36736,10 +27144,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36752,13 +27157,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36768,10 +27168,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36784,10 +27181,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36797,10 +27191,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36825,13 +27216,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "announcement", Name= "Announcement" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36841,10 +27227,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36864,13 +27247,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36880,10 +27258,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36896,13 +27271,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36912,10 +27282,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36928,10 +27295,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36941,10 +27305,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36957,10 +27318,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -36970,10 +27328,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -36993,10 +27348,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.DepartmentValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -37006,10 +27358,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormAnnouncement.ListFormCode, @@ -37022,10 +27371,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Announcement + ".Create", @@ -37035,10 +27381,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -37081,20 +27424,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37118,19 +27449,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -37213,13 +27532,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37229,10 +27543,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37245,13 +27556,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37261,10 +27567,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37277,13 +27580,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37293,10 +27591,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37309,14 +27604,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37326,10 +27615,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37342,14 +27628,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37359,10 +27639,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37375,14 +27652,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] - { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.email) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleEmailJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37392,10 +27663,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37408,13 +27676,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37424,10 +27687,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37440,10 +27700,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37453,10 +27710,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37469,10 +27723,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37482,10 +27733,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37505,10 +27753,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37518,10 +27763,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormVisitor.ListFormCode, @@ -37545,10 +27787,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "scheduled", Name= "Scheduled" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.Visitor + ".Create", @@ -37558,10 +27797,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -37604,20 +27840,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Expense + ".Create", @@ -37641,19 +27865,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -37741,13 +27953,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -37757,10 +27964,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -37773,9 +27977,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.Query, @@ -37783,10 +27985,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -37796,10 +27995,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -37812,9 +28008,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -37826,10 +28020,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "accommodation", Name= "Accommodation" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -37839,10 +28030,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -37855,13 +28043,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -37871,10 +28054,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -37894,13 +28074,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.CurrencyValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -37910,10 +28085,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -37926,13 +28098,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -37942,10 +28109,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -37958,10 +28122,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -37971,10 +28132,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -37987,10 +28145,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -38000,10 +28155,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -38016,9 +28168,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, LookupJson = JsonSerializer.Serialize(new LookupDto { DataSourceType = UiLookupDataSourceTypeEnum.StaticData, @@ -38030,10 +28180,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "rejected", Name= "Rejected" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -38043,10 +28190,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -38059,10 +28203,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -38072,10 +28213,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormExpense.ListFormCode, @@ -38088,10 +28226,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Expense + ".Create", @@ -38101,10 +28236,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -38147,20 +28279,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.Survey + ".Create", @@ -38184,19 +28304,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -38279,13 +28387,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Survey + ".Create", @@ -38295,10 +28398,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurvey.ListFormCode, @@ -38311,13 +28411,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Survey + ".Create", @@ -38327,10 +28422,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurvey.ListFormCode, @@ -38343,13 +28435,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Survey + ".Create", @@ -38359,10 +28446,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurvey.ListFormCode, @@ -38375,10 +28459,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Survey + ".Create", @@ -38388,10 +28469,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurvey.ListFormCode, @@ -38415,13 +28493,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "closed", Name= "Closed" }, }), }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Survey + ".Create", @@ -38431,10 +28504,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurvey.ListFormCode, @@ -38447,10 +28517,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.Survey + ".Create", @@ -38460,10 +28527,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -38506,20 +28570,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -38543,19 +28595,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -38631,13 +28671,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -38647,10 +28682,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyQuestion.ListFormCode, @@ -38670,13 +28702,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.SurveyValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -38686,10 +28713,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyQuestion.ListFormCode, @@ -38702,13 +28726,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -38718,10 +28737,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyQuestion.ListFormCode, @@ -38734,13 +28750,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -38750,10 +28761,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyQuestion.ListFormCode, @@ -38779,10 +28787,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency new () { Key= "yes-no", Name= "Yes/No" }, }), }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -38792,10 +28797,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyQuestion.ListFormCode, @@ -38808,10 +28810,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -38821,10 +28820,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -38867,20 +28863,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Hr.SurveyResponse + ".Create", @@ -38904,19 +28888,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -38984,13 +28956,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyResponse + ".Create", @@ -39000,10 +28967,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyResponse.ListFormCode, @@ -39023,13 +28987,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.SurveyValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyQuestion + ".Create", @@ -39039,10 +28998,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyResponse.ListFormCode, @@ -39062,13 +29018,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyResponse + ".Create", @@ -39078,10 +29029,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyResponse.ListFormCode, @@ -39094,13 +29042,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyResponse + ".Create", @@ -39110,10 +29053,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSurveyResponse.ListFormCode, @@ -39126,10 +29066,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Hr.SurveyResponse + ".Create", @@ -39139,10 +29076,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -39185,20 +29119,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.Intranet.SocialPost + ".Create", @@ -39222,19 +29144,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -39303,13 +29213,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, SortIndex = 0, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.SocialPost + ".Create", @@ -39319,10 +29224,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSocialPost.ListFormCode, @@ -39342,13 +29244,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.EmployeeValues }), - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.SocialPost + ".Create", @@ -39358,10 +29255,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSocialPost.ListFormCode, @@ -39374,13 +29268,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.SocialPost + ".Create", @@ -39390,10 +29279,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSocialPost.ListFormCode, @@ -39406,10 +29292,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.SocialPost + ".Create", @@ -39419,10 +29302,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSocialPost.ListFormCode, @@ -39435,10 +29315,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.SocialPost + ".Create", @@ -39448,10 +29325,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormSocialPost.ListFormCode, @@ -39464,10 +29338,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.Intranet.SocialPost + ".Create", @@ -39477,10 +29348,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, ]); #endregion @@ -39524,20 +29392,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.SupplyChain.MaterialType + ".Create", @@ -39561,19 +29417,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -39636,13 +29480,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialType + ".Create", @@ -39652,10 +29491,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialType.ListFormCode, @@ -39668,13 +29504,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialType + ".Create", @@ -39684,10 +29515,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialType.ListFormCode, @@ -39702,13 +29530,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialType + ".Create", @@ -39718,10 +29541,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialType.ListFormCode, @@ -39734,10 +29554,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialType + ".Create", @@ -39747,10 +29564,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { @@ -39764,10 +29578,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialType + ".Create", @@ -39777,10 +29588,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson } }); #endregion @@ -39823,20 +29631,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), GroupPanelJson = JsonSerializer.Serialize(new { Visible = true }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnAutoWidth = true, - ColumnChooserEnabled = true, - AllowColumnResizing = true, - AllowColumnReordering = true, - ColumnResizingMode = "widget", - }), + SelectionJson = DefaultSelectionSingleJson, + ColumnOptionJson = DefaultColumnOptionJson, PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -39860,19 +29656,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Value = "@ID", CustomValueType = FieldCustomValueTypeEnum.CustomKey } }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), + PagerOptionJson = DefaultPagerOptionJson, EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto { Popup = new GridEditingPopupDto() @@ -39936,13 +29720,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency Visible = false, IsActive = true, IsDeleted = false, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -39952,10 +29731,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialGroup.ListFormCode, @@ -39968,13 +29744,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -39984,10 +29755,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialGroup.ListFormCode, @@ -40000,13 +29768,8 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required) } - }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ValidationRuleJson = DefaultValidationRuleRequiredJson, + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -40016,10 +29779,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialGroup.ListFormCode, @@ -40032,10 +29792,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -40045,10 +29802,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialGroup.ListFormCode, @@ -40061,10 +29815,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency IsActive = true, IsDeleted = false, AllowSearch = true, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -40074,10 +29825,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialGroup.ListFormCode, @@ -40097,10 +29845,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency ValueExpr = "key", LookupQuery = LookupQueryValues.MaterialGroupValues, }), - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -40110,10 +29855,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = true, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) + PivotSettingsJson = DefaultPivotSettingsJson }, new() { ListFormCode = listFormMaterialGroup.ListFormCode, @@ -40128,10 +29870,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency AllowSearch = true, SortIndex = 1, SortDirection = GridColumnOptions.SortOrderAsc, - ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto - { - AllowReordering = true, - }), + ColumnCustomizationJson = DefaultColumnCustomizationJson, PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto { C = AppCodes.SupplyChain.MaterialGroup + ".Create", @@ -40141,10 +29880,7 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency I = false, Deny = false }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }), + PivotSettingsJson = DefaultPivotSettingsJson, } }); #endregion @@ -40152,4 +29888,4 @@ public class ListSeeder : IDataSeedContributor, ITransientDependency #endregion } -} +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs b/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs index 66eb3b1a..a06f8805 100644 --- a/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs +++ b/api/src/Kurs.Platform.Domain.Shared/Enums/LookUpQueryValues.cs @@ -52,7 +52,7 @@ public static class LookupQueryValues public static string BlogCategoryValues = $"SELECT " + - $"\"Code\" AS \"Key\", " + + $"\"Id\" AS \"Key\", " + $"\"Name\" AS \"Name\" " + $"FROM \"{FullNameTable(TableNameEnum.BlogCategory)}\" " + $"WHERE \"IsDeleted\" = 'false' " + @@ -306,5 +306,21 @@ public static class LookupQueryValues $"\"Id\" AS \"Key\", " + $"\"HierarchyPath\" AS \"Name\" " + $"FROM \"{FullNameView(TableNameEnum.MaterialGroup)}\" " + - $"WHERE \"IsDeleted\" = 'false' "; + $"WHERE \"IsDeleted\" = 'false' "; + + public static string PermissionNameValues = + $"SELECT \"Name\" AS \"Key\", " + + $"CONCAT(\"Name\", ' (', \"DisplayName\", ')') AS \"Name\" " + + $"FROM \"AbpPermissions\" " + + $"WHERE \"IsDeleted\" = 'false' " + + $"ORDER BY \"Name\";"; + + public static string MenuCodeValues = + $"SELECT " + + $"\"Code\" AS \"Key\", " + + $"\"DisplayName\" AS \"Name\" " + + $"FROM \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Menu))}\" " + + $"WHERE \"IsDeleted\" = 'false' " + + "AND \"IsDisabled\" = 'false' " + + $"ORDER BY \"ParentCode\", \"Order\";"; } \ No newline at end of file diff --git a/ui/src/views/intranet/Dashboard.tsx b/ui/src/views/intranet/Dashboard.tsx index da663313..1581fc3b 100644 --- a/ui/src/views/intranet/Dashboard.tsx +++ b/ui/src/views/intranet/Dashboard.tsx @@ -29,13 +29,13 @@ import AnnouncementDetailModal from './modals/AnnouncementDetailModal' // Social Wall import SocialWall from './SocialWall' -import { SurveyDto } from '@/types/intranet' import { Container } from '@/components/shared' import { usePermission } from '@/utils/hooks/usePermission' -import { AnnouncementDto, IntranetDashboardDto, SurveyAnswerDto } from '@/proxy/intranet/models' +import { AnnouncementDto, IntranetDashboardDto, SurveyAnswerDto, SurveyDto } from '@/proxy/intranet/models' import { intranetService } from '@/services/intranet.service' import Announcements from './widgets/Announcements' import ShuttleRoute from './widgets/ShuttleRoute' +import { useLocalization } from '@/utils/hooks/useLocalization' dayjs.locale('tr') dayjs.extend(relativeTime) @@ -60,6 +60,7 @@ const IntranetDashboard: React.FC = () => { }) const [intranetDashboard, setIntranetDashboard] = useState() + const { translate } = useLocalization() const fetchIntranetDashboard = async () => { const dashboard = await intranetService.getDashboard() @@ -505,7 +506,7 @@ const IntranetDashboard: React.FC = () => {

- Hoş geldiniz,{' '} + {translate('::AI.Welcome')},{' '} {dayjs().format('DD MMMM YYYY dddd')}