Intranet dil desteği devam
This commit is contained in:
parent
265d203b95
commit
f9efd0a145
13 changed files with 1693 additions and 1542 deletions
|
|
@ -137,7 +137,7 @@ public static class LookupQueryValues
|
||||||
|
|
||||||
public static string CityValues =
|
public static string CityValues =
|
||||||
$"SELECT " +
|
$"SELECT " +
|
||||||
$"\"Name\" AS \"Key\", " +
|
$"\"Id\" AS \"Key\", " +
|
||||||
$"\"Name\" AS \"Name\" " +
|
$"\"Name\" AS \"Name\" " +
|
||||||
$"FROM \"{FullNameTable(TableNameEnum.City)}\" " +
|
$"FROM \"{FullNameTable(TableNameEnum.City)}\" " +
|
||||||
$"WHERE " +
|
$"WHERE " +
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ using Volo.Abp.Application.Dtos;
|
||||||
|
|
||||||
namespace Erp.Platform.Public;
|
namespace Erp.Platform.Public;
|
||||||
|
|
||||||
public class CityDto : AuditedEntityDto<Guid>
|
public class CityDto : AuditedEntityDto<string>
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string PlateCode { get; set; }
|
public string PlateCode { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Volo.Abp.Application.Dtos;
|
using Volo.Abp.Application.Dtos;
|
||||||
|
|
||||||
namespace Erp.Platform.Public;
|
namespace Erp.Platform.Public;
|
||||||
|
|
||||||
public class CountryDto : AuditedEntityDto<Guid>
|
public class CountryDto : AuditedEntityDto<string>
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string GroupName { get; set; }
|
public string GroupName { get; set; }
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -153,7 +153,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<Currency, string> _currencyRepository;
|
private readonly IRepository<Currency, string> _currencyRepository;
|
||||||
private readonly IRepository<CountryGroup, string> _countryGroupRepository;
|
private readonly IRepository<CountryGroup, string> _countryGroupRepository;
|
||||||
private readonly IRepository<Country, string> _countryRepository;
|
private readonly IRepository<Country, string> _countryRepository;
|
||||||
private readonly IRepository<City, Guid> _cityRepository;
|
private readonly IRepository<City, string> _cityRepository;
|
||||||
private readonly IRepository<District, Guid> _districtRepository;
|
private readonly IRepository<District, Guid> _districtRepository;
|
||||||
private readonly IRepository<ContactTag, Guid> _contactTagRepository;
|
private readonly IRepository<ContactTag, Guid> _contactTagRepository;
|
||||||
private readonly IRepository<ContactTitle, Guid> _contactTitleRepository;
|
private readonly IRepository<ContactTitle, Guid> _contactTitleRepository;
|
||||||
|
|
@ -173,7 +173,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<Currency, string> currencyRepository,
|
IRepository<Currency, string> currencyRepository,
|
||||||
IRepository<CountryGroup, string> countryGroupRepository,
|
IRepository<CountryGroup, string> countryGroupRepository,
|
||||||
IRepository<Country, string> countryRepository,
|
IRepository<Country, string> countryRepository,
|
||||||
IRepository<City, Guid> cityRepository,
|
IRepository<City, string> cityRepository,
|
||||||
IRepository<District, Guid> districtRepository,
|
IRepository<District, Guid> districtRepository,
|
||||||
IRepository<ContactTag, Guid> contactTagRepository,
|
IRepository<ContactTag, Guid> contactTagRepository,
|
||||||
IRepository<ContactTitle, Guid> contactTitleRepository,
|
IRepository<ContactTitle, Guid> contactTitleRepository,
|
||||||
|
|
@ -350,7 +350,7 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
if (existingSet.Contains(key)) continue; // duplicate kontrolü
|
if (existingSet.Contains(key)) continue; // duplicate kontrolü
|
||||||
|
|
||||||
buffer.Add(new City(
|
buffer.Add(new City(
|
||||||
Guid.NewGuid(),
|
item.Id,
|
||||||
item.Country,
|
item.Country,
|
||||||
item.Name,
|
item.Name,
|
||||||
item.PlateCode
|
item.PlateCode
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,6 @@
|
||||||
"isEnabled": true,
|
"isEnabled": true,
|
||||||
"twoLetterIsoLanguageName": "ar"
|
"twoLetterIsoLanguageName": "ar"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cultureName": "cs",
|
|
||||||
"uiCultureName": "cs",
|
|
||||||
"displayName": "Čeština",
|
|
||||||
"isEnabled": true,
|
|
||||||
"twoLetterIsoLanguageName": "cs"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cultureName": "de-DE",
|
"cultureName": "de-DE",
|
||||||
"uiCultureName": "de-DE",
|
"uiCultureName": "de-DE",
|
||||||
|
|
@ -12181,6 +12174,162 @@
|
||||||
"key": "App.Platform.Intranet.Widgets.Visitors.StatusText.Unknown",
|
"key": "App.Platform.Intranet.Widgets.Visitors.StatusText.Unknown",
|
||||||
"tr": "Bilinmiyor",
|
"tr": "Bilinmiyor",
|
||||||
"en": "Unknown"
|
"en": "Unknown"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CurrentUser",
|
||||||
|
"tr": "Siz",
|
||||||
|
"en": "You"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.DeleteConfirm",
|
||||||
|
"tr": "Bu gönderiyi silmek istediğinizden emin misiniz?",
|
||||||
|
"en": "Are you sure you want to delete this post?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.AllPosts",
|
||||||
|
"tr": "Tüm Gönderiler",
|
||||||
|
"en": "All Posts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.MyPosts",
|
||||||
|
"tr": "Gönderilerim",
|
||||||
|
"en": "My Posts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.NoMyPosts",
|
||||||
|
"tr": "Henüz bir gönderi paylaşmadınız.",
|
||||||
|
"en": "You haven't shared any posts yet."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.NoPosts",
|
||||||
|
"tr": "Henüz gönderi yok.",
|
||||||
|
"en": "No posts yet."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.Placeholder",
|
||||||
|
"tr": "Lütfen bir gönderi yazın...",
|
||||||
|
"en": "Please write a post..."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.MediaTitle",
|
||||||
|
"tr": "Medyalar",
|
||||||
|
"en": "Media"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.RemoveAllMediaTitle",
|
||||||
|
"tr": "Tüm medyaları kaldır",
|
||||||
|
"en": "Remove all media"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.Cancel",
|
||||||
|
"tr": "Vazgeç",
|
||||||
|
"en": "Cancel"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.Location",
|
||||||
|
"tr": "Konum",
|
||||||
|
"en": "Location"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.RemoveLocationTitle",
|
||||||
|
"tr": "Konumu kaldır",
|
||||||
|
"en": "Remove location"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.Poll",
|
||||||
|
"tr": "Anket",
|
||||||
|
"en": "Poll"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.RemovePollTitle",
|
||||||
|
"tr": "Anketi kaldır",
|
||||||
|
"en": "Remove poll"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.PollQuestionPlaceholder",
|
||||||
|
"tr": "Soru",
|
||||||
|
"en": "Question"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.PollOptionPlaceholder",
|
||||||
|
"tr": "Seçenek",
|
||||||
|
"en": "Option"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.AddOption",
|
||||||
|
"tr": "Seçenek Ekle",
|
||||||
|
"en": "Add Option"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.EditMediaTitle",
|
||||||
|
"tr": "Medyaları düzenle",
|
||||||
|
"en": "Edit media"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.AddMediaTitle",
|
||||||
|
"tr": "Medya ekle",
|
||||||
|
"en": "Add media"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.AddPollTitle",
|
||||||
|
"tr": "Anket ekle",
|
||||||
|
"en": "Add poll"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.AddEmojiTitle",
|
||||||
|
"tr": "Emoji ekle",
|
||||||
|
"en": "Add emoji"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.EditLocationTitle",
|
||||||
|
"tr": "Konumu değiştir",
|
||||||
|
"en": "Edit location"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.AddLocationTitle",
|
||||||
|
"tr": "Konum ekle",
|
||||||
|
"en": "Add location"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.SocialWall.CreatePost.Submit",
|
||||||
|
"tr": "Paylaş",
|
||||||
|
"en": "Share"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.Dashboard.DesignMode",
|
||||||
|
"tr": "Dizayn Mod",
|
||||||
|
"en": "Design Mode"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "App.Platform.Intranet.Dashboard.Reset",
|
||||||
|
"tr": "Sıfırla",
|
||||||
|
"en": "Reset"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1896,7 +1896,7 @@ public class ListFormSeeder_Hr : IDataSeedContributor, ITransientDependency
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "IbanNumber",
|
FieldName = "IbanNumber",
|
||||||
Width = 100,
|
Width = 250,
|
||||||
ListOrderNo = 34,
|
ListOrderNo = 34,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Volo.Abp.Domain.Entities.Auditing;
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
|
|
||||||
namespace Erp.Platform.Entities;
|
namespace Erp.Platform.Entities;
|
||||||
|
|
||||||
public class City : FullAuditedEntity<Guid>
|
public class City : FullAuditedEntity<string>
|
||||||
{
|
{
|
||||||
public string Country { get; set; }
|
public string Country { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
@ -14,7 +13,7 @@ public class City : FullAuditedEntity<Guid>
|
||||||
|
|
||||||
protected City() { }
|
protected City() { }
|
||||||
|
|
||||||
public City(Guid id, string country, string name, string plateCode)
|
public City(string id, string country, string name, string plateCode)
|
||||||
: base(id)
|
: base(id)
|
||||||
{
|
{
|
||||||
Country = country;
|
Country = country;
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ function RolesPermission({
|
||||||
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
getConfig(true)
|
getConfig(true)
|
||||||
}, 3000)
|
}, 6000)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPermissionsWithGroupName(groups: PermissionGroupDto[]): PermissionWithGroupName[] {
|
function getPermissionsWithGroupName(groups: PermissionGroupDto[]): PermissionWithGroupName[] {
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ function UsersPermission({
|
||||||
|
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
getConfig(true)
|
getConfig(true)
|
||||||
}, 3000)
|
}, 6000)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPermissionsWithGroupName(groups: PermissionGroupDto[]): PermissionWithGroupName[] {
|
function getPermissionsWithGroupName(groups: PermissionGroupDto[]): PermissionWithGroupName[] {
|
||||||
|
|
|
||||||
|
|
@ -491,7 +491,7 @@ const IntranetDashboard: React.FC = () => {
|
||||||
htmlFor="design-mode-toggle"
|
htmlFor="design-mode-toggle"
|
||||||
className="text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"
|
className="text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer"
|
||||||
>
|
>
|
||||||
🎨 Dizayn Modu
|
🎨 {translate('::App.Platform.Intranet.Dashboard.DesignMode')}
|
||||||
</label>
|
</label>
|
||||||
<button
|
<button
|
||||||
id="design-mode-toggle"
|
id="design-mode-toggle"
|
||||||
|
|
@ -522,7 +522,7 @@ const IntranetDashboard: React.FC = () => {
|
||||||
className="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors flex items-center gap-1"
|
className="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors flex items-center gap-1"
|
||||||
title="Widget düzenini varsayılana döndür"
|
title="Widget düzenini varsayılana döndür"
|
||||||
>
|
>
|
||||||
🔄 Sıfırla
|
🔄 {translate('::App.Platform.Intranet.Dashboard.Reset')}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-2">
|
||||||
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300">
|
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300">
|
||||||
Medyalar ({mediaItems.length})
|
{translate('::App.Platform.Intranet.SocialWall.CreatePost.MediaTitle')} ({mediaItems.length})
|
||||||
</h4>
|
</h4>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -195,9 +195,9 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
clearMedia()
|
clearMedia()
|
||||||
}}
|
}}
|
||||||
className="text-sm text-red-600 hover:text-red-700 font-medium"
|
className="text-sm text-red-600 hover:text-red-700 font-medium"
|
||||||
title="Tüm medyaları kaldır"
|
title={translate('::App.Platform.Intranet.SocialWall.CreatePost.RemoveAllMediaTitle')}
|
||||||
>
|
>
|
||||||
Vazgeç
|
{translate('::App.Platform.Intranet.SocialWall.CreatePost.Cancel')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="grid grid-cols-4 gap-2">
|
<div className="grid grid-cols-4 gap-2">
|
||||||
|
|
@ -250,14 +250,14 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
className="mb-4"
|
className="mb-4"
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-2">
|
||||||
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300">Konum</h4>
|
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300">{translate('::App.Platform.Intranet.SocialWall.CreatePost.Location')}</h4>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setLocation(null)}
|
onClick={() => setLocation(null)}
|
||||||
className="text-sm text-red-600 hover:text-red-700 font-medium"
|
className="text-sm text-red-600 hover:text-red-700 font-medium"
|
||||||
title="Konumu kaldır"
|
title={translate('::App.Platform.Intranet.SocialWall.CreatePost.RemoveLocationTitle')}
|
||||||
>
|
>
|
||||||
Vazgeç
|
{translate('::App.Platform.Intranet.SocialWall.CreatePost.Cancel')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700">
|
<div className="p-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-gray-50 dark:bg-gray-700">
|
||||||
|
|
@ -284,23 +284,23 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
className="mb-4"
|
className="mb-4"
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="flex items-center justify-between mb-2">
|
||||||
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300">Anket</h4>
|
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300">{translate('::App.Platform.Intranet.SocialWall.CreatePost.Poll')}</h4>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
clearMedia()
|
clearMedia()
|
||||||
}}
|
}}
|
||||||
className="text-sm text-red-600 hover:text-red-700 font-medium"
|
className="text-sm text-red-600 hover:text-red-700 font-medium"
|
||||||
title="Anketi kaldır"
|
title={translate('::App.Platform.Intranet.SocialWall.CreatePost.RemovePollTitle')}
|
||||||
>
|
>
|
||||||
Vazgeç
|
{translate('::App.Platform.Intranet.SocialWall.CreatePost.Cancel')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={pollQuestion}
|
value={pollQuestion}
|
||||||
onChange={(e) => setPollQuestion(e.target.value)}
|
onChange={(e) => setPollQuestion(e.target.value)}
|
||||||
placeholder="Soru"
|
placeholder={translate('::App.Platform.Intranet.SocialWall.CreatePost.PollQuestionPlaceholder')}
|
||||||
className="w-full px-4 py-2 mb-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
className="w-full px-4 py-2 mb-3 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
/>
|
/>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
|
|
@ -310,7 +310,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
type="text"
|
type="text"
|
||||||
value={option}
|
value={option}
|
||||||
onChange={(e) => updatePollOption(index, e.target.value)}
|
onChange={(e) => updatePollOption(index, e.target.value)}
|
||||||
placeholder={`Seçenek ${index + 1}`}
|
placeholder={translate('::App.Platform.Intranet.SocialWall.CreatePost.PollOptionPlaceholder')}
|
||||||
className="flex-1 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
className="flex-1 px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500"
|
||||||
/>
|
/>
|
||||||
{pollOptions.length > 2 && (
|
{pollOptions.length > 2 && (
|
||||||
|
|
@ -331,7 +331,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
onClick={addPollOption}
|
onClick={addPollOption}
|
||||||
className="mt-2 text-sm text-blue-600 hover:text-blue-700 font-medium"
|
className="mt-2 text-sm text-blue-600 hover:text-blue-700 font-medium"
|
||||||
>
|
>
|
||||||
+ Seçenek Ekle
|
+ {translate('::App.Platform.Intranet.SocialWall.CreatePost.AddOption')}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
|
@ -367,7 +367,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
? 'bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400'
|
? 'bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400'
|
||||||
: 'text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700'
|
: 'text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700'
|
||||||
)}
|
)}
|
||||||
title={mediaType === 'media' ? 'Medyaları düzenle' : 'Medya ekle'}
|
title={mediaType === 'media' ? translate('::App.Platform.Intranet.SocialWall.CreatePost.EditMediaTitle') : translate('::App.Platform.Intranet.SocialWall.CreatePost.AddMediaTitle')}
|
||||||
>
|
>
|
||||||
<FaImages className="w-5 h-5" />
|
<FaImages className="w-5 h-5" />
|
||||||
{mediaType === 'media' && mediaItems.length > 0 && (
|
{mediaType === 'media' && mediaItems.length > 0 && (
|
||||||
|
|
@ -391,7 +391,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
? 'bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400'
|
? 'bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400'
|
||||||
: 'text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700'
|
: 'text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700'
|
||||||
)}
|
)}
|
||||||
title={mediaType === 'poll' ? 'Anketi kaldır' : 'Anket ekle'}
|
title={mediaType === 'poll' ? translate('::App.Platform.Intranet.SocialWall.CreatePost.RemovePollTitle') : translate('::App.Platform.Intranet.SocialWall.CreatePost.AddPollTitle')}
|
||||||
>
|
>
|
||||||
<FaChartBar className="w-5 h-5" />
|
<FaChartBar className="w-5 h-5" />
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -399,7 +399,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setShowEmojiPicker(!showEmojiPicker)}
|
onClick={() => setShowEmojiPicker(!showEmojiPicker)}
|
||||||
className="p-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors"
|
className="p-2 text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors"
|
||||||
title="Emoji ekle"
|
title={translate('::App.Platform.Intranet.SocialWall.CreatePost.AddEmojiTitle')}
|
||||||
>
|
>
|
||||||
<FaSmile className="w-5 h-5" />
|
<FaSmile className="w-5 h-5" />
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -412,7 +412,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
? 'bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400'
|
? 'bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-400'
|
||||||
: 'text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700'
|
: 'text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700'
|
||||||
)}
|
)}
|
||||||
title={location ? 'Konumu değiştir' : 'Konum ekle'}
|
title={location ? translate('::App.Platform.Intranet.SocialWall.CreatePost.EditLocationTitle') : translate('::App.Platform.Intranet.SocialWall.CreatePost.AddLocationTitle')}
|
||||||
>
|
>
|
||||||
<FaMapMarkerAlt className="w-5 h-5" />
|
<FaMapMarkerAlt className="w-5 h-5" />
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -432,7 +432,7 @@ const CreatePost: React.FC<CreatePostProps> = ({ onCreatePost }) => {
|
||||||
disabled={!content.trim() && mediaItems.length === 0 && !mediaType}
|
disabled={!content.trim() && mediaItems.length === 0 && !mediaType}
|
||||||
className="px-6 py-2 bg-blue-600 text-white font-medium rounded-full hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors"
|
className="px-6 py-2 bg-blue-600 text-white font-medium rounded-full hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors"
|
||||||
>
|
>
|
||||||
Paylaş
|
{translate('::App.Platform.Intranet.SocialWall.CreatePost.Submit')}
|
||||||
</button>
|
</button>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import { AnimatePresence } from 'framer-motion'
|
import { AnimatePresence } from 'framer-motion'
|
||||||
import PostItem from './PostItem'
|
import PostItem from './PostItem'
|
||||||
import CreatePost from './CreatePost'
|
import CreatePost from './CreatePost'
|
||||||
|
|
@ -8,9 +9,10 @@ import { EmployeeDto, SocialMediaDto, SocialPostDto } from '@/proxy/intranet/mod
|
||||||
const SocialWall: React.FC<{ posts: SocialPostDto[] }> = ({ posts }) => {
|
const SocialWall: React.FC<{ posts: SocialPostDto[] }> = ({ posts }) => {
|
||||||
// const [posts, setPosts] = useState<SocialPost[]>(mockSocialPosts)
|
// const [posts, setPosts] = useState<SocialPost[]>(mockSocialPosts)
|
||||||
const [filter, setFilter] = useState<'all' | 'mine'>('all')
|
const [filter, setFilter] = useState<'all' | 'mine'>('all')
|
||||||
|
const { translate } = useLocalization()
|
||||||
|
|
||||||
// Ali Öztürk'ü "Siz" kullanıcısı olarak kullan
|
// Ali Öztürk'ü "Siz" kullanıcısı olarak kullan
|
||||||
const currentUserAuthor: EmployeeDto = { ...mockEmployees[0], name: 'Siz' }
|
const currentUserAuthor: EmployeeDto = { ...mockEmployees[0], name: translate('::App.Platform.Intranet.SocialWall.CurrentUser') }
|
||||||
|
|
||||||
const handleCreatePost = (postData: {
|
const handleCreatePost = (postData: {
|
||||||
content: string
|
content: string
|
||||||
|
|
@ -118,7 +120,7 @@ const SocialWall: React.FC<{ posts: SocialPostDto[] }> = ({ posts }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDelete = (postId: string) => {
|
const handleDelete = (postId: string) => {
|
||||||
if (window.confirm('Bu gönderiyi silmek istediğinizden emin misiniz?')) {
|
if (window.confirm(translate('::App.Platform.Intranet.SocialWall.DeleteConfirm'))) {
|
||||||
// setPosts(posts.filter((post) => post.id !== postId))
|
// setPosts(posts.filter((post) => post.id !== postId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -162,7 +164,7 @@ const SocialWall: React.FC<{ posts: SocialPostDto[] }> = ({ posts }) => {
|
||||||
: 'border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200'
|
: 'border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Tüm Gönderiler
|
{translate('::App.Platform.Intranet.SocialWall.AllPosts')}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => setFilter('mine')}
|
onClick={() => setFilter('mine')}
|
||||||
|
|
@ -172,7 +174,7 @@ const SocialWall: React.FC<{ posts: SocialPostDto[] }> = ({ posts }) => {
|
||||||
: 'border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200'
|
: 'border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
Gönderilerim
|
{translate('::App.Platform.Intranet.SocialWall.MyPosts')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -195,7 +197,9 @@ const SocialWall: React.FC<{ posts: SocialPostDto[] }> = ({ posts }) => {
|
||||||
) : (
|
) : (
|
||||||
<div className="text-center py-12">
|
<div className="text-center py-12">
|
||||||
<p className="text-gray-500 dark:text-gray-400 text-lg">
|
<p className="text-gray-500 dark:text-gray-400 text-lg">
|
||||||
{filter === 'mine' ? 'Henüz bir gönderi paylaşmadınız.' : 'Henüz gönderi yok.'}
|
{filter === 'mine'
|
||||||
|
? translate('::App.Platform.Intranet.SocialWall.NoMyPosts')
|
||||||
|
: translate('::App.Platform.Intranet.SocialWall.NoPosts')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue