From 2eef3ead35848341350659828a14dc4a463e57af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Fri, 31 Jul 2026 23:52:32 +0300 Subject: [PATCH] =?UTF-8?q?Listelerdeki=20Lookuplar=C4=B1n=20localization?= =?UTF-8?q?=20=C3=B6zelli=C4=9Fi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Seeds/LanguagesData.json | 660 ++++++++++++++++++ .../Seeds/ListFormSeeder_Administration.cs | 74 +- .../Seeds/ListFormSeeder_Saas.cs | 215 +++--- ui/src/utils/hooks/useLocalization.ts | 33 +- ui/src/views/form/useLookupDataSource.ts | 13 +- ui/src/views/list/CardView.tsx | 582 +++++++-------- ui/src/views/list/Pivot.tsx | 5 +- ui/src/views/list/TodoBoard.tsx | 32 +- ui/src/views/list/useListFormColumns.ts | 12 +- 9 files changed, 1169 insertions(+), 457 deletions(-) diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json index 560aed92..49df728e 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/LanguagesData.json @@ -17094,6 +17094,24 @@ "en": "Tags", "tr": "Etiketler" }, + { + "resourceName": "Platform", + "key": "App.Listform.ListformField.Assignees", + "en": "Assignees", + "tr": "Atananlar" + }, + { + "resourceName": "Platform", + "key": "App.Listform.ListformField.Completed", + "en": "Completed", + "tr": "Tamamlandı" + }, + { + "resourceName": "Platform", + "key": "App.Listform.ListformField.SortOrder", + "en": "Sort Order", + "tr": "Sıralama" + }, { "resourceName": "Platform", "key": "App.Listform.ListformField.Target", @@ -20561,6 +20579,648 @@ "key": "App.UpdateCheckFailed", "en": "Update check failed.", "tr": "Güncelleme kontrolü başarısız" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.AbpAccount", + "en": "AbpAccount", + "tr": "AbpAccount" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Active", + "en": "Active", + "tr": "Aktif" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.All", + "en": "All", + "tr": "Tümü" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Announcement", + "en": "Announcement", + "tr": "Duyuru" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.AnsiString", + "en": "ANSI String", + "tr": "ANSI Metin" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.AnsiStringFixedLength", + "en": "ANSI Fixed-Length String", + "tr": "ANSI Sabit Uzunluklu Metin" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Authenticated", + "en": "Authenticated", + "tr": "Kimliği Doğrulanmış" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Backlog", + "en": "Backlog", + "tr": "Bekleyen İşler" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.BackupWorker", + "en": "Backup Worker", + "tr": "Yedekleme İşçisi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.BiggerThanReference", + "en": "Bigger Than Reference", + "tr": "Referanstan Büyük" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Binary", + "en": "Binary", + "tr": "İkili" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Bool", + "en": "Bool", + "tr": "Mantıksal" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Boolean", + "en": "Boolean", + "tr": "Mantıksal" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Both", + "en": "Both", + "tr": "Her İkisi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Byte", + "en": "Byte", + "tr": "Bayt" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Cancelled", + "en": "Cancelled", + "tr": "İptal" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Chart", + "en": "Chart", + "tr": "Grafik" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.CodeReview", + "en": "Code Review", + "tr": "Kod İncelemesi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Configuration", + "en": "Configuration", + "tr": "Yapılandırma" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Currency", + "en": "Currency", + "tr": "Para Birimi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Custom", + "en": "Custom", + "tr": "Özel" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Daily", + "en": "Daily", + "tr": "Günlük" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Date", + "en": "Date", + "tr": "Tarih" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.DateTime", + "en": "Date Time", + "tr": "Tarih Saat" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.DateTime2", + "en": "Date Time 2", + "tr": "Tarih Saat 2" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.DateTimeOffset", + "en": "Date Time Offset", + "tr": "Tarih Saat Ofseti" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Decimal", + "en": "Decimal", + "tr": "Ondalık" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Default", + "en": "Default", + "tr": "Varsayılan" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Desktop", + "en": "Desktop", + "tr": "Masaüstü" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Double", + "en": "Double", + "tr": "Çift Hassasiyetli Sayı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Draft", + "en": "Draft", + "tr": "Taslak" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Event", + "en": "Event", + "tr": "Etkinlik" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.External", + "en": "External", + "tr": "Harici" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Form", + "en": "Form", + "tr": "Form" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.General", + "en": "General", + "tr": "Genel" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Get", + "en": "GET", + "tr": "GET" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Global", + "en": "Global", + "tr": "Genel" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Guid", + "en": "GUID", + "tr": "GUID" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Host", + "en": "Host", + "tr": "Host" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Hourly", + "en": "Hourly", + "tr": "Saatlik" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.InProgress", + "en": "In Progress", + "tr": "Devam Ediyor" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Int16", + "en": "Int16", + "tr": "Int16" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Int32", + "en": "Int32", + "tr": "Int32" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Int64", + "en": "Int64", + "tr": "Int64" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Internal", + "en": "Internal", + "tr": "Dahili" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.List", + "en": "List", + "tr": "Liste" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Mail", + "en": "Mail", + "tr": "E-posta" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.MailQueueWorker", + "en": "Mail Queue Worker", + "tr": "E-posta Kuyruğu İşçisi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Memo", + "en": "Memo", + "tr": "Not" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Minutely", + "en": "Minutely", + "tr": "Dakikalık" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Monthly", + "en": "Monthly", + "tr": "Aylık" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Mssql", + "en": "Microsoft SQL Server", + "tr": "Microsoft SQL Server" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.MultipleChoice", + "en": "Multiple Choice", + "tr": "Çoktan Seçmeli" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.None", + "en": "None", + "tr": "Yok" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Normal", + "en": "Normal", + "tr": "Normal" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.NotificationWorker", + "en": "Notification Worker", + "tr": "Bildirim İşçisi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Number", + "en": "Number", + "tr": "Sayı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Object", + "en": "Object", + "tr": "Nesne" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.OrganizationUnit", + "en": "Organization Unit", + "tr": "Organizasyon Birimi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Passive", + "en": "Passive", + "tr": "Pasif" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Platform", + "en": "Platform", + "tr": "Platform" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Post", + "en": "POST", + "tr": "POST" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Postgresql", + "en": "PostgreSQL", + "tr": "PostgreSQL" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Protected", + "en": "Protected", + "tr": "Korumalı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Public", + "en": "Public", + "tr": "Herkese Açık" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Published", + "en": "Published", + "tr": "Yayımlandı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Query", + "en": "Query", + "tr": "Sorgu" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Rating", + "en": "Rating", + "tr": "Derecelendirme" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.ReadyToStart", + "en": "Ready to Start", + "tr": "Başlamaya Hazır" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Reference", + "en": "Reference", + "tr": "Referans" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Rocket", + "en": "Rocket", + "tr": "Rocket" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Role", + "en": "Role", + "tr": "Rol" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.SByte", + "en": "Signed Byte", + "tr": "İşaretli Bayt" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.SessionCleanupWorker", + "en": "Session Cleanup Worker", + "tr": "Oturum Temizleme İşçisi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Single", + "en": "Single", + "tr": "Tek Hassasiyetli Sayı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.SmallerThanReference", + "en": "Smaller Than Reference", + "tr": "Referanstan Küçük" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Sms", + "en": "SMS", + "tr": "SMS" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.SortMultiple", + "en": "Multiple", + "tr": "Çoklu" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.SortNone", + "en": "None", + "tr": "Yok" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.SortSingle", + "en": "Single", + "tr": "Tekli" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.SqlWorker", + "en": "SQL Worker", + "tr": "SQL İşçisi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Staging", + "en": "Staging", + "tr": "Hazırlık" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.StoredProcedure", + "en": "Stored Procedure", + "tr": "Saklı Yordam" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.String", + "en": "String", + "tr": "Metin" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.StringFixedLength", + "en": "Fixed-Length String", + "tr": "Sabit Uzunluklu Metin" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Table", + "en": "Table", + "tr": "Tablo" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.TableValuedFunction", + "en": "Table-Valued Function", + "tr": "Tablo Değerli Fonksiyon" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Tenant", + "en": "Tenant", + "tr": "Kiracı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Testing", + "en": "Testing", + "tr": "Test" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Text", + "en": "Text", + "tr": "Metin" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Textarea", + "en": "Text Area", + "tr": "Metin Alanı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Time", + "en": "Time", + "tr": "Saat" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.UiActivity", + "en": "UI Activity", + "tr": "Arayüz Etkinliği" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.UInt16", + "en": "UInt16", + "tr": "UInt16" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.UInt32", + "en": "UInt32", + "tr": "UInt32" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.UInt64", + "en": "UInt64", + "tr": "UInt64" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.UiToast", + "en": "UI Toast", + "tr": "Arayüz Bildirimi" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Urgent", + "en": "Urgent", + "tr": "Acil" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.User", + "en": "User", + "tr": "Kullanıcı" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.VarNumeric", + "en": "Variable Numeric", + "tr": "Değişken Sayısal" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.View", + "en": "View", + "tr": "Görünüm" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.WhatsApp", + "en": "WhatsApp", + "tr": "WhatsApp" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Xml", + "en": "XML", + "tr": "XML" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Yearly", + "en": "Yearly", + "tr": "Yıllık" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.YesNo", + "en": "Yes/No", + "tr": "Evet/Hayır" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Telegram", + "en": "Telegram", + "tr": "Telegram" + }, + { + "resourceName": "Platform", + "key": "App.StaticLookup.Dynamic", + "en": "Dynamic", + "tr": "Dinamik" } ] } diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs index d11002ba..48bc84ae 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Administration.cs @@ -402,9 +402,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key=1, Name="Tenant" }, - new () { Key=2, Name="Host" }, - new () { Key=3, Name="Both" }, + new () { Key=1, Name="App.StaticLookup.Tenant" }, + new () { Key=2, Name="App.StaticLookup.Host" }, + new () { Key=3, Name="App.StaticLookup.Both" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -566,10 +566,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key=0, Name="String" }, - new () { Key=1, Name="Number" }, - new () { Key=2, Name="Boolean" }, - new () { Key=3, Name="DateTime" }, + new () { Key=0, Name="App.StaticLookup.String" }, + new () { Key=1, Name="App.StaticLookup.Number" }, + new () { Key=2, Name="App.StaticLookup.Boolean" }, + new () { Key=3, Name="App.StaticLookup.DateTime" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -1080,8 +1080,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key=PlatformConsts.AbpIdentity.User.InternalUserTypeDefaultValue, Name="Internal" }, - new () { Key=PlatformConsts.AbpIdentity.User.ExternalUserTypeDefaultValue, Name="External" }, + new () { Key=PlatformConsts.AbpIdentity.User.InternalUserTypeDefaultValue, Name="App.StaticLookup.Internal" }, + new () { Key=PlatformConsts.AbpIdentity.User.ExternalUserTypeDefaultValue, Name="App.StaticLookup.External" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -1814,8 +1814,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key= "active", Name= "Aktif" }, - new () { Key= "passive", Name= "Pasif" }, + new () { Key= "active", Name= "App.StaticLookup.Active" }, + new () { Key= "passive", Name= "App.StaticLookup.Passive" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -2339,9 +2339,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="User", Name="User" }, - new () { Key="Role", Name="Role" }, - new () { Key="Global", Name="Global" }, + new () { Key="User", Name="App.StaticLookup.User" }, + new () { Key="Role", Name="App.StaticLookup.Role" }, + new () { Key="Global", Name="App.StaticLookup.Global" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -3046,10 +3046,10 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key= "general", Name= "General" }, - new () { Key= "event", Name= "Event" }, - new () { Key= "urgent", Name= "Urgent" }, - new () { Key= "announcement", Name= "Announcement" }, + new () { Key= "general", Name= "App.StaticLookup.General" }, + new () { Key= "event", Name= "App.StaticLookup.Event" }, + new () { Key= "urgent", Name= "App.StaticLookup.Urgent" }, + new () { Key= "announcement", Name= "App.StaticLookup.Announcement" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -3576,8 +3576,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key= "active", Name= "Aktif" }, - new () { Key= "passive", Name= "Pasif" }, + new () { Key= "active", Name= "App.StaticLookup.Active" }, + new () { Key= "passive", Name= "App.StaticLookup.Passive" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -3755,11 +3755,11 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key= "rating", Name= "Rating" }, - new () { Key= "multiple-choice", Name= "Multiple Choice" }, - new () { Key= "text", Name= "Text" }, - new () { Key= "textarea", Name= "Textarea" }, - new () { Key= "yes-no", Name= "Yes/No" }, + new () { Key= "rating", Name= "App.StaticLookup.Rating" }, + new () { Key= "multiple-choice", Name= "App.StaticLookup.MultipleChoice" }, + new () { Key= "text", Name= "App.StaticLookup.Text" }, + new () { Key= "textarea", Name= "App.StaticLookup.Textarea" }, + new () { Key= "yes-no", Name= "App.StaticLookup.YesNo" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -5141,9 +5141,9 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="published",Name="Yayımlandı" }, - new () { Key="draft",Name="Taslak" }, - new () { Key="cancelled",Name="İptal" }, + new () { Key="published",Name="App.StaticLookup.Published" }, + new () { Key="draft",Name="App.StaticLookup.Draft" }, + new () { Key="cancelled",Name="App.StaticLookup.Cancelled" }, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -5761,8 +5761,8 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="yearly", Name="Yearly" }, - new () { Key="monthly", Name="Monthly" }, + new () { Key="yearly", Name="App.StaticLookup.Yearly" }, + new () { Key="monthly", Name="App.StaticLookup.Monthly" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -5980,7 +5980,7 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep new() { FieldName = "RequestDate", FieldDbType = DbType.Date, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Importance", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Urgency", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Backlog", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "Status", FieldDbType = DbType.String, Value = "backlog", CustomValueType = FieldCustomValueTypeEnum.Value }, }) }); @@ -6082,12 +6082,12 @@ public class ListFormSeeder_Administration : IDataSeedContributor, ITransientDep DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Backlog", Name="Backlog" }, - new () { Key="Ready to Start", Name="Ready to Start" }, - new () { Key="In Progress", Name="In Progress" }, - new () { Key="Code Review", Name="Code Review" }, - new () { Key="Testing", Name="HiTestinggh" }, - new () { Key="Staging", Name="Staging" } + new () { Key="backlog", Name="App.StaticLookup.Backlog" }, + new () { Key="ready_to_start", Name="App.StaticLookup.ReadyToStart" }, + new () { Key="in_progress", Name="App.StaticLookup.InProgress" }, + new () { Key="code_review", Name="App.StaticLookup.CodeReview" }, + new () { Key="testing", Name="App.StaticLookup.Testing" }, + new () { Key="staging", Name="App.StaticLookup.Staging" } }), }), ColSpan = 1, diff --git a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs index 0d1393d0..a84d999e 100644 --- a/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs +++ b/api/src/Sozsoft.Platform.DbMigrator/Seeds/ListFormSeeder_Saas.cs @@ -2697,9 +2697,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Reference", Name="Referans" }, - new () { Key="SmallerThanReference", Name="Referanstan Küçük" }, - new () { Key="BiggerThanReference", Name="Referanstan Büyük" }, + new () { Key="Reference", Name="App.StaticLookup.Reference" }, + new () { Key="SmallerThanReference", Name="App.StaticLookup.SmallerThanReference" }, + new () { Key="BiggerThanReference", Name="App.StaticLookup.BiggerThanReference" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -3040,12 +3040,12 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key=0, Name="None" }, - new() { Key=1, Name="Yearly"}, - new() { Key=2, Name="Monthly"}, - new() { Key=3, Name="Daily"}, - new() { Key=4, Name="Hourly"}, - new() { Key=5, Name="Minutely"}, + new() { Key=0, Name="App.StaticLookup.None" }, + new() { Key=1, Name="App.StaticLookup.Yearly"}, + new() { Key=2, Name="App.StaticLookup.Monthly"}, + new() { Key=3, Name="App.StaticLookup.Daily"}, + new() { Key=4, Name="App.StaticLookup.Hourly"}, + new() { Key=5, Name="App.StaticLookup.Minutely"}, }), }), AllowSearch = true, @@ -3782,11 +3782,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key="U", Name="User" }, - new() { Key="T", Name="Tenant"}, - new() { Key="G", Name="Global"}, - new() { Key="C", Name="Configuration"}, - new() { Key="D", Name="Default"}, + new() { Key="U", Name="App.StaticLookup.User" }, + new() { Key="T", Name="App.StaticLookup.Tenant"}, + new() { Key="G", Name="App.StaticLookup.Global"}, + new() { Key="C", Name="App.StaticLookup.Configuration"}, + new() { Key="D", Name="App.StaticLookup.Default"}, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -3838,11 +3838,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key="Bool", Name="Bool" }, - new() { Key="Number", Name="Number"}, - new() { Key="Text", Name="Text"}, - new() { Key="Memo", Name="Memo"}, - new() { Key="List", Name="List"}, + new() { Key="Bool", Name="App.StaticLookup.Bool" }, + new() { Key="Number", Name="App.StaticLookup.Number"}, + new() { Key="Text", Name="App.StaticLookup.Text"}, + new() { Key="Memo", Name="App.StaticLookup.Memo"}, + new() { Key="List", Name="App.StaticLookup.List"}, }) }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -4227,8 +4227,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key="AbpAccount",Name="AbpAccount" }, - new() { Key="Platform",Name="Platform" }, + new() { Key="AbpAccount",Name="App.StaticLookup.AbpAccount" }, + new() { Key="Platform",Name="App.StaticLookup.Platform" }, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -4402,8 +4402,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "Name", ValueExpr = "Key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key = 1, Name = "Mssql" }, - new() { Key = 2, Name = "Postgresql" }, + new() { Key = 1, Name = "App.StaticLookup.Mssql" }, + new() { Key = 2, Name = "App.StaticLookup.Postgresql" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -4628,9 +4628,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key = ListFormTypeEnum.Form, Name = ListFormTypeEnum.Form.ToString() }, - new() { Key = ListFormTypeEnum.List, Name = ListFormTypeEnum.List.ToString() }, - new() { Key = ListFormTypeEnum.Chart, Name = ListFormTypeEnum.Chart.ToString() }, + new() { Key = ListFormTypeEnum.Form, Name = "App.StaticLookup.Form" }, + new() { Key = ListFormTypeEnum.List, Name = "App.StaticLookup.List" }, + new() { Key = ListFormTypeEnum.Chart, Name = "App.StaticLookup.Chart" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -4660,11 +4660,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key=SelectCommandTypeEnum.Table,Name=SelectCommandTypeEnum.Table.ToString() }, - new() { Key=SelectCommandTypeEnum.View,Name=SelectCommandTypeEnum.View.ToString() }, - new() { Key=SelectCommandTypeEnum.TableValuedFunction,Name=SelectCommandTypeEnum.TableValuedFunction.ToString() }, - new() { Key=SelectCommandTypeEnum.Query,Name=SelectCommandTypeEnum.Query.ToString() }, - new() { Key=SelectCommandTypeEnum.StoredProcedure,Name=SelectCommandTypeEnum.StoredProcedure.ToString() }, + new() { Key=SelectCommandTypeEnum.Table, Name="App.StaticLookup.Table" }, + new() { Key=SelectCommandTypeEnum.View, Name="App.StaticLookup.View" }, + new() { Key=SelectCommandTypeEnum.TableValuedFunction, Name="App.StaticLookup.TableValuedFunction" }, + new() { Key=SelectCommandTypeEnum.Query, Name="App.StaticLookup.Query" }, + new() { Key=SelectCommandTypeEnum.StoredProcedure, Name="App.StaticLookup.StoredProcedure" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -4757,33 +4757,33 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key=DbType.AnsiString,Name=DbType.AnsiString.ToString() }, - new() { Key=DbType.Binary,Name=DbType.Binary.ToString() }, - new() { Key=DbType.Byte,Name=DbType.Byte.ToString() }, - new() { Key=DbType.Boolean,Name=DbType.Boolean.ToString() }, - new() { Key=DbType.Currency,Name=DbType.Currency.ToString() }, - new() { Key=DbType.Date,Name=DbType.Date.ToString() }, - new() { Key=DbType.DateTime,Name=DbType.DateTime.ToString() }, - new() { Key=DbType.Decimal,Name=DbType.Decimal.ToString() }, - new() { Key=DbType.Double,Name=DbType.Double.ToString() }, - new() { Key=DbType.Guid,Name=DbType.Guid.ToString() }, - new() { Key=DbType.Int16,Name=DbType.Int16.ToString() }, - new() { Key=DbType.Int32,Name=DbType.Int32.ToString() }, - new() { Key=DbType.Int64,Name=DbType.Int64.ToString() }, - new() { Key=DbType.Object,Name=DbType.Object.ToString() }, - new() { Key=DbType.SByte,Name=DbType.SByte.ToString() }, - new() { Key=DbType.Single,Name=DbType.Single.ToString() }, - new() { Key=DbType.String,Name=DbType.String.ToString() }, - new() { Key=DbType.Time,Name=DbType.Time.ToString() }, - new() { Key=DbType.UInt16,Name=DbType.UInt16.ToString() }, - new() { Key=DbType.UInt32,Name=DbType.UInt32.ToString() }, - new() { Key=DbType.UInt64,Name=DbType.UInt64.ToString() }, - new() { Key=DbType.VarNumeric,Name=DbType.VarNumeric.ToString() }, - new() { Key=DbType.AnsiStringFixedLength,Name=DbType.AnsiStringFixedLength.ToString() }, - new() { Key=DbType.StringFixedLength,Name=DbType.StringFixedLength.ToString() }, - new() { Key=DbType.Xml,Name=DbType.Xml.ToString() }, - new() { Key=DbType.DateTime2,Name=DbType.DateTime2.ToString() }, - new() { Key=DbType.DateTimeOffset,Name=DbType.DateTimeOffset.ToString() }, + new() { Key=DbType.AnsiString, Name="App.StaticLookup.AnsiString" }, + new() { Key=DbType.Binary, Name="App.StaticLookup.Binary" }, + new() { Key=DbType.Byte, Name="App.StaticLookup.Byte" }, + new() { Key=DbType.Boolean, Name="App.StaticLookup.Boolean" }, + new() { Key=DbType.Currency, Name="App.StaticLookup.Currency" }, + new() { Key=DbType.Date, Name="App.StaticLookup.Date" }, + new() { Key=DbType.DateTime, Name="App.StaticLookup.DateTime" }, + new() { Key=DbType.Decimal, Name="App.StaticLookup.Decimal" }, + new() { Key=DbType.Double, Name="App.StaticLookup.Double" }, + new() { Key=DbType.Guid, Name="App.StaticLookup.Guid" }, + new() { Key=DbType.Int16, Name="App.StaticLookup.Int16" }, + new() { Key=DbType.Int32, Name="App.StaticLookup.Int32" }, + new() { Key=DbType.Int64, Name="App.StaticLookup.Int64" }, + new() { Key=DbType.Object, Name="App.StaticLookup.Object" }, + new() { Key=DbType.SByte, Name="App.StaticLookup.SByte" }, + new() { Key=DbType.Single, Name="App.StaticLookup.Single" }, + new() { Key=DbType.String, Name="App.StaticLookup.String" }, + new() { Key=DbType.Time, Name="App.StaticLookup.Time" }, + new() { Key=DbType.UInt16, Name="App.StaticLookup.UInt16" }, + new() { Key=DbType.UInt32, Name="App.StaticLookup.UInt32" }, + new() { Key=DbType.UInt64, Name="App.StaticLookup.UInt64" }, + new() { Key=DbType.VarNumeric, Name="App.StaticLookup.VarNumeric" }, + new() { Key=DbType.AnsiStringFixedLength, Name="App.StaticLookup.AnsiStringFixedLength" }, + new() { Key=DbType.StringFixedLength, Name="App.StaticLookup.StringFixedLength" }, + new() { Key=DbType.Xml, Name="App.StaticLookup.Xml" }, + new() { Key=DbType.DateTime2, Name="App.StaticLookup.DateTime2" }, + new() { Key=DbType.DateTimeOffset, Name="App.StaticLookup.DateTimeOffset" }, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -4832,9 +4832,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key=GridOptions.SortModeNone,Name=GridOptions.SortModeNone }, - new() { Key=GridOptions.SortModeSingle,Name=GridOptions.SortModeSingle }, - new() { Key=GridOptions.SortModeMultiple,Name=GridOptions.SortModeMultiple }, + new() { Key=GridOptions.SortModeNone, Name="App.StaticLookup.SortNone" }, + new() { Key=GridOptions.SortModeSingle, Name="App.StaticLookup.SortSingle" }, + new() { Key=GridOptions.SortModeMultiple, Name="App.StaticLookup.SortMultiple" }, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -5259,11 +5259,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="All",Name="All" }, - new () { Key="User",Name="User" }, - new () { Key="Role",Name="Role" }, - new () { Key="OrganizationUnit",Name="OrganizationUnit" }, - new () { Key="Custom",Name="Custom" }, + new () { Key="All", Name="App.StaticLookup.All" }, + new () { Key="User", Name="App.StaticLookup.User" }, + new () { Key="Role", Name="App.StaticLookup.Role" }, + new () { Key="OrganizationUnit", Name="App.StaticLookup.OrganizationUnit" }, + new () { Key="Custom", Name="App.StaticLookup.Custom" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -5316,14 +5316,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Sms",Name="Sms" }, - new () { Key="Mail",Name="Mail" }, - new () { Key="WhatsApp",Name="WhatsApp" }, - new () { Key="Rocket",Name="Rocket" }, - new () { Key="UiActivity",Name="UiActivity" }, - new () { Key="UiToast",Name="UiToast" }, - new () { Key="Desktop",Name="Desktop" }, - // new () { Key="Telegram",Name="Telegram" }, + new () { Key="Sms", Name="App.StaticLookup.Sms" }, + new () { Key="Mail", Name="App.StaticLookup.Mail" }, + new () { Key="WhatsApp", Name="App.StaticLookup.WhatsApp" }, + new () { Key="Rocket", Name="App.StaticLookup.Rocket" }, + new () { Key="UiActivity", Name="App.StaticLookup.UiActivity" }, + new () { Key="UiToast", Name="App.StaticLookup.UiToast" }, + new () { Key="Desktop", Name="App.StaticLookup.Desktop" }, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -5534,14 +5533,13 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Sms",Name="Sms" }, - new () { Key="Mail",Name="Mail" }, - new () { Key="Rocket",Name="Rocket" }, - new () { Key="Desktop",Name="Desktop" }, - new () { Key="UiActivity",Name="UiActivity" }, - new () { Key="UiToast",Name="UiToast" }, - new () { Key="WhatsApp",Name="WhatsApp" }, - // new () { Key="Telegram",Name="Telegram" }, + new () { Key="Sms", Name="App.StaticLookup.Sms" }, + new () { Key="Mail", Name="App.StaticLookup.Mail" }, + new () { Key="Rocket", Name="App.StaticLookup.Rocket" }, + new () { Key="Desktop", Name="App.StaticLookup.Desktop" }, + new () { Key="UiActivity", Name="App.StaticLookup.UiActivity" }, + new () { Key="UiToast", Name="App.StaticLookup.UiToast" }, + new () { Key="WhatsApp", Name="App.StaticLookup.WhatsApp" }, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -5823,11 +5821,11 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new() { Key=1,Name="MailQueueWorker" }, - new() { Key=2,Name="SqlWorker" }, - new() { Key=3,Name="NotificationWorker" }, - new() { Key=4,Name="SessionCleanupWorker" }, - new() { Key=5,Name="BackupWorker" }, + new() { Key=1, Name="App.StaticLookup.MailQueueWorker" }, + new() { Key=2, Name="App.StaticLookup.SqlWorker" }, + new() { Key=3, Name="App.StaticLookup.NotificationWorker" }, + new() { Key=4, Name="App.StaticLookup.SessionCleanupWorker" }, + new() { Key=5, Name="App.StaticLookup.BackupWorker" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -6222,8 +6220,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="normal",Name="Normal" }, - // new () { Key="dynamic",Name="Dynamic" }, + new () { Key="normal",Name="App.StaticLookup.Normal" }, + // new () { Key="dynamic",Name="App.StaticLookup.Dynamic" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -6275,9 +6273,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="public",Name="Public" }, - new () { Key="protected",Name="Protected" }, - new () { Key="authenticated",Name="Authenticated" }, + new () { Key="public",Name="App.StaticLookup.Public" }, + new () { Key="protected",Name="App.StaticLookup.Protected" }, + new () { Key="authenticated",Name="App.StaticLookup.Authenticated" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -6922,8 +6920,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="GET", Name="GET" }, - new () { Key="POSt", Name="POST" }, + new () { Key="GET", Name="App.StaticLookup.Get" }, + new () { Key="POSt", Name="App.StaticLookup.Post" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -7173,9 +7171,9 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Public.products.categories.Üyelik",Name="Üyelik" }, - new () { Key="Public.products.categories.Lisans",Name="Lisans" }, - new () { Key="Public.products.categories.Ek Hizmetler",Name="Ek Hizmetler" }, + new () { Key="Public.products.categories.Üyelik",Name="Public.products.categories.Üyelik" }, + new () { Key="Public.products.categories.Lisans",Name="Public.products.categories.Lisans" }, + new () { Key="Public.products.categories.Ek Hizmetler",Name="Public.products.categories.Ek Hizmetler" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -7841,8 +7839,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="yearly", Name="Yearly" }, - new () { Key="monthly", Name="Monthly" }, + new () { Key="yearly", Name="App.StaticLookup.Yearly" }, + new () { Key="monthly", Name="App.StaticLookup.Monthly" }, }), }), ColumnCustomizationJson = DefaultColumnCustomizationJson, @@ -8619,8 +8617,8 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="yearly", Name="Yearly" }, - new () { Key="monthly", Name="Monthly" }, + new () { Key="yearly", Name="App.StaticLookup.Yearly" }, + new () { Key="monthly", Name="App.StaticLookup.Monthly" }, }), }), ValidationRuleJson = DefaultValidationRuleRequiredJson, @@ -9718,7 +9716,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency new() { FieldName = "RequestDate", FieldDbType = DbType.Date, Value = "@NOW", CustomValueType = FieldCustomValueTypeEnum.CustomKey }, new() { FieldName = "Importance", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value }, new() { FieldName = "Urgency", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value }, - new() { FieldName = "Status", FieldDbType = DbType.String, Value = "Backlog", CustomValueType = FieldCustomValueTypeEnum.Value }, + new() { FieldName = "Status", FieldDbType = DbType.String, Value = "backlog", CustomValueType = FieldCustomValueTypeEnum.Value }, }), TodoOptionJson = DefaultTodoOptionJson() }); @@ -9816,17 +9814,16 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency EditorType2 = EditorTypes.dxSelectBox, LookupJson = JsonSerializer.Serialize(new LookupDto { - DataSourceType = UiLookupDataSourceTypeEnum.StaticData, DisplayExpr = "name", ValueExpr = "key", LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] { - new () { Key="Backlog", Name="Backlog" }, - new () { Key="Ready to Start", Name="Ready to Start" }, - new () { Key="In Progress", Name="In Progress" }, - new () { Key="Code Review", Name="Code Review" }, - new () { Key="Testing", Name="HiTestinggh" }, - new () { Key="Staging", Name="Staging" } + new () { Key="backlog", Name="App.StaticLookup.Backlog" }, + new () { Key="ready_to_start", Name="App.StaticLookup.ReadyToStart" }, + new () { Key="in_progress", Name="App.StaticLookup.InProgress" }, + new () { Key="code_review", Name="App.StaticLookup.CodeReview" }, + new () { Key="testing", Name="App.StaticLookup.Testing" }, + new () { Key="staging", Name="App.StaticLookup.Staging" } }), }), ColSpan = 1, diff --git a/ui/src/utils/hooks/useLocalization.ts b/ui/src/utils/hooks/useLocalization.ts index 9b331596..1595307f 100644 --- a/ui/src/utils/hooks/useLocalization.ts +++ b/ui/src/utils/hooks/useLocalization.ts @@ -1,30 +1,29 @@ import { getLocalization } from '@/services/localization.service' import { useStoreState } from '@/store' +import { useCallback } from 'react' type TranslateParams = Record const useLocalization = () => { const { texts, config } = useStoreState((state) => state.abpConfig) - function translate( - localizationKey: string, - params?: TranslateParams, - defaultResourceName?: string - ): string { - // Guard against undefined texts - if (!texts) { - return localizationKey - } + const defaultResourceName = config?.localization?.defaultResourceName + const translate = useCallback( + (localizationKey: string, params?: TranslateParams, resourceName?: string): string => { + // Guard against undefined texts + if (!texts) { + return localizationKey + } - return getLocalization( - texts, - defaultResourceName ?? config?.localization?.defaultResourceName, - localizationKey, - params - ) + return getLocalization(texts, resourceName ?? defaultResourceName, localizationKey, params) + }, + [defaultResourceName, texts], + ) + + return { + translate, + cultureName: config?.localization?.currentCulture?.cultureName, } - - return { translate } } export { useLocalization } diff --git a/ui/src/views/form/useLookupDataSource.ts b/ui/src/views/form/useLookupDataSource.ts index 6fcca5da..340f997d 100644 --- a/ui/src/views/form/useLookupDataSource.ts +++ b/ui/src/views/form/useLookupDataSource.ts @@ -2,6 +2,7 @@ import { dynamicFetch } from '@/services/form.service' import { UiLookupDataSourceTypeEnum } from '@/proxy/form/models' import CustomStore from 'devextreme/data/custom_store' import { useCallback } from 'react' +import { useLocalization } from '@/utils/hooks/useLocalization' const __lookupCache = new Map>() @@ -128,6 +129,8 @@ export const useLookupDataSource = ({ listFormCode: string isSubForm?: boolean }) => { + const { translate, cultureName } = useLocalization() + const getLookupDataSource = useCallback( (options: any, colData: any, data: any) => { const { lookupDto } = colData @@ -149,9 +152,13 @@ export const useLookupDataSource = ({ } if (lookupDto.dataSourceType == UiLookupDataSourceTypeEnum.StaticData) { - const staticKey = `static:${listFormCode}:${colData.fieldName}` + const staticKey = `static:${cultureName}:${listFormCode}:${colData.fieldName}` return createLookupStaticDataSource( - () => JSON.parse(lookupDto?.lookupQuery), + () => + JSON.parse(lookupDto?.lookupQuery).map((item: any) => ({ + ...item, + name: typeof item.name === 'string' ? translate(`::${item.name}`) : item.name, + })), filters.length ? filters : null, staticKey, ) @@ -169,7 +176,7 @@ export const useLookupDataSource = ({ return { store: [] } } }, - [listFormCode, isSubForm], + [listFormCode, isSubForm, translate, cultureName], ) return { getLookupDataSource } diff --git a/ui/src/views/list/CardView.tsx b/ui/src/views/list/CardView.tsx index d717a782..a16bdca1 100644 --- a/ui/src/views/list/CardView.tsx +++ b/ui/src/views/list/CardView.tsx @@ -57,6 +57,7 @@ import { orderListToolbarItems } from './toolbarOrder' import { updateWorkflowApprovalToolbarItems, useToolbar } from './useToolbar' import { layoutTypes } from '../admin/listForm/edit/types' import { RowMode } from '../form/types' +import WidgetGroup from '@/components/ui/Widget/WidgetGroup' interface CardViewProps { listFormCode: string @@ -419,6 +420,7 @@ const CardView = (props: CardViewProps) => { const [mode, setMode] = useState('view') const [isPopupFullScreen, setIsPopupFullScreen] = useState(false) const [formData, setFormData] = useState>() + const widgetGroupRef = useRef(null) const formDataRef = useRef>() useEffect(() => { formDataRef.current = formData @@ -724,11 +726,21 @@ const CardView = (props: CardViewProps) => { .then((values) => { if (!active) return applyLookupDisplayValues(values) - setLookupReadyState({ listFormCode, ready: true }) + setLookupReadyState((current) => + current.listFormCode === listFormCode && current.ready + ? current + : { listFormCode, ready: true }, + ) }) .catch((error) => { console.error('CardView lookup preload error:', error) - if (active) setLookupReadyState({ listFormCode, ready: true }) + if (active) { + setLookupReadyState((current) => + current.listFormCode === listFormCode && current.ready + ? current + : { listFormCode, ready: true }, + ) + } }) return () => { @@ -1122,289 +1134,301 @@ const CardView = (props: CardViewProps) => { ) return ( - - {!isSubForm && ( - - )} - {!gridDto || - !dataSource || - lookupReadyState.listFormCode !== listFormCode || - !lookupReadyState.ready ? ( -
- {translate('::App.Loading')} -
- ) : ( -
- 0 ? gridDto.gridOptions.height : undefined} - width={gridDto.gridOptions.width || '100%'} - cardMinWidth={280} - cardsPerRow={cardColumnCount} - allowColumnReordering={gridDto.gridOptions.columnOptionDto?.allowColumnReordering} - rtlEnabled={gridDto.gridOptions.columnOptionDto?.rtlEnabled} - className="list-card-view list-view-toolbar-host" - hoverStateEnabled={gridDto.gridOptions.columnOptionDto?.hoverStateEnabled} - remoteOperations={{ paging: true, filtering: true, sorting: true }} - wordWrapEnabled={gridDto.gridOptions.rowDto?.whiteSpace !== 'nowrap'} - onContentReady={onContentReady} - onSelectionChanged={onSelectionChanged} - onInitNewCard={onInitNewCard} - onEditingStart={(event) => { - const nextFormData = (event.data as Record) ?? {} - formDataRef.current = nextFormData - setFormData(nextFormData) - setMode('edit') - setIsPopupFullScreen( - useMobileEditPopup || (editingOptions?.popup?.fullScreen ?? false), - ) - }} - onEditCanceled={() => { - setMode('view') - setIsPopupFullScreen(false) - }} - onSaved={() => { - setMode('view') - setIsPopupFullScreen(false) - }} - onDataErrorOccurred={(event) => { - toast.push( - - {String(event.error?.message ?? event.error ?? 'Select error')} - , - { placement: 'bottom-end' }, - ) - }} - onCardInserted={() => refreshParentData?.()} - onCardUpdated={() => refreshParentData?.()} - onCardRemoved={() => refreshParentData?.()} - > - - 0 - ? editingOptions?.popup?.width - : 'auto', - maxWidth: useMobileEditPopup ? '100%' : '95vw', - height: getPopupHeight(useMobileEditPopup, isPopupFullScreen), - maxHeight: getPopupMaxHeight( - useMobileEditPopup, - isPopupFullScreen, - editingOptions?.popup?.height, - ), - fullScreen: isPopupFullScreen, - position: useMobileEditPopup - ? { - my: 'top center', - at: 'top center', - of: typeof window !== 'undefined' ? window : undefined, - } - : editingOptions?.popup?.position, - resizeEnabled: editingOptions?.popup?.resizeEnabled, - dragEnabled: editingOptions?.popup?.dragEnabled, - restorePosition: editingOptions?.popup?.restorePosition, - toolbarItems: [ - { - widget: 'dxButton', - toolbar: 'bottom', - location: 'after', - options: { - text: translate('::Save'), - type: 'default', - onClick: () => cardViewRef.current?.instance().saveEditData(), - }, - }, - { - widget: 'dxButton', - toolbar: 'bottom', - location: 'after', - options: { - text: translate('::Cancel'), - onClick: () => cardViewRef.current?.instance().cancelEditData(), - }, - }, - { - widget: 'dxButton', - toolbar: 'top', - location: 'after', - options: { - icon: isPopupFullScreen ? 'collapse' : 'fullscreen', - hint: isPopupFullScreen - ? translate('::Normal Boyut') - : translate('::Tam Ekran'), - stylingMode: 'text', - onClick: () => setIsPopupFullScreen((current) => !current), - }, - }, - ], - }} - /> - - {cardColumnCountOptions.map((columnCount) => { - const selected = cardColumnCount === columnCount - return ( - setCardColumnCount(columnCount), - }} - /> + <> +
0 ? 'mt-2' : ''}> + +
+ + + {!isSubForm && ( + + )} + {!gridDto || + !dataSource || + lookupReadyState.listFormCode !== listFormCode || + !lookupReadyState.ready ? ( +
+ {translate('::App.Loading')} +
+ ) : ( +
+ 0 ? gridDto.gridOptions.height : undefined} + width={gridDto.gridOptions.width || '100%'} + cardMinWidth={280} + cardsPerRow={cardColumnCount} + allowColumnReordering={gridDto.gridOptions.columnOptionDto?.allowColumnReordering} + rtlEnabled={gridDto.gridOptions.columnOptionDto?.rtlEnabled} + className="list-card-view list-view-toolbar-host" + hoverStateEnabled={gridDto.gridOptions.columnOptionDto?.hoverStateEnabled} + remoteOperations={{ paging: true, filtering: true, sorting: true }} + wordWrapEnabled={gridDto.gridOptions.rowDto?.whiteSpace !== 'nowrap'} + onContentReady={onContentReady} + onSelectionChanged={onSelectionChanged} + onInitNewCard={onInitNewCard} + onEditingStart={(event) => { + const nextFormData = (event.data as Record) ?? {} + formDataRef.current = nextFormData + setFormData(nextFormData) + setMode('edit') + setIsPopupFullScreen( + useMobileEditPopup || (editingOptions?.popup?.fullScreen ?? false), ) - })} - {orderedToolbarData.map((item, index) => ( - - ))} - {gridDto.gridOptions.extraFilterDto?.length ? ( - ( - - )} - /> - ) : null} - - - - - - - - - - - + onEditCanceled={() => { + setMode('view') + setIsPopupFullScreen(false) + }} + onSaved={() => { + setMode('view') + setIsPopupFullScreen(false) + }} + onDataErrorOccurred={(event) => { + toast.push( + + {String(event.error?.message ?? event.error ?? 'Select error')} + , + { placement: 'bottom-end' }, + ) + }} + onCardInserted={() => refreshParentData?.()} + onCardUpdated={() => refreshParentData?.()} + onCardRemoved={() => refreshParentData?.()} + > + + 0 + ? editingOptions?.popup?.width + : 'auto', + maxWidth: useMobileEditPopup ? '100%' : '95vw', + height: getPopupHeight(useMobileEditPopup, isPopupFullScreen), + maxHeight: getPopupMaxHeight( + useMobileEditPopup, + isPopupFullScreen, + editingOptions?.popup?.height, + ), + fullScreen: isPopupFullScreen, + position: useMobileEditPopup + ? { + my: 'top center', + at: 'top center', + of: typeof window !== 'undefined' ? window : undefined, + } + : editingOptions?.popup?.position, + resizeEnabled: editingOptions?.popup?.resizeEnabled, + dragEnabled: editingOptions?.popup?.dragEnabled, + restorePosition: editingOptions?.popup?.restorePosition, + toolbarItems: [ + { + widget: 'dxButton', + toolbar: 'bottom', + location: 'after', + options: { + text: translate('::Save'), + type: 'default', + onClick: () => cardViewRef.current?.instance().saveEditData(), + }, + }, + { + widget: 'dxButton', + toolbar: 'bottom', + location: 'after', + options: { + text: translate('::Cancel'), + onClick: () => cardViewRef.current?.instance().cancelEditData(), + }, + }, + { + widget: 'dxButton', + toolbar: 'top', + location: 'after', + options: { + icon: isPopupFullScreen ? 'collapse' : 'fullscreen', + hint: isPopupFullScreen + ? translate('::Normal Boyut') + : translate('::Tam Ekran'), + stylingMode: 'text', + onClick: () => setIsPopupFullScreen((current) => !current), + }, + }, + ], + }} + /> + + {cardColumnCountOptions.map((columnCount) => { + const selected = cardColumnCount === columnCount + return ( + setCardColumnCount(columnCount), + }} + /> + ) + })} + {orderedToolbarData.map((item, index) => ( + + ))} + {gridDto.gridOptions.extraFilterDto?.length ? ( + ( + + )} + /> + ) : null} + + + + + + + + + + + - {gridDto.gridOptions.subFormsDto?.length > 0 && - gridDto.gridOptions.subFormsListFormType === SubFormTabTypeEnum.List && ( - <> -
- - - )} + {gridDto.gridOptions.subFormsDto?.length > 0 && + gridDto.gridOptions.subFormsListFormType === SubFormTabTypeEnum.List && ( + <> +
+ + + )} - filterData.setIsImportModalOpen(false)} - onRequestClose={() => filterData.setIsImportModalOpen(false)} - > - -

