From bbc2c9c1cbfa8e10ee69da53235d78d9062afb03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Thu, 21 Aug 2025 16:54:01 +0300 Subject: [PATCH] =?UTF-8?q?Public=20sayfa=20ve=20men=C3=BC=20d=C3=BCzenlem?= =?UTF-8?q?esi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/ListFormsSeeder.cs | 598 ++++++++++++++++++ .../Seeds/SeederData.json | 212 +++++-- .../PlatformConsts.cs | 2 + .../Kurs.Platform.Domain/Data/SeedConsts.cs | 2 + .../importManager/ImportDashboard.tsx | 2 +- ui/src/components/reports/TemplateEditor.tsx | 2 +- ui/src/components/ui/Dialog/Dialog.tsx | 46 +- ui/src/views/admin/chart/ChartEdit.tsx | 14 +- .../admin/role-management/RolesPermission.tsx | 72 ++- .../admin/user-management/UsersPermission.tsx | 92 ++- 10 files changed, 894 insertions(+), 148 deletions(-) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 3e012f0a..405106a2 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -15539,6 +15539,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency }, ]); #endregion + } #endregion @@ -15847,6 +15848,603 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency } #endregion + #region About Us + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.About)) + { + var listFormAbout = await _listFormRepository.InsertAsync( + new ListForm + { + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.About, + Name = AppCodes.About, + Title = AppCodes.About, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = false, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.About, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("About"), + KeyFieldName = "Id", + DefaultFilter = "\"IsDeleted\" = 'false'", + KeyFieldDbSourceType = DbType.Guid, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), + SelectionJson = JsonSerializer.Serialize(new SelectionDto + { + Mode = GridOptions.SelectionModeSingle, + AllowSelectAll = false + }), + ColumnOptionJson = JsonSerializer.Serialize(new + { + ColumnFixingEnabled = true, + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.About + ".Create", + R = AppCodes.About, + U = AppCodes.About + ".Update", + D = AppCodes.About + ".Delete", + E = AppCodes.About + ".Export", + I = AppCodes.About + ".Import" + }), + 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 = "About Form", + Width = 800, + Height = 600 + }, + 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 = "StatsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 2, DataField = "DescriptionsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + new EditingFormItemDto { Order = 3, DataField = "SectionsJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":200}" }, + ] + } + }), + DeleteCommand = $"UPDATE \"{DbTablePrefix}About\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] + { + new FieldsDefaultValue + { + FieldName = "DeleterId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + }, + new FieldsDefaultValue + { + FieldName = "Id", + FieldDbType = DbType.Guid, + Value = "@ID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new[] + { + new FieldsDefaultValue + { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + }, + new FieldsDefaultValue + { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + } + }) + }); + + #region About Fields + await _listFormFieldRepository.InsertManyAsync([ + new() + { + ListFormCode = listFormAbout.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.About + ".Create", + R = AppCodes.About, + U = AppCodes.About + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormAbout.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "StatsJson", + Width = 400, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.About + ".Create", + R = AppCodes.About, + U = AppCodes.About + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormAbout.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "DescriptionsJson", + Width = 400, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.About + ".Create", + R = AppCodes.About, + U = AppCodes.About + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormAbout.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "SectionsJson", + Width = 400, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.About + ".Create", + R = AppCodes.About, + U = AppCodes.About + ".Update", + E = true, + I = true, + Deny = false + }) + }, + ]); + #endregion + } + #endregion + + #region Contact + if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Contact)) + { + var listFormContact = await _listFormRepository.InsertAsync( + new ListForm + { + CultureName = LanguageCodes.En, + ListFormCode = ListFormCodes.Lists.Contact, + Name = AppCodes.Contact, + Title = AppCodes.Contact, + DataSourceCode = SeedConsts.DataSources.DefaultCode, + IsTenant = false, + IsBranch = false, + IsOrganizationUnit = false, + Description = AppCodes.Contact, + SelectCommandType = SelectCommandTypeEnum.Table, + SelectCommand = SelectCommandByTableName("Contact"), + KeyFieldName = "Id", + DefaultFilter = "\"IsDeleted\" = 'false'", + KeyFieldDbSourceType = DbType.Guid, + SortMode = GridOptions.SortModeSingle, + FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto { Visible = true }), + HeaderFilterJson = JsonSerializer.Serialize(new { Visible = true }), + SearchPanelJson = JsonSerializer.Serialize(new { Visible = true }), + GroupPanelJson = JsonSerializer.Serialize(new { Visible = false }), + SelectionJson = JsonSerializer.Serialize(new SelectionDto + { + Mode = GridOptions.SelectionModeSingle, + AllowSelectAll = false + }), + ColumnOptionJson = JsonSerializer.Serialize(new + { + ColumnFixingEnabled = true, + }), + PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + D = AppCodes.Contact + ".Delete", + E = AppCodes.Contact + ".Export", + I = AppCodes.Contact + ".Import" + }), + 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 = "Contact Form", + Width = 800, + Height = 600 + }, + 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 = "Address", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox }, + new EditingFormItemDto { Order = 2, DataField = "Phone", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 3, DataField = "Email", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 4, DataField = "Location", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 5, DataField = "TaxNumber", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, + new EditingFormItemDto { Order = 6, DataField = "BankJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, + new EditingFormItemDto { Order = 7, DataField = "WorkHoursJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, + new EditingFormItemDto { Order = 8, DataField = "MapJson", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextArea, EditorOptions="{\"height\":100}" }, + ] + } + }), + DeleteCommand = $"UPDATE \"{DbTablePrefix}Contact\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", + DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new[] + { + new FieldsDefaultValue + { + FieldName = "DeleterId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + }, + new FieldsDefaultValue + { + FieldName = "Id", + FieldDbType = DbType.Guid, + Value = "@ID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + } + }), + InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new[] + { + new FieldsDefaultValue + { + FieldName = "CreationTime", + FieldDbType = DbType.DateTime, + Value = "@NOW", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + }, + new FieldsDefaultValue + { + FieldName = "CreatorId", + FieldDbType = DbType.Guid, + Value = "@USERID", + CustomValueType = FieldCustomValueTypeEnum.CustomKey + } + }) + }); + + #region Contact Fields + await _listFormFieldRepository.InsertManyAsync([ + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.Guid, + FieldName = "Id", + Width = 100, + ListOrderNo = 1, + Visible = false, + IsActive = true, + IsDeleted = false, + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Address", + Width = 200, + ListOrderNo = 2, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + LookupJson = JsonSerializer.Serialize(new LookupDto { + DataSourceType = UiLookupDataSourceTypeEnum.Query, + DisplayExpr = "Name", + ValueExpr = "Key", + LookupQuery = lookupQueryLanguageKeyValues + }), + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Phone", + Width = 150, + ListOrderNo = 3, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Email", + Width = 150, + ListOrderNo = 4, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "Location", + Width = 150, + ListOrderNo = 5, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "TaxNumber", + Width = 100, + ListOrderNo = 6, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "BankJson", + Width = 100, + ListOrderNo = 7, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "WorkHoursJson", + Width = 100, + ListOrderNo = 8, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + new() + { + ListFormCode = listFormContact.ListFormCode, + CultureName = LanguageCodes.En, + SourceDbType = DbType.String, + FieldName = "MapJson", + Width = 100, + ListOrderNo = 9, + Visible = true, + IsActive = true, + IsDeleted = false, + AllowSearch = true, + ValidationRuleJson = JsonSerializer.Serialize(new[] + { + new ValidationRuleDto { Type = "required" } + }), + PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto + { + C = AppCodes.Contact + ".Create", + R = AppCodes.Contact, + U = AppCodes.Contact + ".Update", + E = true, + I = true, + Deny = false + }) + }, + ]); + #endregion + } + #endregion + #endregion } } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 94c81ba5..9bfe1d32 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -91,6 +91,14 @@ { "Name": "App.Services", "DisplayName": "App.Services" + }, + { + "Name": "App.About", + "DisplayName": "App.About" + }, + { + "Name": "App.Contact", + "DisplayName": "App.Contact" } ], "PermissionDefinitionRecords": [ @@ -2693,6 +2701,104 @@ "DisplayName": "Import", "IsEnabled": true, "MultiTenancySide": 2 + }, + + { + "GroupName": "App.About", + "Name": "App.About", + "ParentName": null, + "DisplayName": "App.About", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.About", + "Name": "App.About.Create", + "ParentName": "App.About", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.About", + "Name": "App.About.Update", + "ParentName": "App.About", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.About", + "Name": "App.About.Delete", + "ParentName": "App.About", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.About", + "Name": "App.About.Export", + "ParentName": "App.About", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.About", + "Name": "App.About.Import", + "ParentName": "App.About", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + + { + "GroupName": "App.Contact", + "Name": "App.Contact", + "ParentName": null, + "DisplayName": "App.Contact", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.Contact", + "Name": "App.Contact.Create", + "ParentName": "App.Contact", + "DisplayName": "Create", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.Contact", + "Name": "App.Contact.Update", + "ParentName": "App.Contact", + "DisplayName": "Update", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.Contact", + "Name": "App.Contact.Delete", + "ParentName": "App.Contact", + "DisplayName": "Delete", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.Contact", + "Name": "App.Contact.Export", + "ParentName": "App.Contact", + "DisplayName": "Export", + "IsEnabled": true, + "MultiTenancySide": 2 + }, + { + "GroupName": "App.Contact", + "Name": "App.Contact.Import", + "ParentName": "App.Contact", + "DisplayName": "Import", + "IsEnabled": true, + "MultiTenancySide": 2 } ], "Menus": [ @@ -3048,39 +3154,29 @@ }, { "ParentCode": "App.Public", - "Code": "App.BlogManagement", - "DisplayName": "App.BlogManagement", + "Code": "App.About", + "DisplayName": "App.About", "Order": 1, - "Url": null, - "Icon": "FcTemplate", - "RequiredPermissionName": null, + "Url": "/admin/list/list-about", + "Icon": "FcAbout", + "RequiredPermissionName": "App.About", "IsDisabled": false }, { - "ParentCode": "App.BlogManagement", - "Code": "App.BlogManagement.Category", - "DisplayName": "App.BlogManagement.Category", - "Order": 1, - "Url": "/admin/list/list-blogcategory", - "Icon": "FaCertificate", - "RequiredPermissionName": "App.BlogManagement.Category", - "IsDisabled": false - }, - { - "ParentCode": "App.BlogManagement", - "Code": "App.BlogManagement.Posts", - "DisplayName": "App.BlogManagement.Posts", + "ParentCode": "App.Public", + "Code": "App.Services", + "DisplayName": "App.Services", "Order": 2, - "Url": "/admin/list/list-blogpost", - "Icon": "FaWeixin", - "RequiredPermissionName": "App.BlogManagement.Posts", + "Url": "/admin/list/list-service", + "Icon": "FcServices", + "RequiredPermissionName": "App.Services", "IsDisabled": false }, { "ParentCode": "App.Public", "Code": "App.Orders", "DisplayName": "App.Orders", - "Order": 2, + "Order": 3, "Url": null, "Icon": "FcEndCall", "RequiredPermissionName": null, @@ -3126,11 +3222,41 @@ "RequiredPermissionName": "App.Orders.PurchaseOrders", "IsDisabled": false }, + { + "ParentCode": "App.Public", + "Code": "App.BlogManagement", + "DisplayName": "App.BlogManagement", + "Order": 4, + "Url": null, + "Icon": "FcTemplate", + "RequiredPermissionName": null, + "IsDisabled": false + }, + { + "ParentCode": "App.BlogManagement", + "Code": "App.BlogManagement.Category", + "DisplayName": "App.BlogManagement.Category", + "Order": 1, + "Url": "/admin/list/list-blogcategory", + "Icon": "FaCertificate", + "RequiredPermissionName": "App.BlogManagement.Category", + "IsDisabled": false + }, + { + "ParentCode": "App.BlogManagement", + "Code": "App.BlogManagement.Posts", + "DisplayName": "App.BlogManagement.Posts", + "Order": 2, + "Url": "/admin/list/list-blogpost", + "Icon": "FaWeixin", + "RequiredPermissionName": "App.BlogManagement.Posts", + "IsDisabled": false + }, { "ParentCode": "App.Public", "Code": "App.Demos", "DisplayName": "App.Demos", - "Order": 3, + "Order": 5, "Url": "/admin/list/list-demo", "Icon": "FcMissedCall", "RequiredPermissionName": "App.Demos", @@ -3138,12 +3264,12 @@ }, { "ParentCode": "App.Public", - "Code": "App.Services", - "DisplayName": "App.Services", - "Order": 4, - "Url": "/admin/list/list-service", - "Icon": "FcServices", - "RequiredPermissionName": "App.Services", + "Code": "App.Contact", + "DisplayName": "App.Contact", + "Order": 6, + "Url": "/admin/list/list-contact", + "Icon": "FcContacts", + "RequiredPermissionName": "App.Contact", "IsDisabled": false }, { @@ -4265,8 +4391,8 @@ { "resourceName": "Platform", "key": "App.BlogManagement", - "en": "Blog Management", - "tr": "Blog Yönetimi" + "en": "Blog", + "tr": "Blog" }, { "resourceName": "Platform", @@ -9905,8 +10031,8 @@ { "resourceName": "Platform", "key": "App.Orders", - "tr": "Siparişler", - "en": "Orders" + "tr": "Satınalma", + "en": "Buy" }, { "resourceName": "Platform", @@ -10865,8 +10991,8 @@ { "resourceName": "Platform", "key": "Public.nav.products", - "tr": "Ürünler", - "en": "Products" + "tr": "Satın Alma", + "en": "Buy" }, { "resourceName": "Platform", @@ -13949,14 +14075,26 @@ { "resourceName": "Platform", "key": "App.Demos", - "tr": "Demolar", - "en": "Demos" + "tr": "Demo", + "en": "Demo" }, { "resourceName": "Platform", "key": "App.Services", "tr": "Hizmetler", "en": "Services" + }, + { + "resourceName": "Platform", + "key": "App.About", + "tr": "Hakkımızda", + "en": "About Us" + }, + { + "resourceName": "Platform", + "key": "App.Contact", + "tr": "İletişim", + "en": "Contact" } ], "Settings": [ diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index 651b8519..14d4ee11 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -375,6 +375,8 @@ public static class PlatformConsts public const string ReportCategory = "list-reportcategory"; public const string Demo = "list-demo"; public const string Service = "list-service"; + public const string About = "list-about"; + public const string Contact = "list-contact"; } public static class Forms diff --git a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs index 884c4c49..d494d7e4 100644 --- a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs @@ -376,6 +376,8 @@ public static class SeedConsts public const string PurchaseOrders = Default + ".PurchaseOrders"; } public const string Demos = Prefix.App + ".Demos"; + public const string About = Prefix.App + ".About"; + public const string Contact = Prefix.App + ".Contact"; //Administration public const string Administration = Prefix.App + ".Administration"; diff --git a/ui/src/components/importManager/ImportDashboard.tsx b/ui/src/components/importManager/ImportDashboard.tsx index e48b42c4..0cf3ca39 100644 --- a/ui/src/components/importManager/ImportDashboard.tsx +++ b/ui/src/components/importManager/ImportDashboard.tsx @@ -216,7 +216,7 @@ export const ImportDashboard: React.FC = ({ gridDto }) => const editableColumns = getEditableColumns() return ( -
+
{/* Navigation Tabs */}
{['import', 'preview', 'history'].map((tab) => ( diff --git a/ui/src/components/reports/TemplateEditor.tsx b/ui/src/components/reports/TemplateEditor.tsx index 587afdfd..1b57a2f7 100644 --- a/ui/src/components/reports/TemplateEditor.tsx +++ b/ui/src/components/reports/TemplateEditor.tsx @@ -186,7 +186,7 @@ export const TemplateEditor: React.FC = ({
{activeTab === 'info' && (
-
+
{/* Left Column - Basic Info */}
diff --git a/ui/src/components/ui/Dialog/Dialog.tsx b/ui/src/components/ui/Dialog/Dialog.tsx index 4263f048..d0b7f219 100644 --- a/ui/src/components/ui/Dialog/Dialog.tsx +++ b/ui/src/components/ui/Dialog/Dialog.tsx @@ -8,6 +8,7 @@ import useWindowSize from '../hooks/useWindowSize' import { useState, useCallback } from 'react' import type ReactModal from 'react-modal' import type { MouseEvent } from 'react' +import { Container } from '@/components/shared' export interface DialogProps extends ReactModal.Props { closable?: boolean @@ -53,22 +54,28 @@ const Dialog = (props: DialogProps) => { onClose?.(e) } - const handleMaximize = useCallback((e: MouseEvent) => { - e.stopPropagation() - if (!isMaximized) { - setOriginalDimensions({ width, height }) - setIsMaximized(true) - onMaximize?.() - } - }, [isMaximized, width, height, onMaximize]) + const handleMaximize = useCallback( + (e: MouseEvent) => { + e.stopPropagation() + if (!isMaximized) { + setOriginalDimensions({ width, height }) + setIsMaximized(true) + onMaximize?.() + } + }, + [isMaximized, width, height, onMaximize], + ) - const handleRestore = useCallback((e: MouseEvent) => { - e.stopPropagation() - if (isMaximized) { - setIsMaximized(false) - onRestore?.() - } - }, [isMaximized, onRestore]) + const handleRestore = useCallback( + (e: MouseEvent) => { + e.stopPropagation() + if (isMaximized) { + setIsMaximized(false) + onRestore?.() + } + }, + [isMaximized, onRestore], + ) const renderCloseButton = ( @@ -128,10 +135,7 @@ const Dialog = (props: DialogProps) => { if (currentWidth !== undefined) { contentStyle.content.width = currentWidth - if ( - typeof currentSize.width !== 'undefined' && - currentSize.width <= SCREENS.sm - ) { + if (typeof currentSize.width !== 'undefined' && currentSize.width <= SCREENS.sm) { contentStyle.content.width = 'auto' } } @@ -145,7 +149,7 @@ const Dialog = (props: DialogProps) => { const dialogClass = classNames( defaultDialogContentClass, isMaximized && 'maximized', - contentClassName + contentClassName, ) return ( @@ -175,7 +179,7 @@ const Dialog = (props: DialogProps) => { animate={{ transform: isOpen ? 'scale(1)' : 'scale(0.9)', }} - style={{ + style={{ width: isMaximized ? '100vw' : 'auto', height: isMaximized ? '100vh' : 'auto', }} diff --git a/ui/src/views/admin/chart/ChartEdit.tsx b/ui/src/views/admin/chart/ChartEdit.tsx index adb45b69..011c71ad 100644 --- a/ui/src/views/admin/chart/ChartEdit.tsx +++ b/ui/src/views/admin/chart/ChartEdit.tsx @@ -38,7 +38,7 @@ import setNull from '@/utils/setNull' import { Field, FieldArray, FieldProps, Form, Formik, FormikProps, getIn } from 'formik' import { useEffect, useState } from 'react' import { Helmet } from 'react-helmet' -import { FaEdit, FaMinus, FaFileMedical, FaTrash } from 'react-icons/fa'; +import { FaEdit, FaMinus, FaFileMedical, FaPlus, FaTrash } from 'react-icons/fa' import { Link, useParams } from 'react-router-dom' import { object, string } from 'yup' import { @@ -1157,7 +1157,7 @@ function ChartEdit() { type="button" size="xs" title="Add" - icon={} + icon={} onClick={async (e) => { e.preventDefault() setDatabaseOperationsModalData({ @@ -1188,7 +1188,7 @@ function ChartEdit() { type="button" size="xs" title="Edit" - icon={} + icon={} onClick={async (e) => { e.preventDefault() setDatabaseOperationsModalData({ @@ -1206,7 +1206,7 @@ function ChartEdit() { type="button" size="xs" title="Delete" - icon={} + icon={} onClick={async (e) => { e.preventDefault() setConfirmDelete({ @@ -1477,7 +1477,7 @@ function ChartEdit() { type="button" size="xs" title="Add" - icon={} + icon={} onClick={async (e) => { e.preventDefault() setDatabaseOperationsModalData({ @@ -1508,7 +1508,7 @@ function ChartEdit() { type="button" size="xs" title="Edit" - icon={} + icon={} onClick={async (e) => { e.preventDefault() setDatabaseOperationsModalData({ @@ -1526,7 +1526,7 @@ function ChartEdit() { type="button" size="xs" title="Delete" - icon={} + icon={} onClick={async (e) => { e.preventDefault() setConfirmDelete({ diff --git a/ui/src/views/admin/role-management/RolesPermission.tsx b/ui/src/views/admin/role-management/RolesPermission.tsx index c792c37f..cab34751 100644 --- a/ui/src/views/admin/role-management/RolesPermission.tsx +++ b/ui/src/views/admin/role-management/RolesPermission.tsx @@ -201,36 +201,40 @@ function RolesPermission({ }, [name]) return permissionList ? ( - changeGroup(permissionList?.groups[0].name)} - onClose={onDialogClose} - onRequestClose={onDialogClose} - > -
- {translate('::Permission')} - {name} -
-
+ + changeGroup(permissionList?.groups[0].name)} + onClose={onDialogClose} + onRequestClose={onDialogClose} + > +
+ {translate('::Permission')} - {name} +
+
-
-
- - {translate('AbpPermissionManagement::SelectAllInAllTabs')} - +
+
+ + {translate('AbpPermissionManagement::SelectAllInAllTabs')} + +
+
+ + {translate('AbpPermissionManagement::SelectAllInThisTab')} + +
-
- - {translate('AbpPermissionManagement::SelectAllInThisTab')} - -
-
-

- + {permissionList?.groups.map((group: any) => (
-
-
- - -
-
+
+ + +
+
+ ) : ( <> ) diff --git a/ui/src/views/admin/user-management/UsersPermission.tsx b/ui/src/views/admin/user-management/UsersPermission.tsx index 15d70d3d..4d435dea 100644 --- a/ui/src/views/admin/user-management/UsersPermission.tsx +++ b/ui/src/views/admin/user-management/UsersPermission.tsx @@ -236,56 +236,54 @@ function UsersPermission({
- -
-
-
- - {permissionList?.groups.map((group) => ( - { - changeGroup(group.name) - }} +
+
+
+ + {permissionList?.groups.map((group) => ( + { + changeGroup(group.name) + }} + > + {translate('::' + group.displayName)} ( + {group.permissions.filter((a) => a.isGranted).length}) + + ))} + +
+
+
+
+ {selectedGroupPermissions.map((permission) => ( +
+ 0 ? true : false} + checked={permission.isGranted} + onChange={() => onClickCheckbox(permission)} > - {translate('::' + group.displayName)} ( - {group.permissions.filter((a) => a.isGranted).length}) - - ))} -
-
-
-
-
- {selectedGroupPermissions.map((permission) => ( -
- 0 ? true : false} - checked={permission.isGranted} - onChange={() => onClickCheckbox(permission)} - > - {translate('::' + permission.displayName)} - {permission.grantedProviders.map((provider) => ( - - ))} - -
- ))} -
+ {translate('::' + permission.displayName)} + {permission.grantedProviders.map((provider) => ( + + ))} + +
+ ))}
- +