From 7f0e1fc294712668d6a73d5055b2951dbb7c284c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Sun, 5 Oct 2025 21:20:30 +0300 Subject: [PATCH] =?UTF-8?q?Yeni=20tan=C4=B1mlamalar=20i=C3=A7in=20men?= =?UTF-8?q?=C3=BC,=20ingilizce=20isimleri=20ve=20seeder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/ListFormsSeeder.cs | 2918 ++++++++++++++++- .../Seeds/SeederData.json | 888 ++++- .../PlatformConsts.cs | 14 + .../Kurs.Platform.Domain/Data/SeedConsts.cs | 14 + .../Entities/Administration/NoteType.cs | 4 +- ....cs => 20251005181214_Initial.Designer.cs} | 32 +- ...1_Initial.cs => 20251005181214_Initial.cs} | 9 +- .../PlatformDbContextModelSnapshot.cs | 30 + 8 files changed, 3901 insertions(+), 8 deletions(-) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251003212541_Initial.Designer.cs => 20251005181214_Initial.Designer.cs} (99%) rename api/src/Kurs.Platform.EntityFrameworkCore/Migrations/{20251003212541_Initial.cs => 20251005181214_Initial.cs} (99%) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 2ae8e172..e460818a 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -18184,7 +18184,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency Value = "false", CustomValueType = FieldCustomValueTypeEnum.Value } }), - } + } ); #region Behavior Fields @@ -18256,6 +18256,2922 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency } #endregion + #region Disease + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Disease)) + { + var listFormDisease = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Disease, + Name = AppCodes.Definitions.Disease, + Title = AppCodes.Definitions.Disease, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.Disease, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Disease", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.Disease + ".Create", + R = AppCodes.Definitions.Disease, + U = AppCodes.Definitions.Disease + ".Update", + D = AppCodes.Definitions.Disease + ".Delete", + E = AppCodes.Definitions.Disease + ".Export", + I = AppCodes.Definitions.Disease + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Disease", Prefix.DbTableDefinition)}\" 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() + { + Title = "Disease Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region Disease Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormDisease.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Disease + ".Create", + R = AppCodes.Definitions.Disease, + U = AppCodes.Definitions.Disease + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormDisease.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Disease + ".Create", + R = AppCodes.Definitions.Disease, + U = AppCodes.Definitions.Disease + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region Document + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Document)) + { + var listFormDocument = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Document, + Name = AppCodes.Definitions.Document, + Title = AppCodes.Definitions.Document, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.Document, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Document", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.Document + ".Create", + R = AppCodes.Definitions.Document, + U = AppCodes.Definitions.Document + ".Update", + D = AppCodes.Definitions.Document + ".Delete", + E = AppCodes.Definitions.Document + ".Export", + I = AppCodes.Definitions.Document + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Document", Prefix.DbTableDefinition)}\" 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() + { + Title = "Document Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region Document Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormDocument.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Document + ".Create", + R = AppCodes.Definitions.Document, + U = AppCodes.Definitions.Document + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormDocument.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Document + ".Create", + R = AppCodes.Definitions.Document, + U = AppCodes.Definitions.Document + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region EducationStatus + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.EducationStatus)) + { + var listFormEducationStatus = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.EducationStatus, + Name = AppCodes.Definitions.EducationStatus, + Title = AppCodes.Definitions.EducationStatus, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.EducationStatus, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("EducationStatus", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.EducationStatus + ".Create", + R = AppCodes.Definitions.EducationStatus, + U = AppCodes.Definitions.EducationStatus + ".Update", + D = AppCodes.Definitions.EducationStatus + ".Delete", + E = AppCodes.Definitions.EducationStatus + ".Export", + I = AppCodes.Definitions.EducationStatus + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("EducationStatus", Prefix.DbTableDefinition)}\" 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() + { + Title = "Education Status Form", + Width = 500, + Height = 250 + }, + 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 = "Order", ColSpan = 2, EditorType2=EditorTypes.dxNumberBox }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region EducationStatus Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormEducationStatus.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.EducationStatus + ".Create", + R = AppCodes.Definitions.EducationStatus, + U = AppCodes.Definitions.EducationStatus + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormEducationStatus.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.EducationStatus + ".Create", + R = AppCodes.Definitions.EducationStatus, + U = AppCodes.Definitions.EducationStatus + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormEducationStatus.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Int32, + FieldName = "Order", + Width = 100, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + SortIndex = 1, + SortDirection = GridColumnOptions.SortOrderAsc, + AllowSearch = true, + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.EducationStatus + ".Create", + R = AppCodes.Definitions.EducationStatus, + U = AppCodes.Definitions.EducationStatus + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region EventType + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.EventType)) + { + var listFormEventType = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.EventType, + Name = AppCodes.Definitions.EventType, + Title = AppCodes.Definitions.EventType, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.EventType, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("EventType", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.EventType + ".Create", + R = AppCodes.Definitions.EventType, + U = AppCodes.Definitions.EventType + ".Update", + D = AppCodes.Definitions.EventType + ".Delete", + E = AppCodes.Definitions.EventType + ".Export", + I = AppCodes.Definitions.EventType + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("EventType", Prefix.DbTableDefinition)}\" 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() + { + Title = "Event Type Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region EventType Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormEventType.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.EventType + ".Create", + R = AppCodes.Definitions.EventType, + U = AppCodes.Definitions.EventType + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormEventType.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.EventType + ".Create", + R = AppCodes.Definitions.EventType, + U = AppCodes.Definitions.EventType + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region EventCategory + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.EventCategory)) + { + var listFormEventCategory = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.EventCategory, + Name = AppCodes.Definitions.EventCategory, + Title = AppCodes.Definitions.EventCategory, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.EventCategory, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("EventCategory", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.EventCategory + ".Create", + R = AppCodes.Definitions.EventCategory, + U = AppCodes.Definitions.EventCategory + ".Update", + D = AppCodes.Definitions.EventCategory + ".Delete", + E = AppCodes.Definitions.EventCategory + ".Export", + I = AppCodes.Definitions.EventCategory + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("EventCategory", Prefix.DbTableDefinition)}\" 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() + { + Title = "Event Category Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region EventCategory Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormEventCategory.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.EventCategory + ".Create", + R = AppCodes.Definitions.EventCategory, + U = AppCodes.Definitions.EventCategory + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormEventCategory.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.EventCategory + ".Create", + R = AppCodes.Definitions.EventCategory, + U = AppCodes.Definitions.EventCategory + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region Information + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Information)) + { + var listFormInformation = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Information, + Name = AppCodes.Definitions.Information, + Title = AppCodes.Definitions.Information, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.Information, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Information", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.Information + ".Create", + R = AppCodes.Definitions.Information, + U = AppCodes.Definitions.Information + ".Update", + D = AppCodes.Definitions.Information + ".Delete", + E = AppCodes.Definitions.Information + ".Export", + I = AppCodes.Definitions.Information + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Information", Prefix.DbTableDefinition)}\" 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() + { + Title = "Information Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region Information Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormInformation.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Information + ".Create", + R = AppCodes.Definitions.Information, + U = AppCodes.Definitions.Information + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormInformation.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Information + ".Create", + R = AppCodes.Definitions.Information, + U = AppCodes.Definitions.Information + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region MeetingMethod + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MeetingMethod)) + { + var listFormMeetingMethod = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.MeetingMethod, + Name = AppCodes.Definitions.MeetingMethod, + Title = AppCodes.Definitions.MeetingMethod, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.MeetingMethod, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("MeetingMethod", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.MeetingMethod + ".Create", + R = AppCodes.Definitions.MeetingMethod, + U = AppCodes.Definitions.MeetingMethod + ".Update", + D = AppCodes.Definitions.MeetingMethod + ".Delete", + E = AppCodes.Definitions.MeetingMethod + ".Export", + I = AppCodes.Definitions.MeetingMethod + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("MeetingMethod", Prefix.DbTableDefinition)}\" 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() + { + Title = "Meeting Method Form", + Width = 500, + Height = 250 + }, + 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 = "Type", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region MeetingMethod Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormMeetingMethod.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.MeetingMethod + ".Create", + R = AppCodes.Definitions.MeetingMethod, + U = AppCodes.Definitions.MeetingMethod + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormMeetingMethod.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.MeetingMethod + ".Create", + R = AppCodes.Definitions.MeetingMethod, + U = AppCodes.Definitions.MeetingMethod + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormMeetingMethod.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Type", + Width = 250, + ListOrderNo = 3, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.MeetingMethod + ".Create", + R = AppCodes.Definitions.MeetingMethod, + U = AppCodes.Definitions.MeetingMethod + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region MeetingResult + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.MeetingResult)) + { + var listFormMeetingResult = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.MeetingResult, + Name = AppCodes.Definitions.MeetingResult, + Title = AppCodes.Definitions.MeetingResult, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.MeetingResult, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("MeetingResult", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.MeetingResult + ".Create", + R = AppCodes.Definitions.MeetingResult, + U = AppCodes.Definitions.MeetingResult + ".Update", + D = AppCodes.Definitions.MeetingResult + ".Delete", + E = AppCodes.Definitions.MeetingResult + ".Export", + I = AppCodes.Definitions.MeetingResult + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("MeetingResult", Prefix.DbTableDefinition)}\" 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() + { + Title = "Meeting Result Form", + Width = 500, + Height = 250 + }, + 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 = "Order", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxNumberBox }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region MeetingResult Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormMeetingResult.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.MeetingResult + ".Create", + R = AppCodes.Definitions.MeetingResult, + U = AppCodes.Definitions.MeetingResult + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormMeetingResult.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.MeetingResult + ".Create", + R = AppCodes.Definitions.MeetingResult, + U = AppCodes.Definitions.MeetingResult + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormMeetingResult.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Order", + Width = 250, + ListOrderNo = 3, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.MeetingResult + ".Create", + R = AppCodes.Definitions.MeetingResult, + U = AppCodes.Definitions.MeetingResult + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region Program + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Program)) + { + var listFormProgram = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Program, + Name = AppCodes.Definitions.Program, + Title = AppCodes.Definitions.Program, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.Program, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Program", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.Program + ".Create", + R = AppCodes.Definitions.Program, + U = AppCodes.Definitions.Program + ".Update", + D = AppCodes.Definitions.Program + ".Delete", + E = AppCodes.Definitions.Program + ".Export", + I = AppCodes.Definitions.Program + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Program", Prefix.DbTableDefinition)}\" 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() + { + Title = "Program Form", + Width = 500, + Height = 250 + }, + 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 = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region Program Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormProgram.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Program + ".Create", + R = AppCodes.Definitions.Program, + U = AppCodes.Definitions.Program + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormProgram.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Program + ".Create", + R = AppCodes.Definitions.Program, + U = AppCodes.Definitions.Program + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormProgram.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Status", + Width = 250, + ListOrderNo = 3, + 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="Aktif",Name="Aktif" }, + new () { Key="Pasif",Name="Pasif" }, + }), + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Program + ".Create", + R = AppCodes.Definitions.Program, + U = AppCodes.Definitions.Program + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region Interesting + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Interesting)) + { + var listFormInteresting = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Interesting, + Name = AppCodes.Definitions.Interesting, + Title = AppCodes.Definitions.Interesting, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.Interesting, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Interesting", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.Interesting + ".Create", + R = AppCodes.Definitions.Interesting, + U = AppCodes.Definitions.Interesting + ".Update", + D = AppCodes.Definitions.Interesting + ".Delete", + E = AppCodes.Definitions.Interesting + ".Export", + I = AppCodes.Definitions.Interesting + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Interesting", Prefix.DbTableDefinition)}\" 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() + { + Title = "Interesting Form", + Width = 500, + Height = 250 + }, + 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 = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region Interesting Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormInteresting.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Interesting + ".Create", + R = AppCodes.Definitions.Interesting, + U = AppCodes.Definitions.Interesting + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormInteresting.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Interesting + ".Create", + R = AppCodes.Definitions.Interesting, + U = AppCodes.Definitions.Interesting + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormInteresting.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Status", + Width = 250, + ListOrderNo = 3, + 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="Aktif",Name="Aktif" }, + new () { Key="Pasif",Name="Pasif" }, + }), + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Interesting + ".Create", + R = AppCodes.Definitions.Interesting, + U = AppCodes.Definitions.Interesting + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region SalesRejectionReason + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.SalesRejectionReason)) + { + var listFormSalesRejectionReason = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.SalesRejectionReason, + Name = AppCodes.Definitions.SalesRejectionReason, + Title = AppCodes.Definitions.SalesRejectionReason, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.SalesRejectionReason, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("SalesRejectionReason", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.SalesRejectionReason + ".Create", + R = AppCodes.Definitions.SalesRejectionReason, + U = AppCodes.Definitions.SalesRejectionReason + ".Update", + D = AppCodes.Definitions.SalesRejectionReason + ".Delete", + E = AppCodes.Definitions.SalesRejectionReason + ".Export", + I = AppCodes.Definitions.SalesRejectionReason + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("SalesRejectionReason", Prefix.DbTableDefinition)}\" 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() + { + Title = "Sales Rejection Reason Form", + Width = 500, + Height = 250 + }, + 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 = "Status", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region SalesRejectionReason Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormSalesRejectionReason.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.SalesRejectionReason + ".Create", + R = AppCodes.Definitions.SalesRejectionReason, + U = AppCodes.Definitions.SalesRejectionReason + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormSalesRejectionReason.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.SalesRejectionReason + ".Create", + R = AppCodes.Definitions.SalesRejectionReason, + U = AppCodes.Definitions.SalesRejectionReason + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormSalesRejectionReason.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Status", + Width = 250, + ListOrderNo = 3, + 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="Aktif",Name="Aktif" }, + new () { Key="Pasif",Name="Pasif" }, + }), + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.SalesRejectionReason + ".Create", + R = AppCodes.Definitions.SalesRejectionReason, + U = AppCodes.Definitions.SalesRejectionReason + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region Source + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Source)) + { + var listFormSource = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Source, + Name = AppCodes.Definitions.Source, + Title = AppCodes.Definitions.Source, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.Source, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Source", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.Source + ".Create", + R = AppCodes.Definitions.Source, + U = AppCodes.Definitions.Source + ".Update", + D = AppCodes.Definitions.Source + ".Delete", + E = AppCodes.Definitions.Source + ".Export", + I = AppCodes.Definitions.Source + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Source", Prefix.DbTableDefinition)}\" 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() + { + Title = "Source Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region Source Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormSource.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Source + ".Create", + R = AppCodes.Definitions.Source, + U = AppCodes.Definitions.Source + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormSource.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Source + ".Create", + R = AppCodes.Definitions.Source, + U = AppCodes.Definitions.Source + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormSource.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Status", + Width = 250, + ListOrderNo = 3, + 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="Aktif",Name="Aktif" }, + new () { Key="Pasif",Name="Pasif" }, + }), + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Source + ".Create", + R = AppCodes.Definitions.Source, + U = AppCodes.Definitions.Source + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region Vaccine + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Vaccine)) + { + var listFormVaccine = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Vaccine, + Name = AppCodes.Definitions.Vaccine, + Title = AppCodes.Definitions.Vaccine, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.Vaccine, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Vaccine", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.Vaccine + ".Create", + R = AppCodes.Definitions.Vaccine, + U = AppCodes.Definitions.Vaccine + ".Update", + D = AppCodes.Definitions.Vaccine + ".Delete", + E = AppCodes.Definitions.Vaccine + ".Export", + I = AppCodes.Definitions.Vaccine + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("Vaccine", Prefix.DbTableDefinition)}\" 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() + { + Title = "Vaccine Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region Vaccine Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormVaccine.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Vaccine + ".Create", + R = AppCodes.Definitions.Vaccine, + U = AppCodes.Definitions.Vaccine + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormVaccine.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.Vaccine + ".Create", + R = AppCodes.Definitions.Vaccine, + U = AppCodes.Definitions.Vaccine + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #region NoteType + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.NoteType)) + { + var listFormNoteType = await _listFormRepository.InsertAsync( + new ListForm() + { + ListFormType = ListFormTypeEnum.List, + IsSubForm = false, + LayoutJson = JsonSerializer.Serialize(new LayoutDto() + { + Grid = true, + Card = true, + Pivot = true, + Chart = true, + DefaultLayout = "grid", + CardLayoutColumn = 3 + }), + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.NoteType, + Name = AppCodes.Definitions.NoteType, + Title = AppCodes.Definitions.NoteType, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = true, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Definitions.NoteType, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("NoteType", Prefix.DbTableDefinition), + 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, + ColumnChooserEnabled = true + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Definitions.NoteType + ".Create", + R = AppCodes.Definitions.NoteType, + U = AppCodes.Definitions.NoteType + ".Update", + D = AppCodes.Definitions.NoteType + ".Delete", + E = AppCodes.Definitions.NoteType + ".Export", + I = AppCodes.Definitions.NoteType + ".Import", + }), + DeleteCommand = $"UPDATE \"{SelectCommandByTableName("NoteType", Prefix.DbTableDefinition)}\" 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() + { + Title = "Note Type Form", + Width = 500, + Height = 250 + }, + 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 }, + ] + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { + new() { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey }, + new() { + FieldName = "IsDeleted", + FieldDbType = DbType.Boolean, + Value = "false", + CustomValueType = FieldCustomValueTypeEnum.Value } + }), + } + ); + + #region NoteType Fields + await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { + new() { + ListFormCode = listFormNoteType.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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.NoteType + ".Create", + R = AppCodes.Definitions.NoteType, + U = AppCodes.Definitions.NoteType + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + }, + new() { + ListFormCode = listFormNoteType.ListFormCode, + RoleId = null, + UserId = null, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Name", + Width = 250, + 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) } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Definitions.NoteType + ".Create", + R = AppCodes.Definitions.NoteType, + U = AppCodes.Definitions.NoteType + ".Update", + E = true, + I = true, + Deny = false + }), + PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto + { + IsPivot = true + }) + } + }); + #endregion + } + #endregion + + #endregion } } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 794d90fe..355efc0e 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -2790,6 +2790,14 @@ "IsEnabled": true, "MultiTenancySide": 3 }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.BankAccount.Import", + "ParentName": "App.Definitions.BankAccount", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, { "GroupName": "App.Administration", "Name": "App.Definitions.Behavior", @@ -2830,15 +2838,687 @@ "IsEnabled": true, "MultiTenancySide": 3 }, - { "GroupName": "App.Administration", - "Name": "App.Definitions.BankAccount.Import", - "ParentName": "App.Definitions.BankAccount", + "Name": "App.Definitions.Behavior.Import", + "ParentName": "App.Definitions.Behavior", "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 3 }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Disease", + "ParentName": null, + "DisplayName": "App.Definitions.Disease", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Disease.Create", + "ParentName": "App.Definitions.Disease", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Disease.Update", + "ParentName": "App.Definitions.Disease", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Disease.Delete", + "ParentName": "App.Definitions.Disease", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Disease.Export", + "ParentName": "App.Definitions.Disease", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Disease.Import", + "ParentName": "App.Definitions.Disease", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Document", + "ParentName": null, + "DisplayName": "App.Definitions.Document", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Document.Create", + "ParentName": "App.Definitions.Document", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Document.Update", + "ParentName": "App.Definitions.Document", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Document.Delete", + "ParentName": "App.Definitions.Document", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Document.Export", + "ParentName": "App.Definitions.Document", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Document.Import", + "ParentName": "App.Definitions.Document", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EducationStatus", + "ParentName": null, + "DisplayName": "App.Definitions.EducationStatus", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EducationStatus.Create", + "ParentName": "App.Definitions.EducationStatus", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EducationStatus.Update", + "ParentName": "App.Definitions.EducationStatus", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EducationStatus.Delete", + "ParentName": "App.Definitions.EducationStatus", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EducationStatus.Export", + "ParentName": "App.Definitions.EducationStatus", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EducationStatus.Import", + "ParentName": "App.Definitions.EducationStatus", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventType", + "ParentName": null, + "DisplayName": "App.Definitions.EventType", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventType.Create", + "ParentName": "App.Definitions.EventType", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventType.Update", + "ParentName": "App.Definitions.EventType", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventType.Delete", + "ParentName": "App.Definitions.EventType", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventType.Export", + "ParentName": "App.Definitions.EventType", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventType.Import", + "ParentName": "App.Definitions.EventType", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventCategory", + "ParentName": null, + "DisplayName": "App.Definitions.EventCategory", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventCategory.Create", + "ParentName": "App.Definitions.EventCategory", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventCategory.Update", + "ParentName": "App.Definitions.EventCategory", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventCategory.Delete", + "ParentName": "App.Definitions.EventCategory", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventCategory.Export", + "ParentName": "App.Definitions.EventCategory", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.EventCategory.Import", + "ParentName": "App.Definitions.EventCategory", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Information", + "ParentName": null, + "DisplayName": "App.Definitions.Information", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Information.Create", + "ParentName": "App.Definitions.Information", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Information.Update", + "ParentName": "App.Definitions.Information", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Information.Delete", + "ParentName": "App.Definitions.Information", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Information.Export", + "ParentName": "App.Definitions.Information", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Information.Import", + "ParentName": "App.Definitions.Information", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingMethod", + "ParentName": null, + "DisplayName": "App.Definitions.MeetingMethod", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingMethod.Create", + "ParentName": "App.Definitions.MeetingMethod", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingMethod.Update", + "ParentName": "App.Definitions.MeetingMethod", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingMethod.Delete", + "ParentName": "App.Definitions.MeetingMethod", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingMethod.Export", + "ParentName": "App.Definitions.MeetingMethod", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingMethod.Import", + "ParentName": "App.Definitions.MeetingMethod", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingResult", + "ParentName": null, + "DisplayName": "App.Definitions.MeetingResult", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingResult.Create", + "ParentName": "App.Definitions.MeetingResult", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingResult.Update", + "ParentName": "App.Definitions.MeetingResult", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingResult.Delete", + "ParentName": "App.Definitions.MeetingResult", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingResult.Export", + "ParentName": "App.Definitions.MeetingResult", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.MeetingResult.Import", + "ParentName": "App.Definitions.MeetingResult", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Program", + "ParentName": null, + "DisplayName": "App.Definitions.Program", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Program.Create", + "ParentName": "App.Definitions.Program", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Program.Update", + "ParentName": "App.Definitions.Program", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Program.Delete", + "ParentName": "App.Definitions.Program", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Program.Export", + "ParentName": "App.Definitions.Program", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Program.Import", + "ParentName": "App.Definitions.Program", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Interesting", + "ParentName": null, + "DisplayName": "App.Definitions.Interesting", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Interesting.Create", + "ParentName": "App.Definitions.Interesting", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Interesting.Update", + "ParentName": "App.Definitions.Interesting", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Interesting.Delete", + "ParentName": "App.Definitions.Interesting", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Interesting.Export", + "ParentName": "App.Definitions.Interesting", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Interesting.Import", + "ParentName": "App.Definitions.Interesting", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.SalesRejectionReason", + "ParentName": null, + "DisplayName": "App.Definitions.SalesRejectionReason", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.SalesRejectionReason.Create", + "ParentName": "App.Definitions.SalesRejectionReason", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.SalesRejectionReason.Update", + "ParentName": "App.Definitions.SalesRejectionReason", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.SalesRejectionReason.Delete", + "ParentName": "App.Definitions.SalesRejectionReason", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.SalesRejectionReason.Export", + "ParentName": "App.Definitions.SalesRejectionReason", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.SalesRejectionReason.Import", + "ParentName": "App.Definitions.SalesRejectionReason", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Source", + "ParentName": null, + "DisplayName": "App.Definitions.Source", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Source.Create", + "ParentName": "App.Definitions.Source", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Source.Update", + "ParentName": "App.Definitions.Source", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Source.Delete", + "ParentName": "App.Definitions.Source", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Source.Export", + "ParentName": "App.Definitions.Source", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Source.Import", + "ParentName": "App.Definitions.Source", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Vaccine", + "ParentName": null, + "DisplayName": "App.Definitions.Vaccine", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Vaccine.Create", + "ParentName": "App.Definitions.Vaccine", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Vaccine.Update", + "ParentName": "App.Definitions.Vaccine", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Vaccine.Delete", + "ParentName": "App.Definitions.Vaccine", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Vaccine.Export", + "ParentName": "App.Definitions.Vaccine", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.Vaccine.Import", + "ParentName": "App.Definitions.Vaccine", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.NoteType", + "ParentName": null, + "DisplayName": "App.Definitions.NoteType", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.NoteType.Create", + "ParentName": "App.Definitions.NoteType", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.NoteType.Update", + "ParentName": "App.Definitions.NoteType", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.NoteType.Delete", + "ParentName": "App.Definitions.NoteType", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.NoteType.Export", + "ParentName": "App.Definitions.NoteType", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { + "GroupName": "App.Administration", + "Name": "App.Definitions.NoteType.Import", + "ParentName": "App.Definitions.NoteType", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 3 + }, + { "GroupName": "App.Coordinator", "Name": "App.Classroom", @@ -6633,6 +7313,148 @@ "RequiredPermissionName": "App.Definitions.Behavior", "IsDisabled": false }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.Disease", + "DisplayName": "App.Definitions.Disease", + "Order": 12, + "Url": "/admin/list/list-disease", + "Icon": "FaDna", + "RequiredPermissionName": "App.Definitions.Disease", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.Document", + "DisplayName": "App.Definitions.Document", + "Order": 14, + "Url": "/admin/list/list-document", + "Icon": "FaFileAlt", + "RequiredPermissionName": "App.Definitions.Document", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.EducationStatus", + "DisplayName": "App.Definitions.EducationStatus", + "Order": 15, + "Url": "/admin/list/list-educationstatus", + "Icon": "FaGraduationCap", + "RequiredPermissionName": "App.Definitions.EducationStatus", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.EventType", + "DisplayName": "App.Definitions.EventType", + "Order": 16, + "Url": "/admin/list/list-eventtype", + "Icon": "FaCalendarAlt", + "RequiredPermissionName": "App.Definitions.EventType", + "IsDisabled": false + }, + + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.EventCategory", + "DisplayName": "App.Definitions.EventCategory", + "Order": 17, + "Url": "/admin/list/list-eventcategory", + "Icon": "FaTags", + "RequiredPermissionName": "App.Definitions.EventCategory", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.Information", + "DisplayName": "App.Definitions.Information", + "Order": 18, + "Url": "/admin/list/list-information", + "Icon": "FaInfoCircle", + "RequiredPermissionName": "App.Definitions.Information", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.MeetingMethod", + "DisplayName": "App.Definitions.MeetingMethod", + "Order": 19, + "Url": "/admin/list/list-meetingmethod", + "Icon": "FaHandshake", + "RequiredPermissionName": "App.Definitions.MeetingMethod", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.MeetingResult", + "DisplayName": "App.Definitions.MeetingResult", + "Order": 20, + "Url": "/admin/list/list-meetingresult", + "Icon": "FaClipboardCheck", + "RequiredPermissionName": "App.Definitions.MeetingResult", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.Program", + "DisplayName": "App.Definitions.Program", + "Order": 21, + "Url": "/admin/list/list-program", + "Icon": "FaProjectDiagram", + "RequiredPermissionName": "App.Definitions.Program", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.Interesting", + "DisplayName": "App.Definitions.Interesting", + "Order": 22, + "Url": "/admin/list/list-interesting", + "Icon": "FaStar", + "RequiredPermissionName": "App.Definitions.Interesting", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.SalesRejectionReason", + "DisplayName": "App.Definitions.SalesRejectionReason", + "Order": 23, + "Url": "/admin/list/list-salesrejectionreason", + "Icon": "FaBan", + "RequiredPermissionName": "App.Definitions.SalesRejectionReason", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.Source", + "DisplayName": "App.Definitions.Source", + "Order": 24, + "Url": "/admin/list/list-source", + "Icon": "FaBullhorn", + "RequiredPermissionName": "App.Definitions.Source", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.Vaccine", + "DisplayName": "App.Definitions.Vaccine", + "Order": 25, + "Url": "/admin/list/list-vaccine", + "Icon": "FaSyringe", + "RequiredPermissionName": "App.Definitions.Vaccine", + "IsDisabled": false + }, + { + "ParentCode": "App.Definitions", + "Code": "App.Definitions.NoteType", + "DisplayName": "App.Definitions.NoteType", + "Order": 26, + "Url": "/admin/list/list-notetype", + "Icon": "FaStickyNote", + "RequiredPermissionName": "App.Definitions.NoteType", + "IsDisabled": false + }, + { "ParentCode": null, "Code": "App.Participant", @@ -15047,6 +15869,66 @@ "tr": "Davranışlar", "en": "Behaviors" }, + { + "resourceName": "Platform", + "key": "App.Definitions.EventCategory", + "tr": "Etkinlik Kategorisi", + "en": "Event Category" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.Information", + "tr": "Bilgiler", + "en": "Information" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.MeetingMethod", + "tr": "Toplantı Yöntemleri", + "en": "Meeting Methods" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.MeetingResult", + "tr": "Toplantı Sonuçları", + "en": "Meeting Results" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.Program", + "tr": "Programlar", + "en": "Programs" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.Interesting", + "tr": "İlgi Alanları", + "en": "Interesting" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.SalesRejectionReason", + "tr": "Satış Reddetme Nedeni", + "en": "Sales Rejection Reason" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.Source", + "tr": "Kaynaklar", + "en": "Sources" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.Vaccine", + "tr": "Aşılar", + "en": "Vaccines" + }, + { + "resourceName": "Platform", + "key": "App.Definitions.NoteType", + "tr": "Not Tipleri", + "en": "Note Types" + }, { "resourceName": "Platform", "key": "App.Orders", diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index fd8e586d..4ec0c397 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -390,6 +390,20 @@ public static class PlatformConsts public const string Bank = "list-bank"; public const string BankAccount = "list-bankaccount"; public const string Behavior = "list-behavior"; + public const string Disease = "list-disease"; + public const string Document = "list-document"; + public const string EducationStatus = "list-educationstatus"; + public const string EventType = "list-eventtype"; + public const string EventCategory = "list-eventcategory"; + public const string Information = "list-information"; + public const string MeetingMethod = "list-meetingmethod"; + public const string MeetingResult = "list-meetingresult"; + public const string Program = "list-program"; + public const string Interesting = "list-interesting"; + public const string SalesRejectionReason = "list-salesrejectionreason"; + public const string Source = "list-source"; + public const string Vaccine = "list-vaccine"; + public const string NoteType = "list-notetype"; } } diff --git a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs index a4bb7dc7..64445d93 100644 --- a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs @@ -407,6 +407,20 @@ public static class SeedConsts public const string Bank = Default + ".Bank"; public const string BankAccount = Default + ".BankAccount"; public const string Behavior = Default + ".Behavior"; + public const string Disease = Default + ".Disease"; + public const string Document = Default + ".Document"; + public const string EducationStatus = Default + ".EducationStatus"; + public const string EventType = Default + ".EventType"; + public const string EventCategory = Default + ".EventCategory"; + public const string Information = Default + ".Information"; + public const string MeetingMethod = Default + ".MeetingMethod"; + public const string MeetingResult = Default + ".MeetingResult"; + public const string Program = Default + ".Program"; + public const string Interesting = Default + ".Interesting"; + public const string SalesRejectionReason = Default + ".SalesRejectionReason"; + public const string Source = Default + ".Source"; + public const string Vaccine = Default + ".Vaccine"; + public const string NoteType = Default + ".NoteType"; } } diff --git a/api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs b/api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs index 5ed769a1..77e503e0 100644 --- a/api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs +++ b/api/src/Kurs.Platform.Domain/Entities/Administration/NoteType.cs @@ -1,10 +1,10 @@ using System; -using Volo.Abp.Domain.Entities; +using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.MultiTenancy; namespace Kurs.Platform.Entities; -public class NoteType : Entity, IMultiTenant +public class NoteType : FullAuditedEntity, IMultiTenant { public Guid? TenantId { get; set; } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003212541_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251005181214_Initial.Designer.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003212541_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251005181214_Initial.Designer.cs index 390fa626..9aafdf7c 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003212541_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251005181214_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251003212541_Initial")] + [Migration("20251005181214_Initial")] partial class Initial { /// @@ -4486,6 +4486,36 @@ namespace Kurs.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + b.Property("Name") .IsRequired() .HasMaxLength(50) diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003212541_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251005181214_Initial.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003212541_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251005181214_Initial.cs index a8096148..4337c89c 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251003212541_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251005181214_Initial.cs @@ -853,7 +853,14 @@ namespace Kurs.Platform.Migrations { Id = table.Column(type: "uniqueidentifier", nullable: false), TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false) + Name = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + CreatorId = table.Column(type: "uniqueidentifier", nullable: true), + LastModificationTime = table.Column(type: "datetime2", nullable: true), + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), + IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), + DeleterId = table.Column(type: "uniqueidentifier", nullable: true), + DeletionTime = table.Column(type: "datetime2", nullable: true) }, constraints: table => { diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index a367d0f5..e04e3ff6 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -4483,6 +4483,36 @@ namespace Kurs.Platform.Migrations b.Property("Id") .HasColumnType("uniqueidentifier"); + b.Property("CreationTime") + .HasColumnType("datetime2") + .HasColumnName("CreationTime"); + + b.Property("CreatorId") + .HasColumnType("uniqueidentifier") + .HasColumnName("CreatorId"); + + b.Property("DeleterId") + .HasColumnType("uniqueidentifier") + .HasColumnName("DeleterId"); + + b.Property("DeletionTime") + .HasColumnType("datetime2") + .HasColumnName("DeletionTime"); + + b.Property("IsDeleted") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false) + .HasColumnName("IsDeleted"); + + b.Property("LastModificationTime") + .HasColumnType("datetime2") + .HasColumnName("LastModificationTime"); + + b.Property("LastModifierId") + .HasColumnType("uniqueidentifier") + .HasColumnName("LastModifierId"); + b.Property("Name") .IsRequired() .HasMaxLength(50)