mockIntranet düzenlemeleri
This commit is contained in:
parent
ea5685439c
commit
3e7468fdf2
20 changed files with 145 additions and 148 deletions
|
|
@ -1,109 +1,105 @@
|
|||
import { HrDepartment } from "../types/hr";
|
||||
import { HrDepartment } from '../types/hr'
|
||||
|
||||
export const mockDepartments: HrDepartment[] = [
|
||||
{
|
||||
id: "1",
|
||||
code: "ÜRT",
|
||||
name: "Üretim",
|
||||
description: "Üretim departmanı",
|
||||
id: '1',
|
||||
code: 'ÜRT',
|
||||
name: 'Üretim',
|
||||
description: 'Üretim departmanı',
|
||||
parentDepartmentId: undefined,
|
||||
parentDepartment: undefined,
|
||||
subDepartments: [],
|
||||
managerId: "1",
|
||||
managerId: '1',
|
||||
manager: undefined,
|
||||
costCenterId: "cc-005",
|
||||
costCenterId: 'cc-005',
|
||||
costCenter: undefined,
|
||||
budget: 8500000,
|
||||
isActive: true,
|
||||
creationTime: new Date("2022-03-15"),
|
||||
lastModificationTime: new Date("2024-01-15"),
|
||||
creationTime: new Date('2022-03-15'),
|
||||
lastModificationTime: new Date('2024-01-15'),
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
code: "BAK",
|
||||
name: "Bakım",
|
||||
description: "Bakım departmanı",
|
||||
id: '2',
|
||||
code: 'BAK',
|
||||
name: 'Bakım',
|
||||
description: 'Bakım departmanı',
|
||||
parentDepartmentId: undefined,
|
||||
parentDepartment: undefined,
|
||||
subDepartments: [],
|
||||
managerId: "7",
|
||||
managerId: '7',
|
||||
manager: undefined,
|
||||
costCenterId: "cc-011",
|
||||
costCenterId: 'cc-011',
|
||||
costCenter: undefined,
|
||||
budget: 2200000,
|
||||
isActive: true,
|
||||
creationTime: new Date("2022-03-15"),
|
||||
lastModificationTime: new Date("2024-01-15"),
|
||||
creationTime: new Date('2022-03-15'),
|
||||
lastModificationTime: new Date('2024-01-15'),
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
code: "KAL",
|
||||
name: "Kalite Kontrol",
|
||||
description: "Kalite kontrol departmanı",
|
||||
parentDepartmentId: "1",
|
||||
id: '3',
|
||||
code: 'KAL',
|
||||
name: 'Kalite Kontrol',
|
||||
description: 'Kalite kontrol departmanı',
|
||||
parentDepartmentId: '1',
|
||||
parentDepartment: undefined,
|
||||
subDepartments: [],
|
||||
managerId: "5",
|
||||
managerId: '5',
|
||||
manager: undefined,
|
||||
costCenterId: "cc-007",
|
||||
costCenterId: 'cc-007',
|
||||
costCenter: undefined,
|
||||
budget: 1200000,
|
||||
isActive: true,
|
||||
creationTime: new Date("2022-03-15"),
|
||||
lastModificationTime: new Date("2024-01-15"),
|
||||
creationTime: new Date('2022-03-15'),
|
||||
lastModificationTime: new Date('2024-01-15'),
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
code: "DEP",
|
||||
name: "Depo",
|
||||
description: "Depo departmanı",
|
||||
parentDepartmentId: "1",
|
||||
id: '4',
|
||||
code: 'DEP',
|
||||
name: 'Depo',
|
||||
description: 'Depo departmanı',
|
||||
parentDepartmentId: '1',
|
||||
parentDepartment: undefined,
|
||||
subDepartments: [],
|
||||
managerId: "3",
|
||||
managerId: '3',
|
||||
manager: undefined,
|
||||
costCenterId: "cc-008",
|
||||
costCenterId: 'cc-008',
|
||||
costCenter: undefined,
|
||||
budget: 2800000,
|
||||
isActive: true,
|
||||
creationTime: new Date("2022-03-15"),
|
||||
lastModificationTime: new Date("2024-01-15"),
|
||||
creationTime: new Date('2022-03-15'),
|
||||
lastModificationTime: new Date('2024-01-15'),
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
code: "IDR",
|
||||
name: "İdari İşler",
|
||||
description: "İdari işler departmanı",
|
||||
id: '5',
|
||||
code: 'IDR',
|
||||
name: 'İdari İşler',
|
||||
description: 'İdari işler departmanı',
|
||||
parentDepartmentId: undefined,
|
||||
parentDepartment: undefined,
|
||||
subDepartments: [],
|
||||
managerId: "2",
|
||||
managerId: '2',
|
||||
manager: undefined,
|
||||
costCenterId: "cc-001",
|
||||
costCenterId: 'cc-001',
|
||||
costCenter: undefined,
|
||||
budget: 2500000,
|
||||
isActive: true,
|
||||
creationTime: new Date("2022-03-15"),
|
||||
lastModificationTime: new Date("2024-01-15"),
|
||||
creationTime: new Date('2022-03-15'),
|
||||
lastModificationTime: new Date('2024-01-15'),
|
||||
},
|
||||
];
|
||||
]
|
||||
|
||||
mockDepartments.forEach((dept) => {
|
||||
if (dept.parentDepartmentId) {
|
||||
dept.parentDepartment = mockDepartments.find(
|
||||
(d) => d.id === dept.parentDepartmentId
|
||||
);
|
||||
dept.parentDepartment = mockDepartments.find((d) => d.id === dept.parentDepartmentId)
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
mockDepartments.forEach((dept) => {
|
||||
if (dept.parentDepartmentId) {
|
||||
const parent = mockDepartments.find(
|
||||
(d) => d.id === dept.parentDepartmentId
|
||||
);
|
||||
const parent = mockDepartments.find((d) => d.id === dept.parentDepartmentId)
|
||||
if (parent) {
|
||||
dept.parentDepartment = parent;
|
||||
parent.subDepartments.push(dept); // subDepartments bağlantısı
|
||||
dept.parentDepartment = parent
|
||||
parent.subDepartments.push(dept) // subDepartments bağlantısı
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,10 +1,23 @@
|
|||
import { mockEmployees } from './mockEmployees'
|
||||
import { mockEmployeeLeaves } from './mockEmployeeLeaves'
|
||||
import { mockOvertimes } from './mockOvertimes'
|
||||
import { Announcement, CalendarEvent, Visitor, Document, Certificate, ExpenseRequest, Task, Birthday, WorkAnniversary, QuickLink, Training, Reservation, MealMenu, ShuttleRoute, Survey, SocialPost } from '@/types/intranet'
|
||||
import {
|
||||
Announcement,
|
||||
CalendarEvent,
|
||||
Visitor,
|
||||
Document,
|
||||
Certificate,
|
||||
ExpenseRequest,
|
||||
Task,
|
||||
Birthday,
|
||||
WorkAnniversary,
|
||||
QuickLink,
|
||||
Training,
|
||||
Reservation,
|
||||
MealMenu,
|
||||
ShuttleRoute,
|
||||
Survey,
|
||||
SocialPost,
|
||||
} from '@/types/intranet'
|
||||
|
||||
|
||||
// ============== SAMPLE DATA ==============
|
||||
export const mockAnnouncements: Announcement[] = [
|
||||
{
|
||||
id: 'ann1',
|
||||
|
|
@ -80,7 +93,7 @@ export const mockEvents: CalendarEvent[] = [
|
|||
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-07-15'),
|
||||
date: new Date('2025-10-20'),
|
||||
location: 'Polonezköy Piknik Alanı',
|
||||
organizer: mockEmployees[4],
|
||||
participants: 45,
|
||||
|
|
@ -239,12 +252,6 @@ export const mockEvents: CalendarEvent[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// İzin talepleri - HR'dan import et
|
||||
export const mockLeaveRequests = mockEmployeeLeaves
|
||||
|
||||
// Mesai talepleri - HR'dan import et
|
||||
export const mockOvertimeRequests = mockOvertimes
|
||||
|
||||
export const mockExpenseRequests: ExpenseRequest[] = [
|
||||
{
|
||||
id: 'exp1',
|
||||
|
|
@ -481,7 +488,6 @@ export const mockQuickLinks: QuickLink[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// Eğitimler
|
||||
export const mockTrainings: Training[] = [
|
||||
{
|
||||
id: 'tr1',
|
||||
|
|
@ -549,7 +555,6 @@ export const mockTrainings: Training[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// Sertifikalar
|
||||
export const mockCertificates: Certificate[] = [
|
||||
{
|
||||
id: 'cert1',
|
||||
|
|
@ -579,7 +584,6 @@ export const mockCertificates: Certificate[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// Rezervasyonlar
|
||||
export const mockReservations: Reservation[] = [
|
||||
{
|
||||
id: 'res1',
|
||||
|
|
@ -628,7 +632,6 @@ export const mockReservations: Reservation[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// Yemek Menüsü
|
||||
export const mockMealMenus: MealMenu[] = [
|
||||
{
|
||||
id: 'menu1',
|
||||
|
|
@ -692,7 +695,6 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// Servis Güzergahları
|
||||
export const mockShuttleRoutes: ShuttleRoute[] = [
|
||||
{
|
||||
id: 'shuttle1',
|
||||
|
|
@ -736,7 +738,6 @@ export const mockShuttleRoutes: ShuttleRoute[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// Anketler
|
||||
export const mockSurveys: Survey[] = [
|
||||
{
|
||||
id: 'survey1',
|
||||
|
|
@ -779,7 +780,6 @@ export const mockSurveys: Survey[] = [
|
|||
},
|
||||
]
|
||||
|
||||
// Ziyaretçiler
|
||||
export const mockVisitors: Visitor[] = [
|
||||
{
|
||||
id: 'vis1',
|
||||
|
|
@ -835,7 +835,7 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
email: 'ahmet.yilmaz@sozsoft.com',
|
||||
phone: '+90 532 123 45 67',
|
||||
department: 'Yazılım Geliştirme',
|
||||
location: 'İstanbul, Türkiye'
|
||||
location: 'İstanbul, Türkiye',
|
||||
},
|
||||
content:
|
||||
'Yeni proje üzerinde çalışıyoruz! React ve TypeScript ile harika bir deneyim oluşturuyoruz. Ekip çalışması harika gidiyor! 🚀',
|
||||
|
|
@ -845,20 +845,20 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
name: 'Taksim Meydanı',
|
||||
address: 'Taksim, Gümüşsuyu Mahallesi, 34437 Beyoğlu/İstanbul',
|
||||
lat: 41.0369,
|
||||
lng: 28.9850,
|
||||
placeId: 'ChIJBQRGmL25yhQRXwqRTHAwAAQ'
|
||||
lng: 28.985,
|
||||
placeId: 'ChIJBQRGmL25yhQRXwqRTHAwAAQ',
|
||||
},
|
||||
media: {
|
||||
type: 'image',
|
||||
url: 'https://images.unsplash.com/photo-1633356122544-f134324a6cee?w=800&q=80'
|
||||
url: 'https://images.unsplash.com/photo-1633356122544-f134324a6cee?w=800&q=80',
|
||||
},
|
||||
likes: {
|
||||
count: 24,
|
||||
isLiked: true,
|
||||
users: [
|
||||
{ id: 'user2', name: 'Ayşe Demir', avatar: 'https://i.pravatar.cc/150?img=5' },
|
||||
{ id: 'user3', name: 'Mehmet Kaya', avatar: 'https://i.pravatar.cc/150?img=8' }
|
||||
]
|
||||
{ id: 'user3', name: 'Mehmet Kaya', avatar: 'https://i.pravatar.cc/150?img=8' },
|
||||
],
|
||||
},
|
||||
comments: [
|
||||
{
|
||||
|
|
@ -866,23 +866,23 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
author: {
|
||||
id: 'user2',
|
||||
name: 'Ayşe Demir',
|
||||
avatar: 'https://i.pravatar.cc/150?img=5'
|
||||
avatar: 'https://i.pravatar.cc/150?img=5',
|
||||
},
|
||||
content: 'Harika görünüyor! Başarılar 👏',
|
||||
creationTime: new Date('2024-10-15T11:00:00')
|
||||
creationTime: new Date('2024-10-15T11:00:00'),
|
||||
},
|
||||
{
|
||||
id: 'c2',
|
||||
author: {
|
||||
id: 'user3',
|
||||
name: 'Mehmet Kaya',
|
||||
avatar: 'https://i.pravatar.cc/150?img=8'
|
||||
avatar: 'https://i.pravatar.cc/150?img=8',
|
||||
},
|
||||
content: 'TypeScript gerçekten fark yaratıyor!',
|
||||
creationTime: new Date('2024-10-15T11:30:00')
|
||||
}
|
||||
creationTime: new Date('2024-10-15T11:30:00'),
|
||||
},
|
||||
],
|
||||
isOwnPost: false
|
||||
isOwnPost: false,
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
|
|
@ -890,7 +890,7 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
id: 'currentUser',
|
||||
name: 'Siz',
|
||||
avatar: 'https://i.pravatar.cc/150?img=1',
|
||||
title: 'Proje Yöneticisi'
|
||||
title: 'Proje Yöneticisi',
|
||||
},
|
||||
content:
|
||||
'Bu hafta sprint planlamasını yaptık. Ekibimizle birlikte yeni özellikleri değerlendirdik. Heyecan verici bir hafta olacak!',
|
||||
|
|
@ -903,17 +903,17 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
{ id: 'p1', text: 'Kullanıcı profilleri', votes: 12 },
|
||||
{ id: 'p2', text: 'Bildirim sistemi', votes: 8 },
|
||||
{ id: 'p3', text: 'Mesajlaşma', votes: 15 },
|
||||
{ id: 'p4', text: 'Raporlama', votes: 5 }
|
||||
{ id: 'p4', text: 'Raporlama', votes: 5 },
|
||||
],
|
||||
totalVotes: 40,
|
||||
endsAt: new Date('2024-10-20T23:59:59'),
|
||||
userVote: 'p3'
|
||||
}
|
||||
userVote: 'p3',
|
||||
},
|
||||
},
|
||||
likes: {
|
||||
count: 18,
|
||||
isLiked: false,
|
||||
users: []
|
||||
users: [],
|
||||
},
|
||||
comments: [
|
||||
{
|
||||
|
|
@ -921,13 +921,13 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
author: {
|
||||
id: 'user4',
|
||||
name: 'Fatma Şahin',
|
||||
avatar: 'https://i.pravatar.cc/150?img=9'
|
||||
avatar: 'https://i.pravatar.cc/150?img=9',
|
||||
},
|
||||
content: 'Mesajlaşma özelliğine kesinlikle ihtiyacımız var!',
|
||||
creationTime: new Date('2024-10-16T10:15:00')
|
||||
}
|
||||
creationTime: new Date('2024-10-16T10:15:00'),
|
||||
},
|
||||
],
|
||||
isOwnPost: true
|
||||
isOwnPost: true,
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
|
|
@ -935,7 +935,7 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
id: 'user5',
|
||||
name: 'Zeynep Arslan',
|
||||
avatar: 'https://i.pravatar.cc/150?img=10',
|
||||
title: 'UI/UX Tasarımcı'
|
||||
title: 'UI/UX Tasarımcı',
|
||||
},
|
||||
content:
|
||||
'Yeni tasarım sistemimizin ilk prototipini hazırladık! Kullanıcı deneyimini iyileştirmek için çok çalıştık. Geri bildirimlerinizi bekliyorum! 🎨',
|
||||
|
|
@ -945,15 +945,13 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
urls: [
|
||||
'https://images.unsplash.com/photo-1561070791-2526d30994b5?w=800&q=80',
|
||||
'https://images.unsplash.com/photo-1586717799252-bd134ad00e26?w=800&q=80',
|
||||
'https://images.unsplash.com/photo-1609921212029-bb5a28e60960?w=800&q=80'
|
||||
]
|
||||
'https://images.unsplash.com/photo-1609921212029-bb5a28e60960?w=800&q=80',
|
||||
],
|
||||
},
|
||||
likes: {
|
||||
count: 42,
|
||||
isLiked: true,
|
||||
users: [
|
||||
{ id: 'user1', name: 'Ahmet Yılmaz', avatar: 'https://i.pravatar.cc/150?img=12' }
|
||||
]
|
||||
users: [{ id: 'user1', name: 'Ahmet Yılmaz', avatar: 'https://i.pravatar.cc/150?img=12' }],
|
||||
},
|
||||
comments: [
|
||||
{
|
||||
|
|
@ -961,23 +959,23 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
author: {
|
||||
id: 'user6',
|
||||
name: 'Can Öztürk',
|
||||
avatar: 'https://i.pravatar.cc/150?img=11'
|
||||
avatar: 'https://i.pravatar.cc/150?img=11',
|
||||
},
|
||||
content: 'Tasarımlar çok şık! Renk paleti özellikle güzel 😍',
|
||||
creationTime: new Date('2024-10-17T15:00:00')
|
||||
creationTime: new Date('2024-10-17T15:00:00'),
|
||||
},
|
||||
{
|
||||
id: 'c5',
|
||||
author: {
|
||||
id: 'user7',
|
||||
name: 'Elif Yıldız',
|
||||
avatar: 'https://i.pravatar.cc/150?img=20'
|
||||
avatar: 'https://i.pravatar.cc/150?img=20',
|
||||
},
|
||||
content: 'Dark mode opsiyonu da olacak mı?',
|
||||
creationTime: new Date('2024-10-17T15:30:00')
|
||||
}
|
||||
creationTime: new Date('2024-10-17T15:30:00'),
|
||||
},
|
||||
],
|
||||
isOwnPost: false
|
||||
isOwnPost: false,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
|
|
@ -985,19 +983,19 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
id: 'user8',
|
||||
name: 'Burak Çelik',
|
||||
avatar: 'https://i.pravatar.cc/150?img=13',
|
||||
title: 'DevOps Mühendisi'
|
||||
title: 'DevOps Mühendisi',
|
||||
},
|
||||
content:
|
||||
'CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪',
|
||||
creationTime: new Date('2024-10-18T08:45:00'),
|
||||
media: {
|
||||
type: 'video',
|
||||
url: 'https://www.w3schools.com/html/mov_bbb.mp4'
|
||||
url: 'https://www.w3schools.com/html/mov_bbb.mp4',
|
||||
},
|
||||
likes: {
|
||||
count: 31,
|
||||
isLiked: false,
|
||||
users: []
|
||||
users: [],
|
||||
},
|
||||
comments: [
|
||||
{
|
||||
|
|
@ -1005,13 +1003,13 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
author: {
|
||||
id: 'user9',
|
||||
name: 'Deniz Koç',
|
||||
avatar: 'https://i.pravatar.cc/150?img=14'
|
||||
avatar: 'https://i.pravatar.cc/150?img=14',
|
||||
},
|
||||
content: 'Harika iş! Detayları paylaşabilir misin?',
|
||||
creationTime: new Date('2024-10-18T09:15:00')
|
||||
}
|
||||
creationTime: new Date('2024-10-18T09:15:00'),
|
||||
},
|
||||
],
|
||||
isOwnPost: false
|
||||
isOwnPost: false,
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
|
|
@ -1019,7 +1017,7 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
id: 'user10',
|
||||
name: 'Selin Aydın',
|
||||
avatar: 'https://i.pravatar.cc/150?img=15',
|
||||
title: 'İK Müdürü'
|
||||
title: 'İK Müdürü',
|
||||
},
|
||||
content:
|
||||
'Ekip üyelerimize yeni eğitim programımızı duyurmak istiyorum! 🎓 React, TypeScript ve Modern Web Geliştirme konularında kapsamlı bir program hazırladık.',
|
||||
|
|
@ -1027,7 +1025,7 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
likes: {
|
||||
count: 56,
|
||||
isLiked: true,
|
||||
users: []
|
||||
users: [],
|
||||
},
|
||||
comments: [
|
||||
{
|
||||
|
|
@ -1035,23 +1033,23 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
author: {
|
||||
id: 'user1',
|
||||
name: 'Ahmet Yılmaz',
|
||||
avatar: 'https://i.pravatar.cc/150?img=12'
|
||||
avatar: 'https://i.pravatar.cc/150?img=12',
|
||||
},
|
||||
content: 'Ne zaman başlıyor?',
|
||||
creationTime: new Date('2024-10-14T16:30:00')
|
||||
creationTime: new Date('2024-10-14T16:30:00'),
|
||||
},
|
||||
{
|
||||
id: 'c8',
|
||||
author: {
|
||||
id: 'user10',
|
||||
name: 'Selin Aydın',
|
||||
avatar: 'https://i.pravatar.cc/150?img=15'
|
||||
avatar: 'https://i.pravatar.cc/150?img=15',
|
||||
},
|
||||
content: 'Gelecek hafta başlıyoruz! Kayıt linki mail ile paylaşılacak.',
|
||||
creationTime: new Date('2024-10-14T17:00:00')
|
||||
}
|
||||
creationTime: new Date('2024-10-14T17:00:00'),
|
||||
},
|
||||
],
|
||||
isOwnPost: false
|
||||
isOwnPost: false,
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
|
|
@ -1059,7 +1057,7 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
id: 'user11',
|
||||
name: 'Deniz Öztürk',
|
||||
avatar: 'https://i.pravatar.cc/150?img=20',
|
||||
title: 'Proje Yöneticisi'
|
||||
title: 'Proje Yöneticisi',
|
||||
},
|
||||
content: 'Bugün müşteri ile harika bir toplantı yaptık! Yeni projenin detaylarını konuştuk. 🎯',
|
||||
creationTime: new Date('2024-10-17T14:00:00'),
|
||||
|
|
@ -1069,14 +1067,14 @@ export const mockSocialPosts: SocialPost[] = [
|
|||
address: 'Sultanahmet Mahallesi, 34122 Fatih/İstanbul',
|
||||
lat: 41.0058,
|
||||
lng: 28.9768,
|
||||
placeId: 'ChIJ7fVVZiy5yhQRzsXXXXXXXXk'
|
||||
placeId: 'ChIJ7fVVZiy5yhQRzsXXXXXXXXk',
|
||||
},
|
||||
likes: {
|
||||
count: 18,
|
||||
isLiked: false,
|
||||
users: []
|
||||
users: [],
|
||||
},
|
||||
comments: [],
|
||||
isOwnPost: false
|
||||
}
|
||||
isOwnPost: false,
|
||||
},
|
||||
]
|
||||
|
|
@ -4,7 +4,6 @@ import dayjs from 'dayjs'
|
|||
import 'dayjs/locale/tr'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
import isBetween from 'dayjs/plugin/isBetween'
|
||||
import { Announcement, Survey } from '../../mocks/mockIntranetData'
|
||||
|
||||
// Widgets
|
||||
import TodayEvents from './widgets/TodayEvents'
|
||||
|
|
@ -32,6 +31,7 @@ import AnnouncementDetailModal from './modals/AnnouncementDetailModal'
|
|||
|
||||
// Social Wall
|
||||
import SocialWall from './SocialWall'
|
||||
import { Announcement, Survey } from '@/types/intranet'
|
||||
|
||||
dayjs.locale('tr')
|
||||
dayjs.extend(relativeTime)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import PostItem from './PostItem'
|
|||
import { MediaItem } from './MediaManager'
|
||||
import CreatePost from './CreatePost'
|
||||
import { Location, SocialPost } from '@/types/intranet'
|
||||
import { mockSocialPosts } from '@/mocks/mockIntranetData'
|
||||
import { mockSocialPosts } from '@/mocks/mockIntranet'
|
||||
|
||||
const SocialWall: React.FC = () => {
|
||||
const [posts, setPosts] = useState<SocialPost[]>(mockSocialPosts)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react'
|
|||
import { motion } from 'framer-motion'
|
||||
import { FaTimes, FaEye, FaClipboard } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { Announcement } from '../../../mocks/mockIntranetData'
|
||||
import { Announcement } from '../../../mocks/mockIntranet'
|
||||
|
||||
interface AnnouncementDetailModalProps {
|
||||
announcement: Announcement
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { motion } from 'framer-motion'
|
||||
import { FaTimes } from 'react-icons/fa'
|
||||
import { Survey } from '../../../mocks/mockIntranetData'
|
||||
import { Survey } from '../../../mocks/mockIntranet'
|
||||
|
||||
interface SurveyModalProps {
|
||||
survey: Survey
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaKey, FaPlus } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockReservations } from '../../../mocks/mockIntranetData'
|
||||
import { mockReservations } from '../../../mocks/mockIntranet'
|
||||
|
||||
interface ActiveReservationsProps {
|
||||
onNewReservation: () => void
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaClipboardCheck } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockSurveys, Survey } from '../../../mocks/mockIntranetData'
|
||||
import { mockSurveys, Survey } from '../../../mocks/mockIntranet'
|
||||
|
||||
interface ActiveSurveysProps {
|
||||
onTakeSurvey: (survey: Survey) => void
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import { FaDollarSign, FaPlus } from 'react-icons/fa'
|
||||
import { mockExpenseRequests } from '../../../mocks/mockIntranetData'
|
||||
import { mockExpenseRequests } from '../../../mocks/mockIntranet'
|
||||
|
||||
interface ExpenseManagementProps {
|
||||
onNewExpense: () => void
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaBell, FaEye } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockAnnouncements, Announcement } from '../../../mocks/mockIntranetData'
|
||||
import { mockAnnouncements, Announcement } from '../../../mocks/mockIntranet'
|
||||
|
||||
interface ImportantAnnouncementsProps {
|
||||
onAnnouncementClick: (announcement: Announcement) => void
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React from 'react'
|
||||
import { FaCalendarAlt, FaPlus } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockLeaveRequests } from '../../../mocks/mockIntranetData'
|
||||
import { LeaveStatusEnum, LeaveTypeEnum } from '../../../types/hr'
|
||||
import { mockEmployeeLeaves } from '@/mocks/mockEmployeeLeaves'
|
||||
|
||||
interface LeaveManagementProps {
|
||||
onNewLeave: () => void
|
||||
|
|
@ -32,7 +32,7 @@ const LeaveManagement: React.FC<LeaveManagementProps> = ({ onNewLeave }) => {
|
|||
|
||||
{/* Son izin talepleri */}
|
||||
<div className="space-y-2">
|
||||
{mockLeaveRequests.slice(0, 3).map((leave) => (
|
||||
{mockEmployeeLeaves.slice(0, 3).map((leave) => (
|
||||
<div
|
||||
key={leave.id}
|
||||
className="p-3 rounded-lg bg-gray-50 dark:bg-gray-900/20 border border-gray-200 dark:border-gray-700"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React from 'react'
|
||||
import { FaClock, FaPlus } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockOvertimeRequests } from '../../../mocks/mockIntranetData'
|
||||
import { LeaveStatusEnum } from '../../../types/hr'
|
||||
import { mockOvertimes } from '@/mocks/mockOvertimes'
|
||||
|
||||
interface OvertimeManagementProps {
|
||||
onNewOvertime: () => void
|
||||
|
|
@ -27,7 +27,7 @@ const OvertimeManagement: React.FC<OvertimeManagementProps> = ({ onNewOvertime }
|
|||
|
||||
{/* Son mesai talepleri */}
|
||||
<div className="space-y-2">
|
||||
{mockOvertimeRequests.slice(0, 3).map((overtime) => (
|
||||
{mockOvertimes.slice(0, 3).map((overtime) => (
|
||||
<div
|
||||
key={overtime.id}
|
||||
className="p-3 rounded-lg bg-gray-50 dark:bg-gray-900/20 border border-gray-200 dark:border-gray-700"
|
||||
|
|
@ -45,8 +45,11 @@ const OvertimeManagement: React.FC<OvertimeManagementProps> = ({ onNewOvertime }
|
|||
: 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-300'
|
||||
}`}
|
||||
>
|
||||
{overtime.status === LeaveStatusEnum.Approved ? 'Onaylandı' :
|
||||
overtime.status === LeaveStatusEnum.Pending ? 'Bekliyor' : 'Reddedildi'}
|
||||
{overtime.status === LeaveStatusEnum.Approved
|
||||
? 'Onaylandı'
|
||||
: overtime.status === LeaveStatusEnum.Pending
|
||||
? 'Bekliyor'
|
||||
: 'Reddedildi'}
|
||||
</span>
|
||||
</div>
|
||||
<p className="text-xs text-gray-600 dark:text-gray-400">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaChartBar, FaClock, FaUsers } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockTasks } from '../../../mocks/mockIntranetData'
|
||||
import { mockTasks } from '../../../mocks/mockIntranet'
|
||||
|
||||
const PriorityTasks: React.FC = () => {
|
||||
const priorityTasks = mockTasks
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaFileAlt, FaDownload } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockDocuments } from '../../../mocks/mockIntranetData'
|
||||
import { mockDocuments } from '../../../mocks/mockIntranet'
|
||||
|
||||
const RecentDocuments: React.FC = () => {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import { FaTruck } from 'react-icons/fa'
|
||||
import { mockShuttleRoutes } from '../../../mocks/mockIntranetData'
|
||||
import { mockShuttleRoutes } from '../../../mocks/mockIntranet'
|
||||
|
||||
const ShuttleSchedule: React.FC = () => {
|
||||
const morningShuttles = mockShuttleRoutes.filter((s) => s.type === 'morning')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockBirthdays } from '../../../mocks/mockIntranetData'
|
||||
import { mockBirthdays } from '../../../mocks/mockIntranet'
|
||||
|
||||
const TodayBirthdays: React.FC = () => {
|
||||
const todayBirthdays = mockBirthdays.filter((b) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaCalendarAlt } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockEvents } from '../../../mocks/mockIntranetData'
|
||||
import { mockEvents } from '../../../mocks/mockIntranet'
|
||||
|
||||
const TodayEvents: React.FC = () => {
|
||||
const todayEvents = mockEvents.filter(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaCalendarAlt } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockEvents } from '../../../mocks/mockIntranetData'
|
||||
import { mockEvents } from '../../../mocks/mockIntranet'
|
||||
|
||||
const UpcomingEvents: React.FC = () => {
|
||||
const upcomingEvents = mockEvents.filter(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { FaGraduationCap } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockTrainings } from '../../../mocks/mockIntranetData'
|
||||
import { mockTrainings } from '../../../mocks/mockIntranet'
|
||||
|
||||
const UpcomingTrainings: React.FC = () => {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react'
|
|||
import { FaUtensils } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import isBetween from 'dayjs/plugin/isBetween'
|
||||
import { mockMealMenus } from '../../../mocks/mockIntranetData'
|
||||
import { mockMealMenus } from '../../../mocks/mockIntranet'
|
||||
|
||||
dayjs.extend(isBetween)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue