diff --git a/api/src/Kurs.Platform.Application.Contracts/Intranet/EventCommentDto.cs b/api/src/Kurs.Platform.Application.Contracts/Intranet/EventCommentDto.cs new file mode 100644 index 00000000..2b09c864 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/Intranet/EventCommentDto.cs @@ -0,0 +1,12 @@ +using System; + +namespace Kurs.Platform.Public; + +public class EventCommentDto +{ + public string Id { get; set; } + public EventOrganizerDto Author { get; set; } + public string Content { get; set; } + public DateTime CreationTime { get; set; } + public int Likes { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/Intranet/EventDto.cs b/api/src/Kurs.Platform.Application.Contracts/Intranet/EventDto.cs new file mode 100644 index 00000000..5ff287a8 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/Intranet/EventDto.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +namespace Kurs.Platform.Public; + +public class EventDto +{ + public string Id { get; set; } + public string Title { get; set; } + public string Description { get; set; } + public string Type { get; set; } + public DateTime Date { get; set; } + public string Location { get; set; } + public EventOrganizerDto Organizer { get; set; } + public int Participants { get; set; } + public List Photos { get; set; } = new(); + public List Comments { get; set; } = new(); + public int Likes { get; set; } + public bool IsPublished { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/Intranet/EventOrganizerDto.cs b/api/src/Kurs.Platform.Application.Contracts/Intranet/EventOrganizerDto.cs new file mode 100644 index 00000000..03ac0bff --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/Intranet/EventOrganizerDto.cs @@ -0,0 +1,11 @@ +using System; + +namespace Kurs.Platform.Public; + +public class EventOrganizerDto +{ + public Guid Id { get; set; } + public string Name { get; set; } + public string Position { get; set; } + public string Avatar { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/Intranet/IIntranetAppService.cs b/api/src/Kurs.Platform.Application.Contracts/Intranet/IIntranetAppService.cs new file mode 100644 index 00000000..d1a574e2 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/Intranet/IIntranetAppService.cs @@ -0,0 +1,10 @@ +using System.Threading.Tasks; +using Volo.Abp.Application.Services; + +namespace Kurs.Platform.Public; + +public interface IIntranetAppService : IApplicationService +{ + Task GetIntranetDashboardAsync(); +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/Intranet/IntranetDashboardDto.cs b/api/src/Kurs.Platform.Application.Contracts/Intranet/IntranetDashboardDto.cs new file mode 100644 index 00000000..3c677db1 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/Intranet/IntranetDashboardDto.cs @@ -0,0 +1,8 @@ +using System.Collections.Generic; + +namespace Kurs.Platform.Public; + +public class IntranetDashboardDto +{ + public List Events { get; set; } = []; +} diff --git a/api/src/Kurs.Platform.Application/Blog/BlogAppService.cs b/api/src/Kurs.Platform.Application/Blog/BlogAppService.cs index f9ac0826..237cf47e 100644 --- a/api/src/Kurs.Platform.Application/Blog/BlogAppService.cs +++ b/api/src/Kurs.Platform.Application/Blog/BlogAppService.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.Extensions.Localization; using Volo.Abp.Domain.Repositories; using Volo.Abp.Users; +using static Kurs.Platform.Data.Seeds.SeedConsts; namespace Kurs.Platform.Public; @@ -162,7 +163,7 @@ public class BlogAppService : PlatformAppService, IBlogAppService return ObjectMapper.Map(category); } - [Authorize("App.BlogManagement.Create")] + [Authorize(AppCodes.BlogManagement.BlogCategory + ".Create")] public async Task CreateCategoryAsync(CreateUpdateBlogCategoryDto input) { var category = new BlogCategory @@ -180,7 +181,7 @@ public class BlogAppService : PlatformAppService, IBlogAppService return ObjectMapper.Map(category); } - [Authorize("App.BlogManagement.Update")] + [Authorize(AppCodes.BlogManagement.BlogCategory + ".Update")] public async Task UpdateCategoryAsync(Guid id, CreateUpdateBlogCategoryDto input) { var category = await _categoryRepository.GetAsync(id); @@ -197,7 +198,7 @@ public class BlogAppService : PlatformAppService, IBlogAppService return ObjectMapper.Map(category); } - [Authorize("App.BlogManagement.Delete")] + [Authorize(AppCodes.BlogManagement.BlogCategory + ".Delete")] public async Task DeleteCategoryAsync(Guid id) { // Check if category has posts diff --git a/api/src/Kurs.Platform.Application/Intranet/IntranetAppService.cs b/api/src/Kurs.Platform.Application/Intranet/IntranetAppService.cs new file mode 100644 index 00000000..6f008e89 --- /dev/null +++ b/api/src/Kurs.Platform.Application/Intranet/IntranetAppService.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Kurs.Platform.Entities; +using Microsoft.AspNetCore.Authorization; +using Volo.Abp.Domain.Repositories; + +namespace Kurs.Platform.Public; + +[Authorize] +public class IntranetAppService : PlatformAppService, IIntranetAppService +{ + private readonly IRepository _eventRepository; + private readonly IRepository _eventCategoryRepository; + private readonly IRepository _eventTypeRepository; + private readonly IRepository _eventPhotoRepository; + private readonly IRepository _eventCommentRepository; + private readonly IRepository _employeeRepository; + + public IntranetAppService( + IRepository eventRepository, + IRepository eventCategoryRepository, + IRepository eventTypeRepository, + IRepository eventPhotoRepository, + IRepository eventCommentRepository, + IRepository employeeRepository) + { + _eventRepository = eventRepository; + _eventCategoryRepository = eventCategoryRepository; + _eventTypeRepository = eventTypeRepository; + _eventPhotoRepository = eventPhotoRepository; + _eventCommentRepository = eventCommentRepository; + _employeeRepository = employeeRepository; + } + + public async Task GetIntranetDashboardAsync() + { + return new IntranetDashboardDto + { + Events = await GetUpcomingEventsAsync() + }; + } + + private async Task> GetUpcomingEventsAsync() + { + var events = await _eventRepository + .WithDetailsAsync(e => e.Category, e => e.Type, e => e.Photos, e => e.Comments) + .ContinueWith(t => t.Result.ToList().Where(e => e.isPublished).OrderByDescending(e => e.CreationTime)); + + var result = new List(); + foreach (var evt in events) + { + var employee = await _employeeRepository + .WithDetailsAsync(e => e.JobPosition) + .ContinueWith(t => t.Result.FirstOrDefault(e => e.Id == evt.OrganizerId)); + + if (employee != null) + { + var calendarEvent = new EventDto + { + Id = evt.Id.ToString(), + Title = evt.Name, + Description = evt.Description, + Type = evt.Type?.Name?.ToLowerInvariant() ?? "social", + Date = evt.CreationTime, + Location = evt.Place, + Organizer = new EventOrganizerDto + { + Id = employee.Id, + Name = employee.FullName, + Position = employee.JobPosition.Name, + Avatar = employee.Avatar + }, + Participants = evt.ParticipantsCount, + Photos = evt.Photos?.Select(p => p.Url).ToList() ?? new List(), + Comments = [], + Likes = evt.Likes, + IsPublished = evt.isPublished + }; + + // Comment'lerin author bilgilerini doldur + if (evt.Comments != null && evt.Comments.Any()) + { + foreach (var comment in evt.Comments) + { + var commentAuthor = await _employeeRepository + .WithDetailsAsync(e => e.JobPosition) + .ContinueWith(t => t.Result.FirstOrDefault(e => e.Id == comment.UserId)); + + if (commentAuthor != null) + { + calendarEvent.Comments.Add(new EventCommentDto + { + Id = comment.Id.ToString(), + Author = new EventOrganizerDto + { + Id = commentAuthor.Id, + Name = commentAuthor.FullName, + Position = commentAuthor.JobPosition.Name, + Avatar = commentAuthor.Avatar + }, + Content = comment.Comment, + CreationTime = comment.CreationTime, + Likes = comment.Likes + }); + } + } + } + + result.Add(calendarEvent); + } + } + + return result; + } +} diff --git a/api/src/Kurs.Platform.Application/Menu/MenuAppService.cs b/api/src/Kurs.Platform.Application/Menu/MenuAppService.cs index 182614cd..0d37213c 100644 --- a/api/src/Kurs.Platform.Application/Menu/MenuAppService.cs +++ b/api/src/Kurs.Platform.Application/Menu/MenuAppService.cs @@ -10,7 +10,6 @@ using Microsoft.Extensions.Logging; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; using Volo.Abp.Domain.Repositories; -using Volo.Abp.MultiTenancy; using Volo.Abp.PermissionManagement; using Volo.Abp.TenantManagement; using static Kurs.Platform.Data.Seeds.SeedConsts; diff --git a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs index 80cd4707..1ef400ec 100644 --- a/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs +++ b/api/src/Kurs.Platform.Domain.Shared/TableNameResolver.cs @@ -68,8 +68,6 @@ public static class TableNameResolver { nameof(TableNameEnum.Uom), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Behavior), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.EducationStatus), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.EventPhoto), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, - { nameof(TableNameEnum.EventComment), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Disease), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Psychologist), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, { nameof(TableNameEnum.Vaccine), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) }, @@ -141,6 +139,8 @@ public static class TableNameResolver { nameof(TableNameEnum.EventCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, { nameof(TableNameEnum.EventType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, { nameof(TableNameEnum.Event), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.EventPhoto), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, + { nameof(TableNameEnum.EventComment), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, { nameof(TableNameEnum.Training), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, { nameof(TableNameEnum.Certificate), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Intranet) }, { nameof(TableNameEnum.Meal), (PlatformConsts.TablePrefix.BranchByName, MenuPrefix.Intranet) }, diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028123320_Initial.Designer.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028175633_Initial.Designer.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028123320_Initial.Designer.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028175633_Initial.Designer.cs index 86bfa25d..1772e12d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028123320_Initial.Designer.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028175633_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace Kurs.Platform.Migrations { [DbContext(typeof(PlatformDbContext))] - [Migration("20251028123320_Initial")] + [Migration("20251028175633_Initial")] partial class Initial { /// @@ -3904,7 +3904,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Adm_EventComment", (string)null); + b.ToTable("T_Net_EventComment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b => @@ -3957,7 +3957,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Adm_EventPhoto", (string)null); + b.ToTable("T_Net_EventPhoto", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028123320_Initial.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028175633_Initial.cs similarity index 99% rename from api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028123320_Initial.cs rename to api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028175633_Initial.cs index ed443fc9..dead953f 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028123320_Initial.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/20251028175633_Initial.cs @@ -3807,7 +3807,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "T_Adm_EventComment", + name: "T_Net_EventComment", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3826,9 +3826,9 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Adm_EventComment", x => x.Id); + table.PrimaryKey("PK_T_Net_EventComment", x => x.Id); table.ForeignKey( - name: "FK_T_Adm_EventComment_T_Net_Event_EventId", + name: "FK_T_Net_EventComment_T_Net_Event_EventId", column: x => x.EventId, principalTable: "T_Net_Event", principalColumn: "Id", @@ -3836,7 +3836,7 @@ namespace Kurs.Platform.Migrations }); migrationBuilder.CreateTable( - name: "T_Adm_EventPhoto", + name: "T_Net_EventPhoto", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), @@ -3853,9 +3853,9 @@ namespace Kurs.Platform.Migrations }, constraints: table => { - table.PrimaryKey("PK_T_Adm_EventPhoto", x => x.Id); + table.PrimaryKey("PK_T_Net_EventPhoto", x => x.Id); table.ForeignKey( - name: "FK_T_Adm_EventPhoto_T_Net_Event_EventId", + name: "FK_T_Net_EventPhoto_T_Net_Event_EventId", column: x => x.EventId, principalTable: "T_Net_Event", principalColumn: "Id", @@ -5163,16 +5163,6 @@ namespace Kurs.Platform.Migrations table: "T_Adm_BlogPost", column: "Slug"); - migrationBuilder.CreateIndex( - name: "IX_T_Adm_EventComment_EventId", - table: "T_Adm_EventComment", - column: "EventId"); - - migrationBuilder.CreateIndex( - name: "IX_T_Adm_EventPhoto_EventId", - table: "T_Adm_EventPhoto", - column: "EventId"); - migrationBuilder.CreateIndex( name: "IX_T_Adm_OrderItem_OrderId", table: "T_Adm_OrderItem", @@ -5435,6 +5425,16 @@ namespace Kurs.Platform.Migrations table: "T_Net_Event", column: "TypeId"); + migrationBuilder.CreateIndex( + name: "IX_T_Net_EventComment_EventId", + table: "T_Net_EventComment", + column: "EventId"); + + migrationBuilder.CreateIndex( + name: "IX_T_Net_EventPhoto_EventId", + table: "T_Net_EventPhoto", + column: "EventId"); + migrationBuilder.CreateIndex( name: "IX_T_Net_Reservation_EmployeeId", table: "T_Net_Reservation", @@ -5743,12 +5743,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "T_Adm_EducationStatus"); - migrationBuilder.DropTable( - name: "T_Adm_EventComment"); - - migrationBuilder.DropTable( - name: "T_Adm_EventPhoto"); - migrationBuilder.DropTable( name: "T_Adm_InstallmentOption"); @@ -5836,6 +5830,12 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "T_Net_Certificate"); + migrationBuilder.DropTable( + name: "T_Net_EventComment"); + + migrationBuilder.DropTable( + name: "T_Net_EventPhoto"); + migrationBuilder.DropTable( name: "T_Net_Reservation"); @@ -5962,9 +5962,6 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "T_Adm_BlogCategory"); - migrationBuilder.DropTable( - name: "T_Net_Event"); - migrationBuilder.DropTable( name: "T_Adm_Order"); @@ -5995,6 +5992,9 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "T_Net_Training"); + migrationBuilder.DropTable( + name: "T_Net_Event"); + migrationBuilder.DropTable( name: "T_Net_SocialMedia"); @@ -6025,18 +6025,18 @@ namespace Kurs.Platform.Migrations migrationBuilder.DropTable( name: "P_Sas_ListForm"); - migrationBuilder.DropTable( - name: "T_Net_EventCategory"); - - migrationBuilder.DropTable( - name: "T_Net_EventType"); - migrationBuilder.DropTable( name: "T_Crd_QuestionPool"); migrationBuilder.DropTable( name: "T_Hr_Survey"); + migrationBuilder.DropTable( + name: "T_Net_EventCategory"); + + migrationBuilder.DropTable( + name: "T_Net_EventType"); + migrationBuilder.DropTable( name: "T_Net_SocialPost"); diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs index c990f1b9..cb6c435c 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Migrations/PlatformDbContextModelSnapshot.cs @@ -3901,7 +3901,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Adm_EventComment", (string)null); + b.ToTable("T_Net_EventComment", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b => @@ -3954,7 +3954,7 @@ namespace Kurs.Platform.Migrations b.HasIndex("EventId"); - b.ToTable("T_Adm_EventPhoto", (string)null); + b.ToTable("T_Net_EventPhoto", (string)null); }); modelBuilder.Entity("Kurs.Platform.Entities.EventType", b => diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json index e75abe57..ee7b058b 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/Seeds/TenantData.json @@ -1512,7 +1512,8 @@ "Description": "Tüm departmanların katılımıyla düzenlenen geleneksel yaz futbol turnuvası.", "Status": "Published", "ParticipantsCount": 64, - "OrganizerUserName": "system@sozsoft.com", + "OrganizerEmployeeCode": "EMP-001", + "IsPublished": true, "Likes": 120, "Photos": [], "Comments": [] @@ -1525,7 +1526,8 @@ "Description": "Çalışanlarımıza özel, rehber eşliğinde 2 günlük kültürel gezi.", "Status": "Published", "ParticipantsCount": 25, - "OrganizerUserName": "system@sozsoft.com", + "OrganizerEmployeeCode": "EMP-002", + "IsPublished": true, "Likes": 45, "Photos": [], "Comments": [] @@ -1538,12 +1540,94 @@ "Description": "Caz müziğinin en güzel örneklerinin canlı performanslarla sunulacağı özel akşam.", "Status": "Published", "ParticipantsCount": 40, - "OrganizerUserName": "system@sozsoft.com", + "OrganizerEmployeeCode": "EMP-003", + "IsPublished": true, "Likes": 85, "Photos": [], "Comments": [] } ], + "EventComments": [ + + ], + "EventPhotos": [ + { + "Name": "Yaz Futbol Turnuvası 2025", + "Url": "https://images.unsplash.com/photo-1530541930197-ff16ac917b0e?w=800" + }, + { + "Name": "Yaz Futbol Turnuvası 2025", + "Url": "https://images.unsplash.com/photo-1527529482837-4698179dc6ce?w=800" + }, + { + "Name": "Yaz Futbol Turnuvası 2025", + "Url": "https://images.unsplash.com/photo-1528605105345-5344ea20e269?w=800" + }, + { + "Name": "Yaz Futbol Turnuvası 2025", + "Url": "https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1531482615713-2afd69097998?w=800" + }, + { + "Name": "Müzik Dinletisi: Jazz Akşamı", + "Url": "hhttps://images.unsplash.com/photo-1579952363873-27f3bade9f55?w=800" + }, + { + "Name": "Müzik Dinletisi: Jazz Akşamı", + "Url": "https://images.unsplash.com/photo-1574629810360-7efbbe195018?w=800" + }, + { + "Name": "Müzik Dinletisi: Jazz Akşamı", + "Url": "https://images.unsplash.com/photo-1431324155629-1a6deb1dec8d?w=800" + }, + { + "Name": "Müzik Dinletisi: Jazz Akşamı", + "Url": "https://images.unsplash.com/photo-1553778263-73a83bab9b0c?w=800" + }, + { + "Name": "Müzik Dinletisi: Jazz Akşamı", + "Url": "https://images.unsplash.com/photo-1511795409834-ef04bbd61622?w=800" + }, + { + "Name": "Yaz Futbol Turnuvası 2025", + "Url": "https://images.unsplash.com/photo-1519167758481-83f29da8c2b9?w=800" + }, + { + "Name": "Yaz Futbol Turnuvası 2025", + "Url": "https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1478147427282-58a87a120781?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1492684223066-81342ee5ff30?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1460661419201-fd4cecdf8a8b?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1513364776144-60967b0f800f?w=800" + }, + { + "Name": "Kültür Gezisi: Kapadokya", + "Url": "https://images.unsplash.com/photo-1515405295579-ba7b45403062?w=800" + } + ], "MeetingMethods": [ { "Name": "Gelen Arama", @@ -2199,6 +2283,63 @@ "name": "Consultant" } ], + "Departments": [ + { + "code": "ÜRT", + "name": "Üretim", + "description": "Üretim departmanı", + "parentDepartmentCode": null, + "subDepartments": [], + "managerCode": "EMP-001", + "costCenterCode": "CC-ADM-001", + "budget": 8500000, + "isActive": true + }, + { + "code": "BAK", + "name": "Bakım", + "description": "Bakım departmanı", + "parentDepartmentCode": null, + "subDepartments": [], + "managerCode": "EMP-002", + "costCenterCode": "CC-HR-001", + "budget": 2200000, + "isActive": true + }, + { + "code": "KAL", + "name": "Kalite Kontrol", + "description": "Kalite kontrol departmanı", + "parentDepartmentCode": "ÜRT", + "subDepartments": [], + "managerCode": "EMP-003", + "costCenterCode": "CC-FIN-001", + "budget": 1200000, + "isActive": true + }, + { + "code": "DEP", + "name": "Depo", + "description": "Depo departmanı", + "parentDepartmentCode": "ÜRT", + "subDepartments": [], + "managerCode": "EMP-004", + "costCenterCode": "CC-FIN-001", + "budget": 2800000, + "isActive": true + }, + { + "code": "IDR", + "name": "İdari İşler", + "description": "İdari işler departmanı", + "parentDepartmentCode": null, + "subDepartments": [], + "managerCode": "EMP-005", + "costCenterCode": "CC-HR-001", + "budget": 2500000, + "isActive": true + } + ], "JobPositions": [ { "code": "DEV-001", @@ -2478,63 +2619,6 @@ "isActive": true } ], - "Departments": [ - { - "code": "ÜRT", - "name": "Üretim", - "description": "Üretim departmanı", - "parentDepartmentCode": null, - "subDepartments": [], - "managerCode": "1", - "costCenterCode": "cc-005", - "budget": 8500000, - "isActive": true - }, - { - "code": "BAK", - "name": "Bakım", - "description": "Bakım departmanı", - "parentDepartmentCode": null, - "subDepartments": [], - "managerCode": "7", - "costCenterCode": "cc-011", - "budget": 2200000, - "isActive": true - }, - { - "code": "KAL", - "name": "Kalite Kontrol", - "description": "Kalite kontrol departmanı", - "parentDepartmentCode": "ÜRT", - "subDepartments": [], - "managerCode": "5", - "costCenterCode": "cc-007", - "budget": 1200000, - "isActive": true - }, - { - "code": "DEP", - "name": "Depo", - "description": "Depo departmanı", - "parentDepartmentCode": "ÜRT", - "subDepartments": [], - "managerCode": "3", - "costCenterCode": "cc-008", - "budget": 2800000, - "isActive": true - }, - { - "code": "IDR", - "name": "İdari İşler", - "description": "İdari işler departmanı", - "parentDepartmentCode": null, - "subDepartments": [], - "managerCode": "2", - "costCenterCode": "cc-001", - "budget": 2500000, - "isActive": true - } - ], "CostCenters": [ { "code": "CC-ADM-001", @@ -2728,13 +2812,13 @@ "emergencyContactrelationship": "Eşi", "emergencyContactphone": "5325550100", "hireDate": "09-01-2020", - "terminationDate": "09-01-2020", - "employmentTypeName": "FullTime", - "jobPositionCode": "1", - "departmentCode": "1", + "terminationDate": null, + "employmentTypeName": "Full Time", + "jobPositionCode": "MGR-001", + "departmentCode": "BAK", "workLocation": "Ankara Merkez", "baseSalary": 65000, - "managerCode": "1", + "managerCode": null, "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "1", @@ -2769,12 +2853,12 @@ "emergencyContactphone": "5325550104", "hireDate": "01-06-2021", "terminationDate": null, - "employmentTypeName": "FullTime", - "jobPositionCode": "2", - "departmentCode": "1", + "employmentTypeName": "Full Time", + "jobPositionCode": "HR-001", + "departmentCode": "IDR", "workLocation": "Ankara Şube", "baseSalary": 72000, - "managerCode": "1", + "managerCode": "EMP-001", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "2", @@ -2809,12 +2893,12 @@ "emergencyContactphone": "5325550107", "hireDate": "10-02-2020", "terminationDate": null, - "employmentTypeName": "FullTime", - "jobPositionCode": "3", - "departmentCode": "1", + "employmentTypeName": "Full Time", + "jobPositionCode": "DEV-001", + "departmentCode": "ÜRT", "workLocation": "İstanbul HQ", "baseSalary": 85000, - "managerCode": "1", + "managerCode": "EMP-001", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "2", @@ -2849,12 +2933,12 @@ "emergencyContactphone": "5325550110", "hireDate": "10-01-2022", "terminationDate": null, - "employmentTypeName": "PartTime", - "jobPositionCode": "4", - "departmentCode": "1", + "employmentTypeName": "Part Time", + "jobPositionCode": "UX-001", + "departmentCode": "DEP", "workLocation": "Ankara Şube", "baseSalary": 60000, - "managerCode": "1", + "managerCode": "EMP-003", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "3", @@ -2889,12 +2973,12 @@ "emergencyContactphone": "5325550113", "hireDate": "01-04-2019", "terminationDate": null, - "employmentTypeName": "FullTime", - "jobPositionCode": "5", - "departmentCode": "1", + "employmentTypeName": "Full Time", + "jobPositionCode": "DA-001", + "departmentCode": "IDR", "workLocation": "İstanbul HQ", "baseSalary": 95000, - "managerCode": "1", + "managerCode": "EMP-001", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "4", @@ -2930,11 +3014,11 @@ "hireDate": "02-03-2023", "terminationDate": null, "employmentTypeName": "Intern", - "jobPositionCode": "6", - "departmentCode": "1", + "jobPositionCode": "CS-001", + "departmentCode": "ÜRT", "workLocation": "İzmir Ofis", "baseSalary": 15000, - "managerCode": "1", + "managerCode": "EMP-003", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "1", @@ -2969,12 +3053,12 @@ "emergencyContactphone": "5325550119", "hireDate": "09-07-2021", "terminationDate": null, - "employmentTypeName": "FullTime", - "jobPositionCode": "7", - "departmentCode": "2", + "employmentTypeName": "Full Time", + "jobPositionCode": "IT-001", + "departmentCode": "BAK", "workLocation": "Bursa Depo", "baseSalary": 75000, - "managerCode": "1", + "managerCode": "EMP-001", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "3", @@ -3009,12 +3093,12 @@ "emergencyContactphone": "5325550122", "hireDate": "01-09-2018", "terminationDate": null, - "employmentTypeName": "FullTime", - "jobPositionCode": "8", - "departmentCode": "2", + "employmentTypeName": "Full Time", + "jobPositionCode": "SA-001", + "departmentCode": "BAK", "workLocation": "İzmir Bölge Ofisi", "baseSalary": 130000, - "managerCode": "1", + "managerCode": "EMP-001", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "2", @@ -3049,12 +3133,12 @@ "emergencyContactphone": "5325550125", "hireDate": "02-06-2020", "terminationDate": null, - "employmentTypeName": "FullTime", - "jobPositionCode": "9", - "departmentCode": "1", + "employmentTypeName": "Full Time", + "jobPositionCode": "CS-001", + "departmentCode": "ÜRT", "workLocation": "Ankara Çağrı Merkezi", "baseSalary": 50000, - "managerCode": "1", + "managerCode": "EMP-003", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "1", @@ -3089,12 +3173,12 @@ "emergencyContactphone": "5325550128", "hireDate": "06-05-2017", "terminationDate": null, - "employmentTypeName": "FullTime", - "jobPositionCode": "10", - "departmentCode": "1", + "employmentTypeName": "Full Time", + "jobPositionCode": "ACC-001", + "departmentCode": "ÜRT", "workLocation": "İstanbul Genel Merkez", "baseSalary": 250000, - "managerCode": "1", + "managerCode": "EMP-001", "currencyCode": "TRY", "payrollGroup": "Monthly", "bankAccountNumber": "4", diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs index 5fa06216..c3032158 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantDataSeeder.cs @@ -44,6 +44,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _eventTypeRepository; private readonly IRepository _eventCategoryRepository; private readonly IRepository _eventRepository; + private readonly IRepository _eventCommentRepository; + private readonly IRepository _eventPhotoRepository; private readonly IRepository _meetingMethodRepository; private readonly IRepository _meetingResultRepository; private readonly IRepository _programRepository; @@ -124,6 +126,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency IRepository eventTypeRepository, IRepository eventCategoryRepository, IRepository eventRepository, + IRepository eventPhotoRepository, + IRepository eventCommentRepository, IRepository sourceRepository, IRepository interestingRepository, IRepository programRepository, @@ -196,6 +200,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency _eventTypeRepository = eventTypeRepository; _eventCategoryRepository = eventCategoryRepository; _eventRepository = eventRepository; + _eventCommentRepository = eventCommentRepository; + _eventPhotoRepository = eventPhotoRepository; _sourceRepository = sourceRepository; _interestingRepository = interestingRepository; _programRepository = programRepository; @@ -766,54 +772,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency } } - foreach (var item in items.EventTypes) - { - var exists = await _eventTypeRepository.AnyAsync(x => x.Name == item.Name); - - if (!exists) - { - await _eventTypeRepository.InsertAsync(new EventType { Name = item.Name }, autoSave: true); - } - } - - foreach (var item in items.EventCategories) - { - var exists = await _eventCategoryRepository.AnyAsync(x => x.Name == item.Name); - - if (!exists) - { - await _eventCategoryRepository.InsertAsync(new EventCategory { Name = item.Name }, autoSave: true); - } - } - - foreach (var item in items.Events) - { - var exists = await _eventRepository.AnyAsync(x => x.Name == item.Name); - - if (!exists) - { - var category = await _eventCategoryRepository.FirstOrDefaultAsync(x => x.Name == item.CategoryName); - var type = await _eventTypeRepository.FirstOrDefaultAsync(x => x.Name == item.TypeName); - var user = await _repositoryUser.FirstOrDefaultAsync(x => x.UserName == item.OrganizerUserName); - - if (category != null && type != null) - { - await _eventRepository.InsertAsync(new Event - { - CategoryId = category.Id, - TypeId = type.Id, - Name = item.Name, - Place = item.Place, - Description = item.Description, - OrganizerId = user.Id, - Status = item.Status, - ParticipantsCount = item.ParticipantsCount, - Likes = item.Likes - }); - } - } - } - foreach (var item in items.Sources) { var exists = await _sourceRepository.AnyAsync(x => x.Name == item.Name); @@ -1537,5 +1495,70 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency EmployeeId = employee != null ? employee.Id : null }, autoSave: true); } + + //Events + foreach (var item in items.EventTypes) + { + var exists = await _eventTypeRepository.AnyAsync(x => x.Name == item.Name); + + if (!exists) + { + await _eventTypeRepository.InsertAsync(new EventType { Name = item.Name }, autoSave: true); + } + } + + foreach (var item in items.EventCategories) + { + var exists = await _eventCategoryRepository.AnyAsync(x => x.Name == item.Name); + + if (!exists) + { + await _eventCategoryRepository.InsertAsync(new EventCategory { Name = item.Name }, autoSave: true); + } + } + + foreach (var item in items.Events) + { + var exists = await _eventRepository.AnyAsync(x => x.Name == item.Name); + + if (!exists) + { + var category = await _eventCategoryRepository.FirstOrDefaultAsync(x => x.Name == item.CategoryName); + var type = await _eventTypeRepository.FirstOrDefaultAsync(x => x.Name == item.TypeName); + var employee = await _employeeRepository.FirstOrDefaultAsync(x => x.Code == item.OrganizerEmployeeCode); + + if (category != null && type != null) + { + await _eventRepository.InsertAsync(new Event + { + CategoryId = category.Id, + TypeId = type.Id, + Name = item.Name, + Place = item.Place, + Description = item.Description, + OrganizerId = employee.Id, + Status = item.Status, + ParticipantsCount = item.ParticipantsCount, + Likes = item.Likes, + isPublished = item.IsPublished, + }); + } + } + } + + foreach (var item in items.EventPhotos) + { + var exists = await _eventPhotoRepository.AnyAsync(x => x.Url == item.Url); + if (!exists) + { + var eventEntity = await _eventRepository.FirstOrDefaultAsync(x => x.Name == item.Name); + + await _eventPhotoRepository.InsertAsync(new EventPhoto + { + EventId = eventEntity.Id, + Url = item.Url + }, autoSave: true); + } + } } } diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs index d7b93eaf..c86ec22d 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/Tenants/TenantSeederDto.cs @@ -46,6 +46,7 @@ public class TenantSeederDto public List EventTypes { get; set; } public List EventCategories { get; set; } public List Events { get; set; } + public List EventPhotos { get; set; } public List Sources { get; set; } public List Interesting { get; set; } public List Programs { get; set; } @@ -79,6 +80,12 @@ public class TenantSeederDto public List SocialLikes { get; set; } } +public class EventPhotoSeedDto +{ + public string Name { get; set; } + public string Url { get; set; } +} + public class SocialPostSeedDto { public string Content { get; set; } @@ -687,9 +694,10 @@ public class EventSeedDto public string Place { get; set; } public string Description { get; set; } public string Status { get; set; } - public string OrganizerUserName { get; set; } + public string OrganizerEmployeeCode { get; set; } public int ParticipantsCount { get; set; } public int Likes { get; set; } + public bool IsPublished { get; set; } } public class SourceSeedDto diff --git a/ui/src/mocks/mockIntranet.ts b/ui/src/mocks/mockIntranet.ts index a00f1366..f4c112a7 100644 --- a/ui/src/mocks/mockIntranet.ts +++ b/ui/src/mocks/mockIntranet.ts @@ -334,172 +334,6 @@ export const mockAnnouncements: Announcement[] = [ }, ] -export const mockEvents: CalendarEvent[] = [ - { - id: 'evt1', - title: 'Yaz Pikniği 2025', - description: - 'Şirket çalışanları olarak doğayla iç içe harika bir gün geçirdik. Takım oyunları, barbekü ve çok eğlence!', - type: 'social', - date: new Date('2025-10-20'), - location: 'Polonezköy Piknik Alanı', - organizer: mockEmployees[4], - participants: 45, - photos: [ - 'https://images.unsplash.com/photo-1530541930197-ff16ac917b0e?w=800', - 'https://images.unsplash.com/photo-1527529482837-4698179dc6ce?w=800', - 'https://images.unsplash.com/photo-1528605105345-5344ea20e269?w=800', - 'https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=800', - ], - comments: [ - { - id: 'c1', - author: mockEmployees[0], - content: 'Muhteşem bir gündü! Yılın en güzel etkinliği 🎉', - creationTime: new Date('2025-07-16T10:30:00'), - likes: 12, - }, - { - id: 'c2', - author: mockEmployees[2], - content: 'Voleybol turnuvası harikaydı, gelecek yıl yine yapalım!', - creationTime: new Date('2025-07-16T14:20:00'), - likes: 8, - }, - ], - likes: 34, - isPublished: true, - }, - { - id: 'evt2', - title: 'Hackathon 2025', - description: '24 saatlik yazılım geliştirme maratonu. İnovasyon, teknoloji ve takım çalışması!', - type: 'training', - date: new Date('2025-20-22'), - location: 'Ofis - Ana Salon', - organizer: mockEmployees[0], - participants: 28, - photos: [ - 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=800', - 'https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800', - 'https://images.unsplash.com/photo-1531482615713-2afd69097998?w=800', - ], - comments: [ - { - id: 'c3', - author: mockEmployees[1], - content: 'Ekibimiz 2. oldu! Çok gurur duydum herkesle 💪', - creationTime: new Date('2025-09-11T09:00:00'), - likes: 15, - }, - { - id: 'c4', - author: mockEmployees[3], - content: 'Gece boyunca kod yazmak ve pizza yemek priceless! 🍕', - creationTime: new Date('2025-09-11T11:45:00'), - likes: 10, - }, - ], - likes: 42, - isPublished: true, - }, - { - id: 'evt3', - title: 'Kurumsal Futbol Turnuvası', - description: 'Departmanlar arası futbol turnuvasında ter döktük, gol attık ve kazandık! 🏆', - type: 'sport', - date: new Date('2025-10-25'), - location: 'Spor Kompleksi Halı Saha', - organizer: mockEmployees[2], - participants: 32, - photos: [ - 'https://images.unsplash.com/photo-1579952363873-27f3bade9f55?w=800', - 'https://images.unsplash.com/photo-1574629810360-7efbbe195018?w=800', - 'https://images.unsplash.com/photo-1431324155629-1a6deb1dec8d?w=800', - 'https://images.unsplash.com/photo-1553778263-73a83bab9b0c?w=800', - ], - comments: [ - { - id: 'c5', - author: mockEmployees[4], - content: 'İT departmanı şampiyon oldu! Gelecek sene kupayı koruyacağız 🏆', - creationTime: new Date('2025-06-21T08:30:00'), - likes: 18, - }, - ], - likes: 28, - isPublished: true, - }, - { - id: 'evt4', - title: 'Yılbaşı Gala Gecesi 2024', - description: 'Harika bir yıla muhteşem bir gala ile veda ettik. Müzik, dans ve sürprizler!', - type: 'company', - date: new Date('2024-12-28'), - location: 'Grand Hotel - Balo Salonu', - organizer: mockEmployees[3], - participants: 68, - photos: [ - 'https://images.unsplash.com/photo-1511795409834-ef04bbd61622?w=800', - 'https://images.unsplash.com/photo-1519167758481-83f29da8c2b9?w=800', - 'https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?w=800', - 'https://images.unsplash.com/photo-1478147427282-58a87a120781?w=800', - 'https://images.unsplash.com/photo-1492684223066-81342ee5ff30?w=800', - ], - comments: [ - { - id: 'c6', - author: mockEmployees[0], - content: 'Yılın en şık gecesi! Organizasyon mükemmeldi 👏', - creationTime: new Date('2024-12-29T10:00:00'), - likes: 25, - }, - { - id: 'c7', - author: mockEmployees[1], - content: 'Tombala hediyelerim harika, çok teşekkürler! 🎁', - creationTime: new Date('2024-12-29T12:30:00'), - likes: 14, - }, - { - id: 'c8', - author: mockEmployees[2], - content: 'Müzik grubunuz süperdi, dans pistinden ayrılamadık! 🎵', - creationTime: new Date('2024-12-29T15:20:00'), - likes: 19, - }, - ], - likes: 51, - isPublished: true, - }, - { - id: 'evt5', - title: 'Sanat Atölyesi - Ebru Workshop', - description: 'Geleneksel Türk sanatı ebru yapımı atölyesinde harika eserler ortaya çıktı!', - type: 'culture', - date: new Date('2025-05-12'), - location: 'Ofis - Yaratıcı Alan', - organizer: mockEmployees[1], - participants: 18, - photos: [ - 'https://images.unsplash.com/photo-1460661419201-fd4cecdf8a8b?w=800', - 'https://images.unsplash.com/photo-1513364776144-60967b0f800f?w=800', - 'https://images.unsplash.com/photo-1515405295579-ba7b45403062?w=800', - ], - comments: [ - { - id: 'c9', - author: mockEmployees[3], - content: 'İlk defa ebru yaptım, çok huzurlu bir deneyimdi 🎨', - creationTime: new Date('2025-05-13T09:15:00'), - likes: 11, - }, - ], - likes: 22, - isPublished: true, - }, -] - export const mockVisitors: Visitor[] = [ { id: 'vis1', @@ -812,8 +646,7 @@ export const mockSurveys: Survey[] = [ }, ] -// Mevcut çalışanları kullan - "Siz" kullanıcısı mockEmployees[0] (Ali Öztürk) olacak -const currentUser = { ...mockEmployees[0], fullName: 'Siz' } // Ali Öztürk'ü "Siz" olarak kullan +const currentUser = { ...mockEmployees[0], fullName: 'Siz' } export const mockSocialPosts: SocialPost[] = [ { @@ -985,4 +818,172 @@ export const mockSocialPosts: SocialPost[] = [ comments: [], isOwnPost: false, }, -] \ No newline at end of file +] + +///////////////////////////////////////////////////////////////////////////////////// +///////APP SERVİS YAPILANLAR////////// +export const mockEvents: CalendarEvent[] = [ + { + id: 'evt1', + title: 'Yaz Pikniği 2025', + description: + 'Şirket çalışanları olarak doğayla iç içe harika bir gün geçirdik. Takım oyunları, barbekü ve çok eğlence!', + type: 'social', + date: new Date('2025-10-20'), + location: 'Polonezköy Piknik Alanı', + organizer: mockEmployees[4], + participants: 45, + photos: [ + 'https://images.unsplash.com/photo-1530541930197-ff16ac917b0e?w=800', + 'https://images.unsplash.com/photo-1527529482837-4698179dc6ce?w=800', + 'https://images.unsplash.com/photo-1528605105345-5344ea20e269?w=800', + 'https://images.unsplash.com/photo-1504196606672-aef5c9cefc92?w=800', + ], + comments: [ + { + id: 'c1', + author: mockEmployees[0], + content: 'Muhteşem bir gündü! Yılın en güzel etkinliği 🎉', + creationTime: new Date('2025-07-16T10:30:00'), + likes: 12, + }, + { + id: 'c2', + author: mockEmployees[2], + content: 'Voleybol turnuvası harikaydı, gelecek yıl yine yapalım!', + creationTime: new Date('2025-07-16T14:20:00'), + likes: 8, + }, + ], + likes: 34, + isPublished: true, + }, + { + id: 'evt2', + title: 'Hackathon 2025', + description: '24 saatlik yazılım geliştirme maratonu. İnovasyon, teknoloji ve takım çalışması!', + type: 'training', + date: new Date('2025-20-22'), + location: 'Ofis - Ana Salon', + organizer: mockEmployees[0], + participants: 28, + photos: [ + 'https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=800', + 'https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800', + 'https://images.unsplash.com/photo-1531482615713-2afd69097998?w=800', + ], + comments: [ + { + id: 'c3', + author: mockEmployees[1], + content: 'Ekibimiz 2. oldu! Çok gurur duydum herkesle 💪', + creationTime: new Date('2025-09-11T09:00:00'), + likes: 15, + }, + { + id: 'c4', + author: mockEmployees[3], + content: 'Gece boyunca kod yazmak ve pizza yemek priceless! 🍕', + creationTime: new Date('2025-09-11T11:45:00'), + likes: 10, + }, + ], + likes: 42, + isPublished: true, + }, + { + id: 'evt3', + title: 'Kurumsal Futbol Turnuvası', + description: 'Departmanlar arası futbol turnuvasında ter döktük, gol attık ve kazandık! 🏆', + type: 'sport', + date: new Date('2025-10-25'), + location: 'Spor Kompleksi Halı Saha', + organizer: mockEmployees[2], + participants: 32, + photos: [ + 'https://images.unsplash.com/photo-1579952363873-27f3bade9f55?w=800', + 'https://images.unsplash.com/photo-1574629810360-7efbbe195018?w=800', + 'https://images.unsplash.com/photo-1431324155629-1a6deb1dec8d?w=800', + 'https://images.unsplash.com/photo-1553778263-73a83bab9b0c?w=800', + ], + comments: [ + { + id: 'c5', + author: mockEmployees[4], + content: 'İT departmanı şampiyon oldu! Gelecek sene kupayı koruyacağız 🏆', + creationTime: new Date('2025-06-21T08:30:00'), + likes: 18, + }, + ], + likes: 28, + isPublished: true, + }, + { + id: 'evt4', + title: 'Yılbaşı Gala Gecesi 2024', + description: 'Harika bir yıla muhteşem bir gala ile veda ettik. Müzik, dans ve sürprizler!', + type: 'company', + date: new Date('2024-12-28'), + location: 'Grand Hotel - Balo Salonu', + organizer: mockEmployees[3], + participants: 68, + photos: [ + 'https://images.unsplash.com/photo-1511795409834-ef04bbd61622?w=800', + 'https://images.unsplash.com/photo-1519167758481-83f29da8c2b9?w=800', + 'https://images.unsplash.com/photo-1464366400600-7168b8af9bc3?w=800', + 'https://images.unsplash.com/photo-1478147427282-58a87a120781?w=800', + 'https://images.unsplash.com/photo-1492684223066-81342ee5ff30?w=800', + ], + comments: [ + { + id: 'c6', + author: mockEmployees[0], + content: 'Yılın en şık gecesi! Organizasyon mükemmeldi 👏', + creationTime: new Date('2024-12-29T10:00:00'), + likes: 25, + }, + { + id: 'c7', + author: mockEmployees[1], + content: 'Tombala hediyelerim harika, çok teşekkürler! 🎁', + creationTime: new Date('2024-12-29T12:30:00'), + likes: 14, + }, + { + id: 'c8', + author: mockEmployees[2], + content: 'Müzik grubunuz süperdi, dans pistinden ayrılamadık! 🎵', + creationTime: new Date('2024-12-29T15:20:00'), + likes: 19, + }, + ], + likes: 51, + isPublished: true, + }, + { + id: 'evt5', + title: 'Sanat Atölyesi - Ebru Workshop', + description: 'Geleneksel Türk sanatı ebru yapımı atölyesinde harika eserler ortaya çıktı!', + type: 'culture', + date: new Date('2025-05-12'), + location: 'Ofis - Yaratıcı Alan', + organizer: mockEmployees[1], + participants: 18, + photos: [ + 'https://images.unsplash.com/photo-1460661419201-fd4cecdf8a8b?w=800', + 'https://images.unsplash.com/photo-1513364776144-60967b0f800f?w=800', + 'https://images.unsplash.com/photo-1515405295579-ba7b45403062?w=800', + ], + comments: [ + { + id: 'c9', + author: mockEmployees[3], + content: 'İlk defa ebru yaptım, çok huzurlu bir deneyimdi 🎨', + creationTime: new Date('2025-05-13T09:15:00'), + likes: 11, + }, + ], + likes: 22, + isPublished: true, + }, +]