diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/GlobalSearchSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/GlobalSearchSeeder.cs index f39f5335..58b6391c 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/GlobalSearchSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/GlobalSearchSeeder.cs @@ -22,27 +22,6 @@ public class GlobalSearchSeeder : IDataSeedContributor, ITransientDependency #region GlobalSearch await _globalSearchRepository.InsertManyAsync([ - new() { - System = "KIM", - Group = "Firma Listesi", - Term = "BRU TEXTILES", - Weight = "0.9", - Url = "/list/List-0009" - }, - new() { - System = "KIM", - Group = "Sipariş Listesi", - Term = "BRUTEX_00002", - Weight = "0.5", - Url = "/list/List-0009" - }, - new() { - System = "KIM", - Group = "Sipariş Listesi", - Term = "BRUTEX_00003", - Weight = "0.8", - Url = "/list/List-0009" - }, new() { System = "Platform", Group = "Setting Definitions", diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index c9097643..7885d83c 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -139,7 +139,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency }, AllowDeleting = true, AllowAdding = true, - AllowUpdating = false, + AllowUpdating = true, SendOnlyChangedFormValuesUpdate = false, }), EditingFormJson = JsonSerializer.Serialize(new List() @@ -6545,1448 +6545,5 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency #endregion #endregion - #region Orders - var listFormOrders = await _listFormRepository.InsertAsync( - new ListForm() - { - CultureName = LanguageCodes.En, - ListFormCode = ListFormCodes.Order, - Name = AppCodes.Crm.Orders, - Title = AppCodes.Crm.Orders, - DataSourceCode = "KIM", - IsTenant = false, - IsOrganizationUnit = true, - Description = AppCodes.Crm.Orders, - SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = "Platform_Kumas_SiparisListesi_Durum_Genel", - KeyFieldName = "SipSubID", - KeyFieldDbSourceType = DbType.Int32, - SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnChooserEnabled = true - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - D = AppCodes.Crm.Orders + ".Delete", - E = AppCodes.Crm.Orders + ".Export", - }), - 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 - { - AllowDeleting = false, - AllowAdding = false, - AllowUpdating = false, - SendOnlyChangedFormValuesUpdate = false, - }), - } - ); - - #region Orders Fields - await _listFormFieldRepository.InsertManyAsync([ - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "SipSubID", - Width = 0, - ListOrderNo = 1, - Visible = false, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "SiparisNo", - Width = 125, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Date, - FieldName = "SipTarihi", - Width = 100, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "center", - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderDesc, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "KaliteKodu", - Width = 150, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "KaliteAdi", - Width = 150, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DesenNo", - Width = 100, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DesenAdi", - Width = 150, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "VaryantNo", - Width = 100, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ProsesKodu", - Width = 120, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "SipMiktar", - CaptionName = "Sipariş Metre", - Width = 100, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "Uretimde", - CaptionName = "Üretimde", - Width = 100, - ListOrderNo = 11, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "ApreTumu", - CaptionName = "Aprede", - Width = 100, - ListOrderNo = 12, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "Depoda", - CaptionName = "Depoda", - Width = 100, - ListOrderNo = 13, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormOrders.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "CikisMiktar", - CaptionName = "Çıkış Miktarı", - Width = 100, - ListOrderNo = 14, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - ]); - #endregion - - #endregion - - #region Complaints - var listFormComplaints = await _listFormRepository.InsertAsync( - new ListForm() - { - CultureName = LanguageCodes.En, - ListFormCode = ListFormCodes.Complaint, - Name = AppCodes.Crm.Complaints, - Title = AppCodes.Crm.Complaints, - DataSourceCode = "KIM", - IsTenant = false, - IsOrganizationUnit = true, - Description = AppCodes.Crm.Complaints, - SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = "Platform_IK_Musteri_Sikayetleri_Listesi", - KeyFieldName = "SikayetID", - KeyFieldDbSourceType = DbType.Int32, - SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnChooserEnabled = true - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - D = AppCodes.Crm.Complaints + ".Delete", - E = AppCodes.Crm.Complaints + ".Export", - }), - 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 - { - AllowDeleting = false, - AllowAdding = false, - AllowUpdating = false, - SendOnlyChangedFormValuesUpdate = false, - }), - } - ); - - #region Complaints Fields - await _listFormFieldRepository.InsertManyAsync([ - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "SikayetID", - Width = 50, - ListOrderNo = 1, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Date, - FieldName = "SikayetGirisTarihi", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "center", - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderDesc, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "Bildirim_Sekli", - Width = 100, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "Bildiren_Kisi", - Width = 100, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "KaliteKodu", - Width = 150, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "KaliteAdi", - Width = 150, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DesenNo", - Width = 100, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "DesenAdi", - Width = 150, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "VaryantNo", - Width = 100, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Sikayet_Turu", - Width = 120, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Konu", - Width = 100, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "Sikayet_Miktar", - CaptionName = "Şikayet Miktar", - Width = 100, - ListOrderNo = 11, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Durum", - Width = 100, - ListOrderNo = 12, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - }) - }, - new() { - ListFormCode = listFormComplaints.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Date, - FieldName = "KapanmaTarihi", - Width = 100, - ListOrderNo = 13, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "center", - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Complaints + ".Create", - R = AppCodes.Crm.Complaints, - U = AppCodes.Crm.Complaints + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - }) - }, - ]); - #endregion - - #endregion - - #region Shipments - var listFormShipments = await _listFormRepository.InsertAsync( - new ListForm() - { - CultureName = LanguageCodes.En, - ListFormCode = ListFormCodes.Shipment, - Name = AppCodes.Crm.Shipments, - Title = AppCodes.Crm.Shipments, - DataSourceCode = "KIM", - IsTenant = false, - IsOrganizationUnit = true, - Description = AppCodes.Crm.Shipments, - SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = "Platform_Kumas_SiparisListesi_Yukleme_Listesi_Detayli", - KeyFieldName = "YuklemeSubID", - KeyFieldDbSourceType = DbType.Int32, - SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnChooserEnabled = true - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - D = AppCodes.Crm.Shipments + ".Delete", - E = AppCodes.Crm.Shipments + ".Export", - }), - 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 - { - AllowDeleting = false, - AllowAdding = false, - AllowUpdating = false, - SendOnlyChangedFormValuesUpdate = false, - }), - } - ); - - #region Shipment Fields - await _listFormFieldRepository.InsertManyAsync([ - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "YuklemeSubID", - Width = 100, - ListOrderNo = 0, - Visible = false, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Int32, - FieldName = "YuklemeID", - Width = 100, - ListOrderNo = 1, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Date, - FieldName = "YuklemeTarihi", - Width = 100, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "center", - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderDesc, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "OnayDurumu", - Width = 150, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "NakliyeSekli", - Width = 100, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "SiparisNo", - Width = 125, - ListOrderNo = 5, - Visible = true, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "MusteriKaliteAdi", - CaptionName = "Kalite Adı", - Width = 125, - ListOrderNo = 6, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "MusteriDesenAdi", - CaptionName = "Desen Adı", - Width = 125, - ListOrderNo = 7, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "MusteriRenkAdi", - CaptionName = "Renk Adı", - Width = 100, - ListOrderNo = 8, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "SipMiktar", - CaptionName = "Yüklenecek Metre", - Width = 100, - ListOrderNo = 9, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "IslemMetre", - CaptionName = "İşlem Metre", - Width = 100, - ListOrderNo = 10, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "KullanilabilirMetre", - CaptionName = "Kalan Metre", - Width = 100, - ListOrderNo = 11, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - GroupSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - TotalSummaryJson = JsonSerializer.Serialize(new ColumnTotalSummaryDto - { - SummaryType = "sum", - DisplayFormat = "{0}" - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - SummaryType = "sum" - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Single, - FieldName = "YuklemeHazirYuzde", - CaptionName = "Yüklemeye Hazır", - Width = 100, - ListOrderNo = 12, - Visible = true, - IsActive = true, - IsDeleted = false, - Alignment = "right", - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Orders + ".Create", - R = AppCodes.Crm.Orders, - U = AppCodes.Crm.Orders + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true, - }) - }, - new() { - ListFormCode = listFormShipments.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "Durum", - Width = 100, - ListOrderNo = 13, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Crm.Shipments + ".Create", - R = AppCodes.Crm.Shipments, - U = AppCodes.Crm.Shipments + ".Update", - E = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - ]); - #endregion - - #endregion - } } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/MenuSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/MenuSeeder.cs index 890a5ba2..0eb10945 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/MenuSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/MenuSeeder.cs @@ -455,72 +455,6 @@ public class MenuSeeder : IDataSeedContributor, ITransientDependency RequiredPermissionName = AppCodes.PublicApis }); - #endregion - - #region CRM - //CRM - var menuCRM = await _repository.InsertAsync(new Menu - { - Code = AppCodes.Crm.Default, - DisplayName = AppCodes.Crm.Default, - Order = 4, - IsDisabled = false, - ParentCode = null, - Icon = "FcContacts", - Target = null, - ElementId = null, - CssClass = null - }); - - //Orders - await _repository.InsertAsync(new Menu - { - Code = AppCodes.Crm.Orders, - DisplayName = AppCodes.Crm.Orders, - Order = 1, - IsDisabled = false, - ParentCode = menuCRM.Code, - Icon = "FcCustomerSupport", - Target = null, - ElementId = null, - CssClass = null, - Url = $"/list/{PlatformConsts.ListFormCodes.Order}", - RequiredPermissionName = AppCodes.Crm.Orders - }); - - //Complaints - await _repository.InsertAsync(new Menu - { - Code = AppCodes.Crm.Complaints, - DisplayName = AppCodes.Crm.Complaints, - Order = 2, - IsDisabled = false, - ParentCode = menuCRM.Code, - Icon = "FcCollaboration", - Target = null, - ElementId = null, - CssClass = null, - Url = $"/list/{PlatformConsts.ListFormCodes.Complaint}", - RequiredPermissionName = AppCodes.Crm.Complaints - }); - - //Shipments - await _repository.InsertAsync(new Menu - { - Code = AppCodes.Crm.Shipments, - DisplayName = AppCodes.Crm.Shipments, - Order = 3, - IsDisabled = false, - ParentCode = menuCRM.Code, - Icon = "FcShipped", - Target = null, - ElementId = null, - CssClass = null, - Url = $"/list/{PlatformConsts.ListFormCodes.Shipment}", - RequiredPermissionName = AppCodes.Crm.Shipments - }); - - #endregion } } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionSeeder.cs index 94508f80..be4c2627 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PermissionSeeder.cs @@ -685,75 +685,6 @@ public class PermissionSeeder : IDataSeedContributor, ITransientDependency )); } #endregion - - #region Crm - await repositoryGroup.InsertAsync(new PermissionGroupDefinitionRecord - { - Name = AppCodes.Crm.Default, - DisplayName = AppCodes.Crm.Default - }); - - var permOrders = await repository.InsertAsync( - GetNewPermission( - AppCodes.Crm.Default, - AppCodes.Crm.Orders, - AppCodes.Crm.Orders - )); - - foreach (var item in CUDE) - { - permissionName = AppCodes.Crm.Orders + "." + item; - - await repository.InsertAsync( - GetNewPermission( - AppCodes.Crm.Default, - permissionName, - item, - permOrders.Name - )); - } - - //Müşteri Şikayetleri - var permComplaints = await repository.InsertAsync( - GetNewPermission( - AppCodes.Crm.Default, - AppCodes.Crm.Complaints, - AppCodes.Crm.Complaints - )); - - foreach (var item in CUDE) - { - permissionName = AppCodes.Crm.Complaints + "." + item; - - await repository.InsertAsync( - GetNewPermission( - AppCodes.Crm.Default, - permissionName, - item, - permComplaints.Name - )); - } - - var permShipments = await repository.InsertAsync( - GetNewPermission( - AppCodes.Crm.Default, - AppCodes.Crm.Shipments, - AppCodes.Crm.Shipments - )); - - foreach (var item in CUDE) - { - permissionName = AppCodes.Crm.Shipments + "." + item; - - await repository.InsertAsync( - GetNewPermission( - AppCodes.Crm.Default, - permissionName, - item, - permShipments.Name - )); - } - #endregion } public static PermissionDefinitionRecord GetNewPermission( diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformIdentityDataSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformIdentityDataSeeder.cs index 303aa5c0..a5ec4a89 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformIdentityDataSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformIdentityDataSeeder.cs @@ -98,10 +98,6 @@ public class PlatformIdentityDataSeeder : IdentityDataSeeder { await permissionGrantRepository.InsertManyAsync( [ - new(Guid.NewGuid(), AbpIdentity.Permissions.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId), - new(Guid.NewGuid(), AbpIdentity.Permissions.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId), - new(Guid.NewGuid(), AbpIdentity.Permissions.Update, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId), - new(Guid.NewGuid(), AbpIdentity.Permissions.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId), new(Guid.NewGuid(), IdentityPermissions.Roles.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId), new(Guid.NewGuid(), IdentityPermissions.Roles.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId), new(Guid.NewGuid(), IdentityPermissions.Roles.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, tenantId), diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Dev.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Dev.json index 958b3576..ded128a2 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Dev.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Dev.json @@ -3,7 +3,7 @@ { "code": "Default", "dataSourceType": 2, - "connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;" + "connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" } ] } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Production.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Production.json index 958b3576..ded128a2 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Production.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.Production.json @@ -3,7 +3,7 @@ { "code": "Default", "dataSourceType": 2, - "connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;" + "connectionString": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" } ] } diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 01c9f411..4ef4f6c8 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -906,30 +906,6 @@ "en": "Public Apis", "tr": "Genel Api'ler" }, - { - "resourceName": "Platform", - "key": "App.Crm", - "en": "CRM", - "tr": "MIY" - }, - { - "resourceName": "Platform", - "key": "App.Crm.Orders", - "en": "Orders", - "tr": "Sipariş Listesi" - }, - { - "resourceName": "Platform", - "key": "App.Crm.Complaints", - "en": "Complaints", - "tr": "Şikayet Listesi" - }, - { - "resourceName": "Platform", - "key": "App.Crm.Shipments", - "en": "Shipments", - "tr": "Yükleme Listesi" - }, { "resourceName": "Platform", "key": "Abp.Identity.NotificationSettings", @@ -4080,12 +4056,7 @@ { "code": "Default", "dataSourceType": 2, - "connectionString": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Demo;" - }, - { - "code": "KIM", - "dataSourceType": 1, - "connectionString": "Server=192.168.1.61;Database=KADIFETEKS;User Id=sa;password=Smgc3519;Trusted_Connection=False;TrustServerCertificate=True;" + "connectionString": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;" } ], "Settings": [ @@ -4957,59 +4928,6 @@ } ], "Charts": [ - { - "chartCode": "Chart-0001", - "cultureName": "en", - "dataSourceCode": "KIM", - "userId": "", - "roleId": "", - "isTenant": true, - "IsOrganizationUnit": true, - "title": { - "text": "Top Selling", - "subtitle": "" - }, - "dataSource": { - "query": "SELECT TOP 10 \"Kumaslar_Siparis_Yukleme_Sub\".\"DesenAdi\", SUM(\"Kumaslar_Siparis_Yukleme_Sub\".\"SipMiktar\") AS \"SipMiktar\", \"OrganizationUnitId\" FROM \"Kumaslar_Siparis_Yukleme\" WITH (NOLOCK) INNER JOIN \"Kumaslar_Siparis_Yukleme_Sub\" WITH (NOLOCK) ON \"Kumaslar_Siparis_Yukleme\".\"YuklemeID\" = \"Kumaslar_Siparis_Yukleme_Sub\".\"YuklemeID\" INNER JOIN \"Firmalar\" WITH (NOLOCK) ON \"Kumaslar_Siparis_Yukleme\".\"FirmaKodu\" = \"Firmalar\".\"FirmaKodu\" WHERE NOT \"OrganizationUnitId\" IS NULL AND CONVERT(DATE, \"Kumaslar_Siparis_Yukleme\".\"YuklemeTarihi\", 103) BETWEEN @startDate AND @endDate GROUP BY \"Kumaslar_Siparis_Yukleme_Sub\".\"DesenAdi\", \"OrganizationUnitId\" ORDER BY SUM(\"Kumaslar_Siparis_Yukleme_Sub\".\"SipMiktar\") DESC" - }, - "series": [ - { - "name": "Seri1", - "argumentField": "DesenAdi", - "valueField": "SipMiktar", - "type": "bar", - "label": { - "visible": true - } - } - ], - "crosshair": { - "enabled": true, - "color": "#949494", - "dashStyle": "dot", - "horizontalLine": { - "dashStyle": "solid" - } - }, - "size": { - "width": 500, - "height": 250 - }, - "argumentAxis": { - "label": { - "displayMode": "rotate" - } - }, - "permission": { - "c": "App.Listforms.Chart.Create", - "r": "App.Listforms.Chart", - "u": "App.Listforms.Chart.Update", - "d": "App.Listforms.Chart.Delete" - }, - "export": { - "enabled": true - } - }, { "chartCode": "Chart-0002", "cultureName": "en", diff --git a/api/src/Kurs.Platform.DbMigrator/appsettings.Dev.json b/api/src/Kurs.Platform.DbMigrator/appsettings.Dev.json index a569725d..7f2d8638 100644 --- a/api/src/Kurs.Platform.DbMigrator/appsettings.Dev.json +++ b/api/src/Kurs.Platform.DbMigrator/appsettings.Dev.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { - // "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" - "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;" + // "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" + "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" }, "Redis": { "IsEnabled": "true", diff --git a/api/src/Kurs.Platform.DbMigrator/appsettings.Production.json b/api/src/Kurs.Platform.DbMigrator/appsettings.Production.json index 3b8eccd1..1197adb8 100644 --- a/api/src/Kurs.Platform.DbMigrator/appsettings.Production.json +++ b/api/src/Kurs.Platform.DbMigrator/appsettings.Production.json @@ -1,7 +1,7 @@ { "ConnectionStrings": { - // "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" - "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;" + // "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" + "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" }, "Redis": { "IsEnabled": "true", diff --git a/api/src/Kurs.Platform.DbMigrator/appsettings.json b/api/src/Kurs.Platform.DbMigrator/appsettings.json index 7330671a..930bfc71 100644 --- a/api/src/Kurs.Platform.DbMigrator/appsettings.json +++ b/api/src/Kurs.Platform.DbMigrator/appsettings.json @@ -1,8 +1,8 @@ { "Seed": false, "ConnectionStrings": { - // "Default": "Server=localhost;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" - "Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Demo;" + // "Default": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" + "Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;" }, "Redis": { "IsEnabled": "true", diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index f2ed119c..67326d41 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -282,13 +282,6 @@ public static class PlatformConsts public const string Get = Default + ".Get"; public const string Post = Default + ".Post"; } - - public static class Crm - { - public const string Default = Prefix.App + ".Crm"; - public const string Orders = Default + ".Orders"; - public const string Complaints = Default + ".Complaints"; //Müşteri Şikayetleri - } } public static class ListFormCodes diff --git a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs index 6177063a..41f4ecf5 100644 --- a/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs +++ b/api/src/Kurs.Platform.Domain/Data/SeedConsts.cs @@ -350,14 +350,6 @@ public static class SeedConsts public const string IpRestrictions = Prefix.App + ".IpRestrictions"; public const string PublicApis = Prefix.App + ".PublicApis"; - - public static class Crm - { - public const string Default = Prefix.App + ".Crm"; - public const string Orders = Default + ".Orders"; - public const string Complaints = Default + ".Complaints"; //Müşteri Şikayetleri - public const string Shipments = Default + ".Shipments"; - } } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs b/api/src/Kurs.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs index df4db527..8a89847d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/DatabaseMigrationEventHandlerBase.cs @@ -244,10 +244,6 @@ public class DatabaseMigrationEventHandler : { await PermissionGrantRepository.InsertManyAsync( [ - new(Guid.NewGuid(), AbpIdentity.Permissions.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId), - new(Guid.NewGuid(), AbpIdentity.Permissions.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId), - new(Guid.NewGuid(), AbpIdentity.Permissions.Update, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId), - new(Guid.NewGuid(), AbpIdentity.Permissions.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId), new(Guid.NewGuid(), IdentityPermissions.Roles.Default, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId), new(Guid.NewGuid(), IdentityPermissions.Roles.Create, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId), new(Guid.NewGuid(), IdentityPermissions.Roles.Delete, "R", PlatformConsts.AbpIdentity.User.AdminRoleName, eventData.TenantId), diff --git a/api/src/Kurs.Platform.HttpApi.Host/appsettings.Dev.json b/api/src/Kurs.Platform.HttpApi.Host/appsettings.Dev.json index dd879f65..22770592 100644 --- a/api/src/Kurs.Platform.HttpApi.Host/appsettings.Dev.json +++ b/api/src/Kurs.Platform.HttpApi.Host/appsettings.Dev.json @@ -8,8 +8,8 @@ "CdnPath": "/etc/api/cdn" }, "ConnectionStrings": { - // "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" - "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;" + // "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" + "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" }, "Redis": { "IsEnabled": "true", diff --git a/api/src/Kurs.Platform.HttpApi.Host/appsettings.Production.json b/api/src/Kurs.Platform.HttpApi.Host/appsettings.Production.json index 218439d6..1774aff6 100644 --- a/api/src/Kurs.Platform.HttpApi.Host/appsettings.Production.json +++ b/api/src/Kurs.Platform.HttpApi.Host/appsettings.Production.json @@ -8,8 +8,8 @@ "CdnPath": "/etc/api/cdn" }, "ConnectionStrings": { - // "Default": "Server=sql;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" - "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=Demo;" + // "Default": "Server=sql;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" + "Default": "User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=KURS;" }, "Redis": { "IsEnabled": "true", diff --git a/api/src/Kurs.Platform.HttpApi.Host/appsettings.json b/api/src/Kurs.Platform.HttpApi.Host/appsettings.json index 8cf4b043..cd574834 100644 --- a/api/src/Kurs.Platform.HttpApi.Host/appsettings.json +++ b/api/src/Kurs.Platform.HttpApi.Host/appsettings.json @@ -9,8 +9,8 @@ "Version": "1.0.4" }, "ConnectionStrings": { - // "Default": "Server=localhost;Database=Demo;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" - "Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=Demo;" + // "Default": "Server=localhost;Database=KURS;User Id=sa;password=NvQp8s@l;Trusted_Connection=False;TrustServerCertificate=True;" + "Default": "User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=KURS;" }, "Redis": { "IsEnabled": "true", diff --git a/configs/deployment/configs/nginx.conf b/configs/deployment/configs/nginx.conf index 29beb121..e7255be2 100644 --- a/configs/deployment/configs/nginx.conf +++ b/configs/deployment/configs/nginx.conf @@ -89,9 +89,15 @@ server { ssl_certificate /etc/ssl/sozsoft.com/cert1.pem; ssl_certificate_key /etc/ssl/sozsoft.com/privkey1.pem; + underscores_in_headers on; + ignore_invalid_headers off; + large_client_header_buffers 4 16k; + location / { proxy_pass http://127.0.0.1:8080/; include /etc/nginx/proxy_params; + + proxy_set_header __tenant $http___tenant; # ← ÖNEMLİ } } diff --git a/ui/dev-dist/sw.js b/ui/dev-dist/sw.js index fad85f78..5ca6b034 100644 --- a/ui/dev-dist/sw.js +++ b/ui/dev-dist/sw.js @@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict'; "revision": "3ca0b8505b4bec776b69afdba2768812" }, { "url": "index.html", - "revision": "0.8un1j0slu5o" + "revision": "0.ndk83qv1fe" }], {}); workbox.cleanupOutdatedCaches(); workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { diff --git a/ui/src/components/template/Theme.tsx b/ui/src/components/template/Theme.tsx index 0bdc1de8..0b6b4609 100644 --- a/ui/src/components/template/Theme.tsx +++ b/ui/src/components/template/Theme.tsx @@ -14,12 +14,10 @@ let didInit = false const Theme = (props: CommonProps) => { // ABP App Config'i uygulama acilirken al const { getConfig } = useStoreActions((a) => a.abpConfig) - const { setTenantId } = useStoreActions((a) => a.auth) useEffect(() => { if (!didInit) { didInit = true - setTenantId('') getConfig(false) } }, []) diff --git a/ui/src/views/Home.tsx b/ui/src/views/Home.tsx index cb7aec96..a84b8c19 100644 --- a/ui/src/views/Home.tsx +++ b/ui/src/views/Home.tsx @@ -1,78 +1,9 @@ import { useLocalization } from '@/utils/hooks/useLocalization' import { Helmet } from 'react-helmet' -import { useCallback, useEffect, useState } from 'react' -import WidgetFilter from './dashboard/WidgetFilter' -import { getDashboardWidgetList } from '@/proxy/dashboard/widgets' -import dayjs from 'dayjs' -import { WidgetsData } from './dashboard/models' -import Widgets from './dashboard/Widgets' -import WidgetProgress from './dashboard/WidgetProgress' -import WidgetBarChart from './dashboard/WidgetBarChart' const Home = () => { const { translate } = useLocalization() - const [loading, setLoading] = useState(false) - const [widgetData, setWidgetData] = useState() - - const [startDate, setStartDate] = useState(dayjs().subtract(30, 'day').unix()) - const [endDate, setEndDate] = useState(dayjs().unix()) - const startDateFormat = dayjs(startDate * 1000).format('YYYY-MM-DD') - const endDateFormat = dayjs(endDate * 1000).format('YYYY-MM-DD') - - const [chartKey, setChartKey] = useState(0) - - const handleDateChange = ([start, end]: [Date | null, Date | null]) => { - if (start && end) { - setStartDate(dayjs(start).unix()) - setEndDate(dayjs(end).unix()) - } - } - - const getPerformancePercent = () => { - const orders = widgetData?.find((a) => a.label == 'Orders')?.datavalue ?? 0 - const shipment = widgetData?.find((a) => a.label == 'Shipment')?.datavalue ?? 0 - - if (shipment > orders) - return (orders / shipment * 100.0) - else - return (shipment / orders * 100.0) - } - - const getDashboardWidgets = useCallback(async () => { - const dashboardWidgetsRequestDto = { - tarih1: startDateFormat, - tarih2: endDateFormat, - } - - setChartKey((prevKey) => prevKey + 1) - - try { - setLoading(true) - const response = await getDashboardWidgetList(dashboardWidgetsRequestDto) - if (response?.data) { - setWidgetData( - response.data.map((a) => ({ - id: a.id, - label: a.label, - datavalue: a.dataValue, - datagrowShrink: a.dataGrowShrink, - valuePrefix: a.valuePrefix, - date: a.date, - })), - ) - } - } catch (error) { - console.error('Dashboard widget yüklenirken hata oluştu:', error) - } finally { - setLoading(false) - } - }, [startDateFormat, endDateFormat]) - - useEffect(() => { - getDashboardWidgets() - }, []) - return ( <> { title={translate('::' + 'Home')} defaultTitle="Kurs Platform" > - - - - -
- - -
- - {/* */} ) } diff --git a/ui/src/views/admin/tenant-management/TenantsConnectionString.tsx b/ui/src/views/admin/tenant-management/TenantsConnectionString.tsx index b57d14c6..738bcaad 100644 --- a/ui/src/views/admin/tenant-management/TenantsConnectionString.tsx +++ b/ui/src/views/admin/tenant-management/TenantsConnectionString.tsx @@ -67,7 +67,7 @@ function TenantConnectionString({ if (response.data.length == 0) { isNew = true - value = 'User ID=sa;Password=NvQp8s@l;Host=localhost;Port=5432;Database=' + name + ';' + value = 'User ID=sa;Password=NvQp8s@l;Host=postgres;Port=5432;Database=' + name + ';' } else { isNew = false value = response.data diff --git a/ui/src/views/auth/Login.tsx b/ui/src/views/auth/Login.tsx index de1a8036..2ae1a7cb 100644 --- a/ui/src/views/auth/Login.tsx +++ b/ui/src/views/auth/Login.tsx @@ -174,6 +174,7 @@ const Login = () => { } const subDomainName = getSubdomain() + //const subDomainName = 'KURS2' const tenantId = useStoreState((a) => a.auth.tenantId) ?? subDomainName const tenantStyle: React.CSSProperties | undefined = subDomainName && subDomainName !== defaultSubDomain @@ -216,7 +217,7 @@ const Login = () => { value={tenantId || ''} onChange={(e) => setTenantId(e.target.value)} style={tenantStyle} - //aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'} + aria-hidden={subDomainName && subDomainName !== defaultSubDomain ? 'true' : 'false'} /> diff --git a/ui/src/views/docs/ChangeLog.tsx b/ui/src/views/docs/ChangeLog.tsx index 03a251e8..aac21e69 100644 --- a/ui/src/views/docs/ChangeLog.tsx +++ b/ui/src/views/docs/ChangeLog.tsx @@ -14,14 +14,6 @@ type LogProps = Omit & { } const logData: Log[] = [ - { - version: '1.0.4', - date: '07 Şubat 2025', - updateContent: [ - '[Change] KIM Sistemi entegrasyonu', - '[Fix] OrganizationUnitId belirlenmesi', - ], - }, { version: '1.0.3', date: '04 Şubat 2025',