diff --git a/api/src/Sozsoft.Platform.Application/Public/PublicAppService.cs b/api/src/Sozsoft.Platform.Application/Public/PublicAppService.cs index fdbcfba..a4e63d7 100644 --- a/api/src/Sozsoft.Platform.Application/Public/PublicAppService.cs +++ b/api/src/Sozsoft.Platform.Application/Public/PublicAppService.cs @@ -195,20 +195,13 @@ public class PublicAppService : PlatformAppService public async Task GetHomeAsync() { - var entity = await _homeRepository.FirstOrDefaultAsync(); - if (entity == null) - { - entity = await _homeRepository.InsertAsync(CreateDefaultHomeEntity(), autoSave: true); - } - + var entity = await _homeRepository.FirstOrDefaultAsync() ?? throw new EntityNotFoundException(typeof(Home)); return ObjectMapper.Map(entity); } public async Task SaveHomePageAsync(SaveHomePageInput input) { - var entity = await _homeRepository.FirstOrDefaultAsync(); - var isNewEntity = entity == null; - entity ??= CreateDefaultHomeEntity(); + var entity = await _homeRepository.FirstOrDefaultAsync() ?? throw new EntityNotFoundException(typeof(Home)); entity.HeroBackgroundImageKey = input.HeroBackgroundImageKey; entity.HeroPrimaryCtaKey = input.HeroPrimaryCtaKey; @@ -252,14 +245,7 @@ public class PublicAppService : PlatformAppService StyleClass = solution.StyleClass, }).ToList()); - if (isNewEntity) - { - await _homeRepository.InsertAsync(entity, autoSave: false); - } - else - { - await _homeRepository.UpdateAsync(entity, autoSave: false); - } + await _homeRepository.UpdateAsync(entity, autoSave: false); await UpsertLanguageTextAsync(input.CultureName, input.HeroBackgroundImageKey, input.HeroBackgroundImageValue); await UpsertLanguageTextAsync(input.CultureName, input.HeroPrimaryCtaKey, input.HeroPrimaryCtaValue); @@ -608,83 +594,6 @@ public class PublicAppService : PlatformAppService await _languageTextAppService.ClearRedisCacheAsync(); } - private static Home CreateDefaultHomeEntity() - { - var slides = new List - { - new() - { - TitleKey = "Public.hero.slide1.title", - SubtitleKey = "Public.hero.slide1.subtitle", - Services = new List - { - new() { Icon = "FaCalendarAlt", TitleKey = "Public.hero.slide1.service1.title", DescriptionKey = "Public.hero.slide1.service1.desc" }, - new() { Icon = "FaUsers", TitleKey = "Public.hero.slide1.service2.title", DescriptionKey = "Public.hero.slide1.service2.desc" }, - new() { Icon = "FaShieldAlt", TitleKey = "Public.hero.slide1.service3.title", DescriptionKey = "Public.hero.slide1.service3.desc" }, - }, - }, - new() - { - TitleKey = "Public.hero.slide2.title", - SubtitleKey = "Public.hero.slide2.subtitle", - Services = new List - { - new() { Icon = "FaChartBar", TitleKey = "Public.hero.slide2.service1.title", DescriptionKey = "Public.hero.slide2.service1.desc" }, - new() { Icon = "FaCreditCard", TitleKey = "Public.hero.slide2.service2.title", DescriptionKey = "Public.hero.slide2.service2.desc" }, - new() { Icon = "FaDatabase", TitleKey = "Public.hero.slide2.service3.title", DescriptionKey = "Public.hero.slide2.service3.desc" }, - }, - }, - new() - { - TitleKey = "Public.hero.slide3.title", - SubtitleKey = "Public.hero.slide3.subtitle", - Services = new List - { - new() { Icon = "FaDesktop", TitleKey = "Public.hero.slide3.service1.title", DescriptionKey = "Public.hero.slide3.service1.desc" }, - new() { Icon = "FaServer", TitleKey = "Public.hero.slide3.service2.title", DescriptionKey = "Public.hero.slide3.service2.desc" }, - new() { Icon = "FaMobileAlt", TitleKey = "Public.hero.slide3.service3.title", DescriptionKey = "Public.hero.slide3.service3.desc" }, - }, - }, - }; - - var features = new List - { - new() { Icon = "FaUsers", TitleKey = "Public.features.reliable", DescriptionKey = "Public.features.reliable.desc" }, - new() { Icon = "FaCalendarAlt", TitleKey = "App.Videoroom.Planning", DescriptionKey = "Public.features.rapid.desc" }, - new() { Icon = "FaBookOpen", TitleKey = "Public.features.expert", DescriptionKey = "Public.features.expert.desc" }, - new() { Icon = "FaCreditCard", TitleKey = "Public.features.muhasebe", DescriptionKey = "Public.features.muhasebe.desc" }, - new() { Icon = "FaRegComment", TitleKey = "Public.features.iletisim", DescriptionKey = "Public.features.iletisim.desc" }, - new() { Icon = "FaPhone", TitleKey = "Public.features.mobil", DescriptionKey = "Public.features.mobil.desc" }, - new() { Icon = "FaChartBar", TitleKey = "Public.features.scalable", DescriptionKey = "Public.features.scalable.desc" }, - new() { Icon = "FaShieldAlt", TitleKey = "Public.features.guvenlik", DescriptionKey = "Public.features.guvenlik.desc" }, - }; - - var solutions = new List - { - new() { Icon = "FaDesktop", ColorClass = "bg-blue-600", TitleKey = "Public.services.web.title", DescriptionKey = "Public.solutions.web.desc" }, - new() { Icon = "FaMobileAlt", ColorClass = "bg-purple-600", TitleKey = "Public.services.mobile.title", DescriptionKey = "Public.solutions.mobile.desc" }, - new() { Icon = "FaServer", ColorClass = "bg-green-600", TitleKey = "Public.solutions.custom.title", DescriptionKey = "Public.solutions.custom.desc" }, - new() { Icon = "FaDatabase", ColorClass = "bg-red-600", TitleKey = "Public.solutions.database.title", DescriptionKey = "Public.solutions.database.desc" }, - }; - - return new Home - { - HeroBackgroundImageKey = "Public.home.hero.backgroundImage", - HeroPrimaryCtaKey = "Public.hero.cta.consultation", - HeroSecondaryCtaKey = "Public.hero.cta.discover", - FeaturesTitleKey = "Public.features.title", - FeaturesSubtitleKey = "Public.features.subtitle", - SolutionsTitleKey = "Public.solutions.title", - SolutionsSubtitleKey = "Public.solutions.subtitle", - CtaTitleKey = "Public.common.getStarted", - CtaSubtitleKey = "Public.common.contact", - CtaButtonLabelKey = "Public.common.learnMore", - SlidesJson = JsonSerializer.Serialize(slides), - FeaturesJson = JsonSerializer.Serialize(features), - SolutionsJson = JsonSerializer.Serialize(solutions), - }; - } - private async Task UpsertLanguageTextAsync(string cultureName, string key, string value) { if (key.IsNullOrWhiteSpace()) diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json index 6867cb4..7e1e2a1 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantData.json @@ -429,6 +429,153 @@ ] } ], + "Homes": [ + { + "heroBackgroundImageKey": "Public.home.hero.backgroundImage", + "heroPrimaryCtaKey": "Public.hero.cta.consultation", + "heroSecondaryCtaKey": "Public.hero.cta.discover", + "featuresTitleKey": "Public.features.title", + "featuresSubtitleKey": "Public.features.subtitle", + "solutionsTitleKey": "Public.solutions.title", + "solutionsSubtitleKey": "Public.solutions.subtitle", + "ctaTitleKey": "Public.common.getStarted", + "ctaSubtitleKey": "Public.common.contact", + "ctaButtonLabelKey": "Public.common.learnMore", + "slides": [ + { + "titleKey": "Public.hero.slide1.title", + "subtitleKey": "Public.hero.slide1.subtitle", + "services": [ + { + "icon": "FaCalendarAlt", + "titleKey": "Public.hero.slide1.service1.title", + "descriptionKey": "Public.hero.slide1.service1.desc" + }, + { + "icon": "FaUsers", + "titleKey": "Public.hero.slide1.service2.title", + "descriptionKey": "Public.hero.slide1.service2.desc" + }, + { + "icon": "FaShieldAlt", + "titleKey": "Public.hero.slide1.service3.title", + "descriptionKey": "Public.hero.slide1.service3.desc" + } + ] + }, + { + "titleKey": "Public.hero.slide2.title", + "subtitleKey": "Public.hero.slide2.subtitle", + "services": [ + { + "icon": "FaChartBar", + "titleKey": "Public.hero.slide2.service1.title", + "descriptionKey": "Public.hero.slide2.service1.desc" + }, + { + "icon": "FaCreditCard", + "titleKey": "Public.hero.slide2.service2.title", + "descriptionKey": "Public.hero.slide2.service2.desc" + }, + { + "icon": "FaDatabase", + "titleKey": "Public.hero.slide2.service3.title", + "descriptionKey": "Public.hero.slide2.service3.desc" + } + ] + }, + { + "titleKey": "Public.hero.slide3.title", + "subtitleKey": "Public.hero.slide3.subtitle", + "services": [ + { + "icon": "FaDesktop", + "titleKey": "Public.hero.slide3.service1.title", + "descriptionKey": "Public.hero.slide3.service1.desc" + }, + { + "icon": "FaServer", + "titleKey": "Public.hero.slide3.service2.title", + "descriptionKey": "Public.hero.slide3.service2.desc" + }, + { + "icon": "FaMobileAlt", + "titleKey": "Public.hero.slide3.service3.title", + "descriptionKey": "Public.hero.slide3.service3.desc" + } + ] + } + ], + "features": [ + { + "icon": "FaUsers", + "titleKey": "Public.features.reliable", + "descriptionKey": "Public.features.reliable.desc" + }, + { + "icon": "FaCalendarAlt", + "titleKey": "App.Videoroom.Planning", + "descriptionKey": "Public.features.rapid.desc" + }, + { + "icon": "FaBookOpen", + "titleKey": "Public.features.expert", + "descriptionKey": "Public.features.expert.desc" + }, + { + "icon": "FaCreditCard", + "titleKey": "Public.features.muhasebe", + "descriptionKey": "Public.features.muhasebe.desc" + }, + { + "icon": "FaRegComment", + "titleKey": "Public.features.iletisim", + "descriptionKey": "Public.features.iletisim.desc" + }, + { + "icon": "FaPhone", + "titleKey": "Public.features.mobil", + "descriptionKey": "Public.features.mobil.desc" + }, + { + "icon": "FaChartBar", + "titleKey": "Public.features.scalable", + "descriptionKey": "Public.features.scalable.desc" + }, + { + "icon": "FaShieldAlt", + "titleKey": "Public.features.guvenlik", + "descriptionKey": "Public.features.guvenlik.desc" + } + ], + "solutions": [ + { + "icon": "FaDesktop", + "colorClass": "bg-blue-600", + "titleKey": "Public.services.web.title", + "descriptionKey": "Public.solutions.web.desc" + }, + { + "icon": "FaMobileAlt", + "colorClass": "bg-purple-600", + "titleKey": "Public.services.mobile.title", + "descriptionKey": "Public.solutions.mobile.desc" + }, + { + "icon": "FaServer", + "colorClass": "bg-green-600", + "titleKey": "Public.solutions.custom.title", + "descriptionKey": "Public.solutions.custom.desc" + }, + { + "icon": "FaDatabase", + "colorClass": "bg-red-600", + "titleKey": "Public.solutions.database.title", + "descriptionKey": "Public.solutions.database.desc" + } + ] + } + ], "Services": [ { "icon": "FaCode", @@ -2077,4 +2224,4 @@ "ResetPeriod": "Daily" } ] -} \ No newline at end of file +} diff --git a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs index 7ee636b..0e56505 100644 --- a/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs +++ b/api/src/Sozsoft.Platform.EntityFrameworkCore/Seeds/TenantDataSeeder.cs @@ -40,6 +40,7 @@ public class TenantSeederDto public List JobPositions { get; set; } //Public + public List Homes { get; set; } public List Abouts { get; set; } public List Services { get; set; } public List PaymentMethods { get; set; } @@ -392,6 +393,56 @@ public class AboutSeedDto public List Sections { get; set; } } +public class HomeSeedDto +{ + public string HeroBackgroundImageKey { get; set; } + public string HeroPrimaryCtaKey { get; set; } + public string HeroSecondaryCtaKey { get; set; } + public string FeaturesTitleKey { get; set; } + public string FeaturesSubtitleKey { get; set; } + public string SolutionsTitleKey { get; set; } + public string SolutionsSubtitleKey { get; set; } + public string CtaTitleKey { get; set; } + public string CtaSubtitleKey { get; set; } + public string CtaButtonLabelKey { get; set; } + public List Slides { get; set; } + public List Features { get; set; } + public List Solutions { get; set; } +} + +public class HomeSlideSeedDto +{ + public string TitleKey { get; set; } + public string SubtitleKey { get; set; } + public string StyleClass { get; set; } + public List Services { get; set; } +} + +public class HomeSlideServiceSeedDto +{ + public string Icon { get; set; } + public string TitleKey { get; set; } + public string DescriptionKey { get; set; } + public string StyleClass { get; set; } +} + +public class HomeFeatureSeedDto +{ + public string Icon { get; set; } + public string TitleKey { get; set; } + public string DescriptionKey { get; set; } + public string StyleClass { get; set; } +} + +public class HomeSolutionSeedDto +{ + public string Icon { get; set; } + public string ColorClass { get; set; } + public string TitleKey { get; set; } + public string DescriptionKey { get; set; } + public string StyleClass { get; set; } +} + public class WorkHourSeedDto { public string Name { get; set; } @@ -440,6 +491,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _customComponentRepository; private readonly IRepository _reportCategoriesRepository; private readonly IRepository _reportTemplatesRepository; + private readonly IRepository _homeRepository; private readonly IRepository _aboutRepository; private readonly IRepository _paymentMethodRepository; private readonly IRepository _installmentOptionRepository; @@ -495,6 +547,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository customComponentRepository, IRepository reportCategoriesRepository, IRepository reportTemplatesRepository, + IRepository homeRepository, IRepository aboutRepository, IRepository servicesRepository, IRepository productRepository, @@ -548,6 +601,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency _customComponentRepository = customComponentRepository; _reportCategoriesRepository = reportCategoriesRepository; _reportTemplatesRepository = reportTemplatesRepository; + _homeRepository = homeRepository; _servicesRepository = servicesRepository; _aboutRepository = aboutRepository; _contactRepository = contactRepository; @@ -848,6 +902,30 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency } } + foreach (var item in items.Homes) + { + var exists = await _homeRepository.FirstOrDefaultAsync(); + if (exists == null) + { + await _homeRepository.InsertAsync(new Home + { + HeroBackgroundImageKey = item.HeroBackgroundImageKey, + HeroPrimaryCtaKey = item.HeroPrimaryCtaKey, + HeroSecondaryCtaKey = item.HeroSecondaryCtaKey, + FeaturesTitleKey = item.FeaturesTitleKey, + FeaturesSubtitleKey = item.FeaturesSubtitleKey, + SolutionsTitleKey = item.SolutionsTitleKey, + SolutionsSubtitleKey = item.SolutionsSubtitleKey, + CtaTitleKey = item.CtaTitleKey, + CtaSubtitleKey = item.CtaSubtitleKey, + CtaButtonLabelKey = item.CtaButtonLabelKey, + SlidesJson = JsonSerializer.Serialize(item.Slides), + FeaturesJson = JsonSerializer.Serialize(item.Features), + SolutionsJson = JsonSerializer.Serialize(item.Solutions) + }); + } + } + foreach (var item in items.Contacts) { var exists = await _contactRepository.FirstOrDefaultAsync(); diff --git a/ui/public/version.json b/ui/public/version.json index 8cd93a7..5bb593f 100644 --- a/ui/public/version.json +++ b/ui/public/version.json @@ -1,6 +1,28 @@ { - "commit": "0b5eb3d", + "commit": "0d4703c", "releases": [ + { + "version": "1.1.03", + "buildDate": "2026-05-30", + "commit": "96f7091d46c248ba3c42849fe5d870db0ab96982", + "changeLog": [ + "- User Detail komponentinin içerisinde Avatar ekleme", + "- EditForm un içerisinde EditorOptions dinamik oluşturulması", + "- Editform un içerisinde EditorScript dinamik oluşturulması" + ] + }, + { + "version": "1.1.02", + "buildDate": "2026-05-27", + "commit": "84b9f6510787bd82f3797728fd675f755b4caa2d", + "changeLog": [ + "- .NET 10 yükseltildi.", + "- Abp Framework 10 yükseltildi.", + "- Sql Query Manager problemleri giderildi.", + "- AuditLog problemleri giderildi.", + "- Tenan yapısını uygunluğu için düzenlemeler yapıldı." + ] + }, { "version": "1.1.01", "buildDate": "2026-05-24", @@ -115,4 +137,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/EditorScriptBuilderDialog.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/EditorScriptBuilderDialog.tsx index 06f659a..83bff7a 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/EditorScriptBuilderDialog.tsx +++ b/ui/src/views/admin/listForm/edit/json-row-operations/EditorScriptBuilderDialog.tsx @@ -52,6 +52,12 @@ type EditorScriptBuilderDialogProps = { const baseInputClass = 'w-full h-9 px-2 rounded border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-sm text-gray-700 dark:text-gray-100 focus:outline-none focus:border-indigo-400' +const fieldLabelClass = + 'flex flex-col gap-1 text-xs font-medium text-gray-500 dark:text-gray-400' + +const actionIconCellClass = + 'col-span-12 flex h-9 items-center justify-end md:col-span-1 md:justify-center' + const makeId = () => `${Date.now()}_${Math.random().toString(36).slice(2)}` const createConditionalAction = (): ConditionalAction => ({ @@ -612,7 +618,7 @@ function EditorScriptBuilderDialog({ value: string, onChange: (value: string) => void, ) => ( -