- {translate('::ListForms.ListForm.ImportManager')} -

-
- - - -
-
- )} + filterData.setIsImportModalOpen(false)} + onRequestClose={() => filterData.setIsImportModalOpen(false)} + > + +

+ {translate('::ListForms.ListForm.ImportManager')} +

+
+ + + +
+
+ )} - setToolbarModalData(undefined)} - onRequestClose={() => setToolbarModalData(undefined)} - > - {toolbarModalData?.content} - - - {notePanelTarget && ( - setNotePanelTarget(null)} + setToolbarModalData(undefined)} + onRequestClose={() => setToolbarModalData(undefined)} + > + {toolbarModalData?.content} + + - )} -
+ {notePanelTarget && ( + setNotePanelTarget(null)} + /> + )} + + ) } diff --git a/ui/src/views/list/Pivot.tsx b/ui/src/views/list/Pivot.tsx index 71643184..4d297244 100644 --- a/ui/src/views/list/Pivot.tsx +++ b/ui/src/views/list/Pivot.tsx @@ -66,6 +66,7 @@ const Pivot = (props: PivotProps) => { const gridRef = useRef() const chartRef = useRef(null) const refListFormCode = useRef('') + const widgetGroupRef = useRef(null) const config = useStoreState((state) => state.abpConfig.config) const [gridDataSource, setGridDataSource] = useState>() @@ -431,7 +432,9 @@ const Pivot = (props: PivotProps) => { return ( <> - +
0 ? 'mt-2' : ''}> + +
{!isSubForm && ( diff --git a/ui/src/views/list/TodoBoard.tsx b/ui/src/views/list/TodoBoard.tsx index df0f8aa2..df0f5561 100644 --- a/ui/src/views/list/TodoBoard.tsx +++ b/ui/src/views/list/TodoBoard.tsx @@ -83,6 +83,15 @@ interface UserOption { type LookupDisplayValues = Record> +const TODO_STATUS_LANGUAGE_KEYS: Record = { + backlog: 'App.StaticLookup.Backlog', + 'ready to start': 'App.StaticLookup.ReadyToStart', + 'in progress': 'App.StaticLookup.InProgress', + 'code review': 'App.StaticLookup.CodeReview', + testing: 'App.StaticLookup.Testing', + staging: 'App.StaticLookup.Staging', +} + const flattenColumns = (columns: GridColumnData[] = []): GridColumnData[] => columns.flatMap((column) => column.columns?.length ? flattenColumns(column.columns as GridColumnData[]) : [column], @@ -260,6 +269,14 @@ const TodoBoard = ({ listFormCode, searchParams, isSubForm, gridDto }: TodoBoard [lookupValuesForField], ) + const statusText = useCallback( + (status: string) => { + const languageKey = TODO_STATUS_LANGUAGE_KEYS[status.trim().toLocaleLowerCase()] + return languageKey ? translate(`::${languageKey}`) : lookupText(options.statusExpr, status) + }, + [lookupText, options.statusExpr, translate], + ) + const clearDragState = useCallback(() => { dragActiveRef.current = false setDraggedKey(undefined) @@ -633,7 +650,11 @@ const TodoBoard = ({ listFormCode, searchParams, isSubForm, gridDto }: TodoBoard }) return } - if (!window.confirm(translate('::ListForms.TodoBoard.ConfirmDeleteColumn', { 0: status }))) + if ( + !window.confirm( + translate('::ListForms.TodoBoard.ConfirmDeleteColumn', { 0: statusText(status) }), + ) + ) return const next = statuses.filter((item) => item !== status) @@ -1051,7 +1072,7 @@ const TodoBoard = ({ listFormCode, searchParams, isSubForm, gridDto }: TodoBoard > {statuses.map((status) => ( ))} @@ -1270,11 +1291,8 @@ const TodoBoard = ({ listFormCode, searchParams, isSubForm, gridDto }: TodoBoard ) : ( <> -

- {lookupText(options.statusExpr, status)} +

+ {statusText(status)}

{canUpdate && (