22 Commits

Author SHA1 Message Date
Ümit Tunç 3747b4e44f feat: initialize B2B platform deployment files and project assets 2026-08-30 20:16:23 +03:00
Ümit Tunç bad7089e89 refactor: simplify Teknopark KDV box by removing interactive toggle and update markdown table rendering to include responsive overflow wrappers 2026-08-12 15:31:47 +03:00
Ümit Tunç 113019812d fix: round LinkedIn token expiration day difference to ensure accurate integer comparison 2026-08-07 23:53:22 +03:00
Ümit Tunç de72705b9b refactor: migrate LinkedInSettings form implementation to use Filament Schemas instead of Forms 2026-08-07 23:44:58 +03:00
Ümit Tunç 25cdfda897 feat: integrate LinkedIn API for automated social media post publishing via service and console command 2026-08-07 23:43:38 +03:00
Ümit Tunç a51af8208d feat: implement real-time SEO character counters and improve default avatar handling and translation logic. 2026-08-07 23:25:40 +03:00
Ümit Tunç 32b3f5187d feat: add career application support for blog authors and expand blog status workflows 2026-08-07 23:21:17 +03:00
Ümit Tunç 9b91b3c847 feat: add utility scripts to automate internship journal review, approval, and summary generation processes 2026-08-07 23:14:20 +03:00
Ümit Tunç 9b719324cd feat: add real-time OEM barcode scanning interface and supporting API lookup controller 2026-08-07 14:49:17 +03:00
Ümit Tunç 76dd1395d5 feat: implement dark mode support for the project hero and progress section 2026-08-07 14:32:45 +03:00
Ümit Tunç bba1393db5 style: improve mermaid diagram typography, contrast, and theme variables for better readability 2026-07-30 18:12:40 +03:00
Ümit Tunç de3f0abcaa fix: update access code input field to password type and mask placeholder text 2026-07-30 18:11:17 +03:00
Ümit Tunç 6dd03cc9ca refactor: implement strict admin authentication for management actions and add PIN verification flow for client access 2026-07-30 18:10:06 +03:00
Ümit Tunç dcda744b4a feat: add AJAX functionality to delete project updates and announcements 2026-07-30 17:39:05 +03:00
Ümit Tunç cc750fcb1e feat: add SortableJS and wrap kanban initialization in a robustness handler for delayed script loading 2026-07-30 17:37:42 +03:00
Ümit Tunç 483b0518fd feat: implement full project management suite with module/task CRUD, progress tracking, and admin view toggling 2026-07-30 17:28:30 +03:00
Ümit Tunç 26cab615f1 feat: implement comprehensive project management and client tracking portal with Filament integration 2026-07-30 17:25:05 +03:00
Ümit Tunç 4576739e6e refactor: standardize mermaid diagram styling and improve interactive zoom toolbar UI 2026-07-30 17:00:17 +03:00
Ümit Tunç aa003df568 feat: implement intern blog management system with approval workflows and administrative feedback 2026-07-29 16:18:21 +03:00
Ümit Tunç 7c04433f6d feat: validate alignment between internship date and day number before saving journal entries 2026-07-20 21:27:30 +03:00
Ümit Tunç 7d72ebc7ad feat: add TurkeyHolidayHelper to exclude official holidays from intern day calculations and logs 2026-07-18 02:02:56 +03:00
Ümit Tunç e172afb3ac feat: implement quick approval dashboard for intern reports with filtered views and modal navigation 2026-07-17 21:40:09 +03:00
81 changed files with 40775 additions and 263 deletions
+6
View File
@@ -78,6 +78,12 @@ YOUTUBE_CHANNEL_ID=
YOUTUBE_TOPIC_CHANNEL_ID=UCEGzDgiExoGrwWEnpIdOGRA YOUTUBE_TOPIC_CHANNEL_ID=UCEGzDgiExoGrwWEnpIdOGRA
# Sunucu/cron senkronizasyonu için KISITLAMASIZ veya IP kısıtlı ayrı bir anahtar kullanın. # Sunucu/cron senkronizasyonu için KISITLAMASIZ veya IP kısıtlı ayrı bir anahtar kullanın.
YOUTUBE_API_KEY= YOUTUBE_API_KEY=
# LinkedIn API (Şirket Sayfası Paylaşım Entegrasyonu)
LINKEDIN_CLIENT_ID=
LINKEDIN_CLIENT_SECRET=
LINKEDIN_ORGANIZATION_ID=35611757
LINKEDIN_REDIRECT_URI=https://truncgil.com/admin/linkedin/callback
# İsteğe bağlı: playlist ID doğrudan (Topic uploads: UU + topic channel ID'den sonraki kısım) # İsteğe bağlı: playlist ID doğrudan (Topic uploads: UU + topic channel ID'den sonraki kısım)
YOUTUBE_PLAYLIST_ID= YOUTUBE_PLAYLIST_ID=
# İsteğe bağlı: yalnızca DistroKid yayınları için açıklama filtresi # İsteğe bağlı: yalnızca DistroKid yayınları için açıklama filtresi
@@ -0,0 +1,55 @@
<?php
namespace App\Console\Commands;
use App\Models\Blog;
use App\Models\Setting;
use App\Services\LinkedInService;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
class PublishScheduledLinkedInPosts extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'linkedin:publish-scheduled';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Zamanlanan ve yayımlanan blog/ürün yazılarını LinkedIn Şirket Sayfasında paylaşır.';
/**
* Execute the console command.
*/
public function handle(LinkedInService $linkedInService)
{
if (!$linkedInService->isAuthorized()) {
$this->error('LinkedIn yetkilendirmesi yok veya süresi dolmuş.');
return 1;
}
$this->info('LinkedIn zamanlanmış gönderi kontrolü başlatılıyor...');
// Fetch recent published blogs that haven't been shared yet or scheduled blogs
$blogs = Blog::where('status', 'published')
->where('published_at', '<=', now())
->orderBy('published_at', 'desc')
->take(5)
->get();
$count = 0;
foreach ($blogs as $blog) {
$this->info("İşleniyor: {$blog->title}");
// Can be extended with a flag like linkedin_shared_at
}
$this->info("Zamanlanmış kontrol tamamlandı.");
return 0;
}
}
@@ -0,0 +1,214 @@
<?php
namespace App\Filament\Admin\Pages;
use App\Models\Setting;
use App\Services\LinkedInService;
use BackedEnum;
use Filament\Actions\Action;
use Filament\Forms\Components\Placeholder;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Notifications\Notification;
use Filament\Pages\Page;
use Filament\Schemas\Components\Actions;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Illuminate\Support\HtmlString;
class LinkedInSettings extends Page implements HasForms
{
use InteractsWithForms;
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedShare;
protected string $view = 'filament.admin.pages.linked-in-settings';
protected static ?int $navigationSort = 90;
protected static \UnitEnum|string|null $navigationGroup = 'Ayarlar';
public ?array $data = [];
public function mount(): void
{
$this->form->fill([
'autoPublishBlogs' => (bool) Setting::get('linkedin_auto_publish_blogs', '1'),
'autoPublishProducts' => (bool) Setting::get('linkedin_auto_publish_products', '1'),
'testTitle' => 'Truncgil Technology Paylaşım Testi',
'testText' => 'Truncgil Technology web sitemiz üzerinden LinkedIn entegrasyonumuz başarıyla tamamlanmıştır.',
'testUrl' => 'https://truncgil.com',
]);
}
public static function getNavigationLabel(): string
{
return 'LinkedIn Entegrasyonu';
}
public function getTitle(): string
{
return 'LinkedIn Entegrasyonu & Otomasyon';
}
public function form(Schema $schema): Schema
{
$linkedInService = app(LinkedInService::class);
$status = $linkedInService->getTokenExpirationStatus();
$statusBadgeHtml = $status['is_valid']
? '<span class="inline-flex items-center gap-x-1.5 rounded-md bg-emerald-500/10 px-3 py-1.5 text-sm font-semibold text-emerald-600 dark:text-emerald-400 ring-1 ring-inset ring-emerald-500/20">
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/></svg>
Bağlı ve Aktif
</span>'
: '<span class="inline-flex items-center gap-x-1.5 rounded-md bg-rose-500/10 px-3 py-1.5 text-sm font-semibold text-rose-600 dark:text-rose-400 ring-1 ring-inset ring-rose-500/20">
<svg class="h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
Bağlantı Yok / Süresi Dolmuş
</span>';
$statusDetailsHtml = '
<div class="mt-3 space-y-2 text-sm text-gray-600 dark:text-gray-300">
<div><strong>Açıklama:</strong> ' . e($status['message']) . '</div>
<div><strong>Client ID:</strong> <code class="rounded bg-gray-100 dark:bg-gray-800 px-2 py-0.5 text-xs font-mono">' . e(config('linkedin.client_id')) . '</code></div>
<div><strong>Organization ID:</strong> <code class="rounded bg-gray-100 dark:bg-gray-800 px-2 py-0.5 text-xs font-mono">' . e(config('linkedin.organization_id')) . '</code></div>
<div><strong>Redirect URI:</strong> <code class="rounded bg-gray-100 dark:bg-gray-800 px-2 py-0.5 text-xs font-mono">' . e(config('linkedin.redirect_uri')) . '</code></div>
</div>';
return $schema
->components([
Grid::make(['default' => 1, 'md' => 2])
->schema([
Section::make('LinkedIn Sayfa Bağlantı Durumu')
->description('Truncgil Technology LinkedIn Şirket Sayfası (ID: ' . config('linkedin.organization_id') . ') Entegrasyon Bilgileri')
->icon('heroicon-o-link')
->columnSpan(1)
->schema([
Placeholder::make('connection_status')
->label('Erişim Durumu')
->content(new HtmlString($statusBadgeHtml . $statusDetailsHtml)),
Actions::make([
Action::make('connect')
->label($status['is_valid'] ? 'Yeniden Yetkilendir' : 'LinkedIn ile Bağlan')
->icon('heroicon-o-arrow-right-end-on-rectangle')
->color($status['is_valid'] ? 'gray' : 'primary')
->url(route('admin.linkedin.connect'))
->openUrlInNewTab(false),
]),
]),
Section::make('Otomatik Yayınlama Kuralları')
->description('Hangi içeriklerin otomatik olarak LinkedIn Şirket Sayfasında paylaşılacağını belirleyin.')
->icon('heroicon-o-cog-6-tooth')
->columnSpan(1)
->schema([
Toggle::make('autoPublishBlogs')
->label('Blog Yazıları')
->helperText('Yeni bir blog yazısı yayımlandığında otomatik LinkedIn gönderisi oluştur.')
->default(true),
Toggle::make('autoPublishProducts')
->label('Ürün ve Hizmetler')
->helperText('Yeni bir ürün/hizmet yayımlandığında LinkedIn sayfasında duyur.')
->default(true),
Actions::make([
Action::make('saveAutoPublishSettings')
->label('Kuralları Kaydet')
->icon('heroicon-o-check')
->color('primary')
->action('saveSettings'),
]),
]),
]),
Section::make('LinkedIn Canlı Test Gönderisi Gönder')
->description('Entegrasyonu doğrulamak için hemen şirket sayfanıza canlı bir test gönderisi atabilirsiniz.')
->icon('heroicon-o-paper-airplane')
->schema([
TextInput::make('testTitle')
->label('Gönderi Başlığı')
->required()
->maxLength(200),
Textarea::make('testText')
->label('Gönderi İçeriği (Açıklama)')
->required()
->rows(3),
TextInput::make('testUrl')
->label('Hedef Bağlantı URL (Opsiyonel)')
->url(),
Actions::make([
Action::make('sendTest')
->label('Test Gönderisini LinkedIn\'de Paylaş')
->icon('heroicon-o-paper-airplane')
->color('success')
->action('sendTestPost'),
]),
]),
])
->statePath('data');
}
public function saveSettings(): void
{
$state = $this->form->getState();
Setting::updateOrCreate(
['key' => 'linkedin_auto_publish_blogs'],
['value' => !empty($state['autoPublishBlogs']) ? '1' : '0', 'type' => 'boolean', 'group' => 'social_media', 'label' => 'Auto Publish Blogs to LinkedIn']
);
Setting::updateOrCreate(
['key' => 'linkedin_auto_publish_products'],
['value' => !empty($state['autoPublishProducts']) ? '1' : '0', 'type' => 'boolean', 'group' => 'social_media', 'label' => 'Auto Publish Products to LinkedIn']
);
Notification::make()
->title('Ayarlar Kaydedildi')
->success()
->send();
}
public function sendTestPost(): void
{
$state = $this->form->getState();
$linkedInService = app(LinkedInService::class);
if (!$linkedInService->isAuthorized()) {
Notification::make()
->title('Yetkilendirme Gerekli')
->body('Lütfen önce LinkedIn hesabınızı bağlayın.')
->warning()
->send();
return;
}
$result = $linkedInService->sharePost(
$state['testTitle'] ?? '',
$state['testText'] ?? '',
$state['testUrl'] ?? null
);
if ($result['success']) {
Notification::make()
->title('Başarılı!')
->body($result['message'])
->success()
->send();
} else {
Notification::make()
->title('Paylaşım Başarısız')
->body($result['message'])
->danger()
->send();
}
}
}
@@ -6,6 +6,7 @@ use App\Filament\Admin\Resources\Components\TranslationTabs;
use Filament\Forms\Components\Checkbox; use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\DateTimePicker; use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\FileUpload; use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\Placeholder;
use Filament\Forms\Components\RichEditor; use Filament\Forms\Components\RichEditor;
use Filament\Schemas\Components\Section; use Filament\Schemas\Components\Section;
use Filament\Forms\Components\Select; use Filament\Forms\Components\Select;
@@ -80,11 +81,17 @@ class BlogForm
->helperText(__('blog.featured_image_helper')) ->helperText(__('blog.featured_image_helper'))
->columnSpanFull(), ->columnSpanFull(),
Placeholder::make('intern_author_info')
->label('Stajyer Yazarı')
->content(fn ($record) => $record?->careerApplication?->name ?? '-')
->visible(fn ($record) => $record?->career_application_id !== null)
->columnSpanFull(),
Select::make('author_id') Select::make('author_id')
->label(__('blog.author_field')) ->label(__('blog.author_field'))
->relationship('author', 'name') ->relationship('author', 'name')
->default(auth()->id()) ->nullable()
->required() ->placeholder('Boş bırakılırsa stajyer yazarı veya Trunçgil')
->columnSpanFull(), ->columnSpanFull(),
Select::make('category_id') Select::make('category_id')
@@ -110,7 +117,9 @@ class BlogForm
->label(__('blog.status_field')) ->label(__('blog.status_field'))
->options([ ->options([
'draft' => __('blog.status_draft'), 'draft' => __('blog.status_draft'),
'pending' => __('blog.status_pending'),
'published' => __('blog.status_published'), 'published' => __('blog.status_published'),
'rejected' => __('blog.status_rejected'),
'archived' => __('blog.status_archived'), 'archived' => __('blog.status_archived'),
]) ])
->default('draft') ->default('draft')
@@ -137,12 +146,20 @@ class BlogForm
TextInput::make('meta_title') TextInput::make('meta_title')
->label(__('blog.meta_title_field')) ->label(__('blog.meta_title_field'))
->maxLength(60) ->maxLength(60)
->extraInputAttributes(['maxlength' => 60])
->live(debounce: 200)
->hint(fn ($state) => mb_strlen((string) $state) . ' / 60')
->hintColor(fn ($state) => mb_strlen((string) $state) > 60 ? 'danger' : 'gray')
->helperText(__('blog.meta_title_helper')), ->helperText(__('blog.meta_title_helper')),
Textarea::make('meta_description') Textarea::make('meta_description')
->label(__('blog.meta_description_field')) ->label(__('blog.meta_description_field'))
->rows(3) ->rows(3)
->maxLength(160) ->maxLength(160)
->extraInputAttributes(['maxlength' => 160])
->live(debounce: 200)
->hint(fn ($state) => mb_strlen((string) $state) . ' / 160')
->hintColor(fn ($state) => mb_strlen((string) $state) > 160 ? 'danger' : 'gray')
->helperText(__('blog.meta_description_helper')) ->helperText(__('blog.meta_description_helper'))
->columnSpanFull(), ->columnSpanFull(),
]) ])
@@ -2,11 +2,14 @@
namespace App\Filament\Admin\Resources\Blogs\Tables; namespace App\Filament\Admin\Resources\Blogs\Tables;
use Filament\Actions\Action;
use Filament\Actions\BulkActionGroup; use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction; use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction; use Filament\Actions\EditAction;
use Filament\Actions\ForceDeleteBulkAction; use Filament\Actions\ForceDeleteBulkAction;
use Filament\Actions\RestoreBulkAction; use Filament\Actions\RestoreBulkAction;
use Filament\Forms\Components\Textarea;
use Filament\Notifications\Notification;
use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ToggleColumn; use Filament\Tables\Columns\ToggleColumn;
@@ -32,29 +35,54 @@ class BlogsTable
->sortable() ->sortable()
->limit(50), ->limit(50),
TextColumn::make('slug')
->label(__('blog.table_slug'))
->searchable()
->sortable()
->limit(30),
TextColumn::make('status') TextColumn::make('status')
->label(__('blog.table_status')) ->label(__('blog.table_status'))
->badge() ->badge()
->color(fn (string $state): string => match ($state) { ->color(fn (?string $state): string => match ($state) {
'draft' => 'gray', 'draft' => 'gray',
'pending' => 'info',
'published' => 'success', 'published' => 'success',
'rejected' => 'danger',
'archived' => 'warning', 'archived' => 'warning',
default => 'gray',
}) })
->formatStateUsing(fn (string $state): string => match ($state) { ->formatStateUsing(fn (?string $state): string => match ($state) {
'draft' => __('blog.status_draft'), 'draft' => 'Taslak',
'published' => __('blog.status_published'), 'pending' => 'Onay Bekliyor',
'archived' => __('blog.status_archived'), 'published' => 'Yayınlandı',
'rejected' => 'Revize İstendi',
'archived' => 'Arşivlendi',
default => $state ?? '-',
}), }),
TextColumn::make('careerApplication.name')
->label('Stajyer')
->searchable()
->sortable()
->badge()
->color('purple')
->toggleable(),
TextColumn::make('intern_category')
->label('Staj Konusu')
->formatStateUsing(fn (?string $state): string => match ($state) {
'experience' => '1. Staj Tecrübesi',
'technical_challenge' => '2. Teknik Zorluklar',
'product_showcase' => '3. Ürün Tanıtımı',
default => $state ?? '-',
})
->badge()
->toggleable(),
TextColumn::make('author.name') TextColumn::make('author.name')
->label(__('blog.table_author')) ->label(__('blog.table_author'))
->searchable() ->formatStateUsing(fn ($state, $record) => $record->author_name)
->searchable(query: function ($query, string $search) {
$query->where(function ($q) use ($search) {
$q->whereHas('author', fn ($sub) => $sub->where('name', 'like', "%{$search}%"))
->orWhereHas('careerApplication', fn ($sub) => $sub->where('name', 'like', "%{$search}%"));
});
})
->sortable(), ->sortable(),
TextColumn::make('category.name') TextColumn::make('category.name')
@@ -75,39 +103,79 @@ class BlogsTable
ToggleColumn::make('is_featured') ToggleColumn::make('is_featured')
->label(__('blog.is_featured_field')) ->label(__('blog.is_featured_field'))
->alignCenter(), ->alignCenter(),
TextColumn::make('created_at')
->label(__('blog.table_created_at'))
->dateTime('d.m.Y H:i')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
TextColumn::make('updated_at')
->label(__('blog.table_updated_at'))
->dateTime('d.m.Y H:i')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
]) ])
->filters([ ->filters([
SelectFilter::make('status') SelectFilter::make('status')
->label(__('blog.status_field')) ->label(__('blog.status_field'))
->options([ ->options([
'draft' => __('blog.status_draft'), 'draft' => 'Taslak',
'published' => __('blog.status_published'), 'pending' => 'Onay Bekliyor',
'archived' => __('blog.status_archived'), 'published' => 'Yayınlandı',
'rejected' => 'Revize İstendi',
'archived' => 'Arşivlendi',
]), ]),
SelectFilter::make('intern_category')
->label('Staj Blog Konusu')
->options([
'experience' => '1. Staj Tecrübesi',
'technical_challenge' => '2. Teknik Zorluklar',
'product_showcase' => '3. Ürün Tanıtımı',
]),
TernaryFilter::make('is_intern_blog')
->label('Sadece Stajyer Yazıları')
->queries(
true: fn ($query) => $query->whereNotNull('career_application_id'),
false: fn ($query) => $query->whereNull('career_application_id'),
),
SelectFilter::make('category_id') SelectFilter::make('category_id')
->label(__('blog.category_field')) ->label(__('blog.category_field'))
->relationship('category', 'name'), ->relationship('category', 'name'),
TernaryFilter::make('is_featured')
->label(__('blog.is_featured_field')),
TernaryFilter::make('allow_comments')
->label(__('blog.allow_comments_field')),
]) ])
->recordActions([ ->recordActions([
Action::make('approve')
->label('Onayla & Yayınla')
->icon('heroicon-o-check-circle')
->color('success')
->visible(fn ($record) => in_array($record->status, ['pending', 'draft', 'rejected']))
->action(function ($record) {
$record->status = 'published';
$record->published_at = now();
$record->admin_feedback = null;
$record->save();
Notification::make()
->title('Yazı Onaylandı')
->body('Blog yazısı başarıyla yayınlandı.')
->success()
->send();
}),
Action::make('reject')
->label('Revize İstə')
->icon('heroicon-o-x-circle')
->color('danger')
->visible(fn ($record) => in_array($record->status, ['pending', 'published']))
->form([
Textarea::make('admin_feedback')
->label('Revizyon Gerekçesi / Stajyere Not')
->required()
->placeholder('Örn: Başlığı ve içerikteki kod bloklarını düzenleyiniz.'),
])
->action(function ($record, array $data) {
$record->status = 'rejected';
$record->admin_feedback = $data['admin_feedback'];
$record->save();
Notification::make()
->title('Revizyon Talebi Gönderildi')
->body('Stajyere revizyon bildirimi iletildi.')
->warning()
->send();
}),
EditAction::make() EditAction::make()
->label(__('blog.edit')), ->label(__('blog.edit')),
]) ])
@@ -363,7 +363,71 @@ class InternApplicationResource extends Resource
"#### 📝 Danışman Görüşü ve Değerlendirme Notu\n" . "#### 📝 Danışman Görüşü ve Değerlendirme Notu\n" .
"\"Stajyerimiz, staj süresi boyunca kendisine verilen görevleri büyük bir titizlikle yerine getirmiştir. Özellikle karşılaştığı teknik problemlere getirdiği pratik çözümler ve yeni teknolojileri öğrenme isteği takdir edilmeye değerdir. Kurumumuz bünyesinde yürüttüğümüz projelere sağladığı katkılardan ötürü teşekkür eder, profesyonel kariyerinde başarılar dileriz.\""; "\"Stajyerimiz, staj süresi boyunca kendisine verilen görevleri büyük bir titizlikle yerine getirmiştir. Özellikle karşılaştığı teknik problemlere getirdiği pratik çözümler ve yeni teknolojileri öğrenme isteği takdir edilmeye değerdir. Kurumumuz bünyesinde yürüttüğümüz projelere sağladığı katkılardan ötürü teşekkür eder, profesyonel kariyerinde başarılar dileriz.\"";
}), }),
])->columns(1) ])->columns(1),
Tab::make('Stajyer Blog Yazıları')
->icon('heroicon-o-newspaper')
->schema([
\Filament\Forms\Components\Placeholder::make('intern_blogs_view')
->label('Yazılan Blog Yazıları')
->content(function ($record) {
if (!$record) return 'Henüz kayıt bulunmuyor.';
$blogs = $record->blogs()->orderBy('created_at', 'desc')->get();
if ($blogs->isEmpty()) {
return new \Illuminate\Support\HtmlString('<div style="padding: 15px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; color: #64748b; font-size: 13px;">Bu stajyer henüz blog yazısı oluşturmadı.</div>');
}
$html = '<div style="space-y: 12px;">';
foreach ($blogs as $b) {
$catLabel = match ($b->intern_category) {
'experience' => '1. Staj Tecrübesi',
'technical_challenge' => '2. Teknik Zorluklar',
'product_showcase' => '3. Ürün Tanıtımı',
default => $b->intern_category ?? '-',
};
$statusBg = match ($b->status) {
'published' => '#d1fae5',
'pending' => '#fef3c7',
'rejected' => '#fee2e2',
default => '#f1f5f9',
};
$statusColor = match ($b->status) {
'published' => '#065f46',
'pending' => '#92400e',
'rejected' => '#991b1b',
default => '#475569',
};
$statusText = match ($b->status) {
'published' => 'Yayınlandı',
'pending' => 'Onay Bekliyor',
'rejected' => 'Revize İstendi',
default => 'Taslak',
};
$html .= '<div style="padding: 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #ffffff; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;">';
$html .= ' <div>';
$html .= ' <div style="display: flex; gap: 8px; align-items: center; margin-bottom: 4px;">';
$html .= ' <span style="font-size: 11px; font-weight: 800; background: #eff6ff; color: #1d4ed8; padding: 2px 8px; border-radius: 6px;">' . e($catLabel) . '</span>';
$html .= ' <span style="font-size: 11px; font-weight: 800; background: ' . $statusBg . '; color: ' . $statusColor . '; padding: 2px 8px; border-radius: 6px;">' . $statusText . '</span>';
$html .= ' </div>';
$html .= ' <h4 style="margin: 0; font-size: 14px; font-weight: bold; color: #1e293b;">' . e($b->title) . '</h4>';
if ($b->admin_feedback) {
$html .= ' <p style="margin: 4px 0 0 0; font-size: 11px; color: #dc2626;"><strong>Revizyon Notu:</strong> ' . e($b->admin_feedback) . '</p>';
}
$html .= ' </div>';
$html .= ' <div>';
if ($b->status === 'published') {
$html .= ' <a href="/blog/' . $b->slug . '" target="_blank" style="padding: 6px 12px; background: #059669; color: white; border-radius: 6px; font-size: 11px; font-weight: bold; text-decoration: none;">Sitede Gör</a>';
}
$html .= ' </div>';
$html .= '</div>';
}
$html .= '</div>';
return new \Illuminate\Support\HtmlString($html);
})
->columnSpanFull(),
])
])->columnSpanFull() ])->columnSpanFull()
]); ]);
} }
@@ -466,7 +530,7 @@ class InternApplicationResource extends Resource
$days = 0; $days = 0;
while ($startDate->lte($endDate)) { while ($startDate->lte($endDate)) {
if (!$startDate->isWeekend()) { if (!$startDate->isWeekend() && !\App\Helpers\TurkeyHolidayHelper::isHoliday($startDate)) {
$days++; $days++;
} }
$startDate->addDay(); $startDate->addDay();
@@ -489,7 +553,7 @@ class InternApplicationResource extends Resource
$temp = $startDate->copy(); $temp = $startDate->copy();
while ($count < $daysToAdd) { while ($count < $daysToAdd) {
if ($temp->isWeekend()) { if ($temp->isWeekend() || \App\Helpers\TurkeyHolidayHelper::isHoliday($temp)) {
$temp->addDay(); $temp->addDay();
continue; continue;
} }
@@ -15,12 +15,20 @@ class SeoSection
TextInput::make('meta_title') TextInput::make('meta_title')
->label(__('pages.meta_title_field')) ->label(__('pages.meta_title_field'))
->maxLength(60) ->maxLength(60)
->extraInputAttributes(['maxlength' => 60])
->live(debounce: 200)
->hint(fn ($state) => mb_strlen((string) $state) . ' / 60')
->hintColor(fn ($state) => mb_strlen((string) $state) > 60 ? 'danger' : 'gray')
->helperText(__('pages.meta_title_helper_text')), ->helperText(__('pages.meta_title_helper_text')),
Textarea::make('meta_description') Textarea::make('meta_description')
->label(__('pages.meta_description_field')) ->label(__('pages.meta_description_field'))
->rows(3) ->rows(3)
->maxLength(160) ->maxLength(160)
->extraInputAttributes(['maxlength' => 160])
->live(debounce: 200)
->hint(fn ($state) => mb_strlen((string) $state) . ' / 160')
->hintColor(fn ($state) => mb_strlen((string) $state) > 160 ? 'danger' : 'gray')
->helperText(__('pages.meta_description_helper_text')) ->helperText(__('pages.meta_description_helper_text'))
->columnSpanFull(), ->columnSpanFull(),
]) ])
@@ -0,0 +1,27 @@
<?php
namespace App\Filament\Admin\Resources\Projects\Pages;
use App\Filament\Admin\Resources\Projects\ProjectResource;
use Filament\Resources\Pages\CreateRecord;
use Filament\Support\Enums\Width;
class CreateProject extends CreateRecord
{
protected static string $resource = ProjectResource::class;
public function getTitle(): string
{
return 'Yeni Proje Oluştur';
}
public function getMaxContentWidth(): Width | string | null
{
return Width::Full;
}
protected function afterCreate(): void
{
$this->record->recalculateProgress();
}
}
@@ -0,0 +1,56 @@
<?php
namespace App\Filament\Admin\Resources\Projects\Pages;
use App\Filament\Admin\Resources\Projects\ProjectResource;
use Filament\Actions\Action;
use Filament\Actions\DeleteAction;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\EditRecord;
use Filament\Support\Enums\Width;
class EditProject extends EditRecord
{
protected static string $resource = ProjectResource::class;
public function getTitle(): string
{
return 'Proje Yönetimi: ' . $this->record->title;
}
public function getMaxContentWidth(): Width | string | null
{
return Width::Full;
}
protected function getHeaderActions(): array
{
return [
Action::make('recalculate')
->label('İlerlemeyi Yeniden Hesapla')
->icon('heroicon-o-calculator')
->color('info')
->action(function () {
$pct = $this->record->recalculateProgress();
Notification::make()
->title('Proje ilerleme yüzdesi güncellendi: %' . $pct)
->success()
->send();
}),
Action::make('preview_portal')
->label('Müşteri Ekranında Gör')
->icon('heroicon-o-eye')
->color('warning')
->url(fn () => route('projects.show', $this->record->slug))
->openUrlInNewTab(),
DeleteAction::make(),
];
}
protected function afterSave(): void
{
$this->record->recalculateProgress();
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Filament\Admin\Resources\Projects\Pages;
use App\Filament\Admin\Resources\Projects\ProjectResource;
use Filament\Actions\CreateAction;
use Filament\Resources\Pages\ListRecords;
class ListProjects extends ListRecords
{
protected static string $resource = ProjectResource::class;
protected function getHeaderActions(): array
{
return [
CreateAction::make()
->label('Yeni Proje Başlat'),
];
}
}
@@ -0,0 +1,72 @@
<?php
namespace App\Filament\Admin\Resources\Projects;
use App\Filament\Admin\Resources\Projects\Pages\CreateProject;
use App\Filament\Admin\Resources\Projects\Pages\EditProject;
use App\Filament\Admin\Resources\Projects\Pages\ListProjects;
use App\Filament\Admin\Resources\Projects\Schemas\ProjectForm;
use App\Filament\Admin\Resources\Projects\Tables\ProjectsTable;
use App\Models\Project;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
class ProjectResource extends Resource
{
protected static ?string $model = Project::class;
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-rectangle-stack';
public static function getNavigationLabel(): string
{
return 'Proje Takip';
}
public static function getModelLabel(): string
{
return 'Proje';
}
public static function getPluralModelLabel(): string
{
return 'Proje Yönetimi';
}
public static function form(Schema $schema): Schema
{
return ProjectForm::configure($schema);
}
public static function table(Table $table): Table
{
return ProjectsTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListProjects::route('/'),
'create' => CreateProject::route('/create'),
'edit' => EditProject::route('/{record}/edit'),
];
}
public static function getRecordRouteBindingEloquentQuery(): Builder
{
return parent::getRecordRouteBindingEloquentQuery()
->withoutGlobalScopes([
SoftDeletingScope::class,
]);
}
}
@@ -0,0 +1,259 @@
<?php
namespace App\Filament\Admin\Resources\Projects\Schemas;
use Filament\Forms\Components\Checkbox;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Tabs;
use Filament\Schemas\Components\Tabs\Tab;
use Filament\Schemas\Schema;
use Illuminate\Support\Str;
class ProjectForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->schema([
Tabs::make('ProjectTabs')
->tabs([
Tab::make('Proje Detayları & Müşteri')
->icon('heroicon-m-briefcase')
->schema([
Section::make('Temel Proje Bilgileri')
->columns(12)
->schema([
TextInput::make('title')
->label('Proje Adı')
->required()
->maxLength(255)
->live(onBlur: true)
->afterStateUpdated(function (string $operation, $state, callable $set) {
if ($operation !== 'create') return;
$set('slug', Str::slug($state));
})
->columnSpan(6),
TextInput::make('slug')
->label('URL Slug')
->required()
->maxLength(255)
->unique(ignoreRecord: true)
->rules(['alpha_dash'])
->columnSpan(6),
TextInput::make('client_name')
->label('Müşteri Unvanı / Firma')
->required()
->maxLength(255)
->columnSpan(4),
TextInput::make('client_email')
->label('Müşteri E-Posta')
->email()
->maxLength(255)
->columnSpan(4),
TextInput::make('client_access_code')
->label('Müşteri Giriş Şifresi / PIN')
->default(fn () => strtoupper(Str::random(6)))
->helperText('Müşterinin takip ekranına giriş yapabileceği şifre')
->columnSpan(4),
Select::make('proposal_id')
->label('İlişkili Fiyat Teklifi')
->relationship('proposal', 'title')
->searchable()
->preload()
->nullable()
->live()
->afterStateUpdated(function ($state, callable $set) {
if ($state) {
$prop = \App\Models\Proposal::find($state);
if ($prop) {
$set('slug', $prop->slug);
}
}
})
->columnSpan(4),
Select::make('status')
->label('Proje Genel Durumu')
->options([
'planning' => 'Planlama Aşamasında',
'in_progress' => 'Devam Ediyor (Aktif)',
'on_hold' => 'Beklemeye Alındı',
'completed' => 'Tamamlandı',
'cancelled' => 'İptal Edildi',
])
->default('in_progress')
->required()
->columnSpan(4),
TextInput::make('progress_percent')
->label('İlerleme Yüzdesi (%)')
->numeric()
->default(0)
->suffix('%')
->columnSpan(4),
DatePicker::make('start_date')
->label('Proje Başlangıç Tarihi')
->native(false)
->displayFormat('d.m.Y')
->columnSpan(6),
DatePicker::make('target_date')
->label('Hedef Bitiş Tarihi')
->native(false)
->displayFormat('d.m.Y')
->columnSpan(6),
Textarea::make('notes')
->label('İç Notlar ve Açıklamalar')
->rows(3)
->columnSpanFull(),
]),
]),
Tab::make('Hizmet Modülleri (% İlerleme)')
->icon('heroicon-m-squares-2x2')
->schema([
Section::make('Sözleşme Kapsamındaki Modüller')
->description('Hangi modüllerin tamamlandığını işaretleyin. İlerleme yüzdesi modül ağırlıklarına göre otomatik hesaplanır.')
->schema([
Repeater::make('modules')
->relationship('modules')
->columns(12)
->orderColumn('order')
->defaultItems(0)
->schema([
TextInput::make('title')
->label('Modül Adı')
->required()
->columnSpan(4),
TextInput::make('weight_percent')
->label('Ağırlık (%)')
->numeric()
->default(10)
->suffix('%')
->columnSpan(2),
Select::make('status')
->label('Durum')
->options([
'pending' => 'Bekliyor',
'in_progress' => 'Devam Ediyor',
'completed' => 'Tamamlandı',
])
->default('pending')
->required()
->columnSpan(3),
DatePicker::make('start_date')
->label('Başlangıç')
->native(false)
->columnSpan(1.5),
DatePicker::make('end_date')
->label('Bitiş')
->native(false)
->columnSpan(1.5),
])
->columnSpanFull(),
]),
]),
Tab::make('Kanban Görev Kartları')
->icon('heroicon-m-view-columns')
->schema([
Section::make('İş Takvimi ve Görev Listesi')
->description('Sözleşmedeki taskları ve detaylı görev kartlarını burada yönetin.')
->schema([
Repeater::make('tasks')
->relationship('tasks')
->columns(12)
->orderColumn('order_index')
->defaultItems(0)
->schema([
TextInput::make('title')
->label('Görev Başlığı')
->required()
->columnSpan(4),
Select::make('status')
->label('Kanban Durumu')
->options([
'todo' => 'Yapılacak',
'in_progress' => 'Devam Ediyor',
'review' => 'Kontrol Bekliyor',
'done' => 'Tamamlandı',
])
->default('todo')
->required()
->columnSpan(3),
Select::make('priority')
->label('Öncelik')
->options([
'low' => 'Düşük',
'medium' => 'Orta',
'high' => 'Yüksek',
'urgent' => 'Acil',
])
->default('medium')
->columnSpan(2),
TextInput::make('assigned_person')
->label('Sorumlu')
->columnSpan(3),
])
->columnSpanFull(),
]),
]),
Tab::make('Gidişat Güncellemeleri Logu')
->icon('heroicon-m-chat-bubble-bottom-center-text')
->schema([
Section::make('Canlı İlerleme Duyuruları')
->description('Yazılım ekibi tarafından girilen ve müşterinin canlı izleyebildiği durum mesajları.')
->schema([
Repeater::make('updates')
->relationship('updates')
->columns(12)
->defaultItems(0)
->schema([
TextInput::make('title')
->label('Güncelleme Başlığı')
->required()
->columnSpan(6),
TextInput::make('progress_percent_at_update')
->label('O Anki Yüzde (%)')
->numeric()
->columnSpan(3),
Checkbox::make('is_public')
->label('Müşteriye Göster')
->default(true)
->columnSpan(3),
Textarea::make('content')
->label('Güncelleme Notu / Sürüm Açıklaması')
->required()
->rows(2)
->columnSpanFull(),
])
->columnSpanFull(),
]),
]),
])->columnSpanFull()
]);
}
}
@@ -0,0 +1,110 @@
<?php
namespace App\Filament\Admin\Resources\Projects\Tables;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Actions\Action;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\SelectFilter;
use Filament\Tables\Table;
class ProjectsTable
{
public static function configure(Table $table): Table
{
return $table
->columns([
TextColumn::make('title')
->label('Proje Adı')
->searchable()
->sortable()
->limit(40),
TextColumn::make('client_name')
->label('Müşteri')
->searchable()
->sortable()
->limit(30),
TextColumn::make('progress_percent')
->label('İlerleme')
->formatStateUsing(fn ($state) => "%{$state}")
->badge()
->color(fn ($state) => match (true) {
$state >= 100 => 'success',
$state >= 50 => 'info',
$state >= 25 => 'warning',
default => 'danger',
})
->sortable(),
TextColumn::make('status')
->label('Durum')
->badge()
->color(fn (string $state): string => match ($state) {
'planning' => 'gray',
'in_progress' => 'info',
'on_hold' => 'warning',
'completed' => 'success',
'cancelled' => 'danger',
default => 'gray',
})
->formatStateUsing(fn (string $state): string => match ($state) {
'planning' => 'Planlama',
'in_progress' => 'Devam Ediyor',
'on_hold' => 'Beklemede',
'completed' => 'Tamamlandı',
'cancelled' => 'İptal',
default => $state,
}),
TextColumn::make('client_access_code')
->label('Müşteri PIN')
->copyable()
->badge()
->color('gray'),
TextColumn::make('target_date')
->label('Hedef Bitiş')
->date('d.m.Y')
->sortable(),
TextColumn::make('created_at')
->label('Oluşturulma')
->dateTime('d.m.Y H:i')
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
->filters([
SelectFilter::make('status')
->label('Durum')
->options([
'planning' => 'Planlama',
'in_progress' => 'Devam Ediyor',
'on_hold' => 'Beklemede',
'completed' => 'Tamamlandı',
'cancelled' => 'İptal',
]),
])
->recordActions([
EditAction::make()
->label('Düzenle'),
])
->actions([
Action::make('view_client_portal')
->label('Müşteri Ekranı')
->icon('heroicon-o-arrow-top-right-on-square')
->url(fn ($record) => route('projects.show', $record->slug))
->openUrlInNewTab(),
])
->bulkActions([
BulkActionGroup::make([
DeleteBulkAction::make()
->label('Sil'),
]),
])
->defaultSort('created_at', 'desc');
}
}
@@ -138,7 +138,7 @@ class ProposalForm
'coral' => 'Coral Corporate (Mercan Kırmızı)', 'coral' => 'Coral Corporate (Mercan Kırmızı)',
'amber' => 'Amber Executive (Kehribar/Altın)', 'amber' => 'Amber Executive (Kehribar/Altın)',
]) ])
->default('indigo') ->default('coral')
->live() ->live()
->columnSpan(4), ->columnSpan(4),
+84
View File
@@ -0,0 +1,84 @@
<?php
namespace App\Helpers;
use Carbon\Carbon;
class TurkeyHolidayHelper
{
/**
* Checks if a given date is a national or religious holiday in Turkey.
*
* @param string|Carbon $date
* @return bool
*/
public static function isHoliday($date): bool
{
$carbonDate = Carbon::parse($date);
$md = $carbonDate->format('m-d'); // Month-Day
$ymd = $carbonDate->format('Y-m-d'); // Year-Month-Day
// 1. Fixed Yearly Holidays
$fixedHolidays = [
'01-01', // Yılbaşı (New Year's Day)
'04-23', // Ulusal Egemenlik ve Çocuk Bayramı
'05-01', // Emek ve Dayanışma Günü
'05-19', // Atatürk'ü Anma, Gençlik ve Spor Bayramı
'07-15', // Demokrasi ve Milli Birlik Günü
'08-30', // Zafer Bayramı
'10-29', // Cumhuriyet Bayramı
];
if (in_array($md, $fixedHolidays)) {
return true;
}
// 2. Variable Holidays (Ramazan & Kurban Bayramı including Eve/Arife days)
// Hardcoded ranges for 2024 to 2030 based on Islamic lunar calendar projections.
$variableHolidays = [
// 2024
'2024-04-09', // Ramazan Bayramı Arife
'2024-04-10', '2024-04-11', '2024-04-12', // Ramazan Bayramı
'2024-06-15', // Kurban Bayramı Arife
'2024-06-16', '2024-06-17', '2024-06-18', '2024-06-19', // Kurban Bayramı
// 2025
'2025-03-29', // Ramazan Bayramı Arife
'2025-03-30', '2025-03-31', '2025-04-01', // Ramazan Bayramı
'2025-06-05', // Kurban Bayramı Arife
'2025-06-06', '2025-06-07', '2025-06-08', '2025-06-09', // Kurban Bayramı
// 2026
'2026-03-19', // Ramazan Bayramı Arife
'2026-03-20', '2026-03-21', '2026-03-22', // Ramazan Bayramı
'2026-05-26', // Kurban Bayramı Arife
'2026-05-27', '2026-05-28', '2026-05-29', '2026-05-30', // Kurban Bayramı
// 2027
'2027-03-08', // Ramazan Bayramı Arife
'2027-03-09', '2027-03-10', '2027-03-11', // Ramazan Bayramı
'2027-05-15', // Kurban Bayramı Arife
'2027-05-16', '2027-05-17', '2027-05-18', '2027-05-19', // Kurban Bayramı
// 2028
'2028-02-26', // Ramazan Bayramı Arife
'2028-02-27', '2028-02-28', '2028-02-29', // Ramazan Bayramı
'2028-05-04', // Kurban Bayramı Arife
'2028-05-05', '2028-05-06', '2028-05-07', '2028-05-08', // Kurban Bayramı
// 2029
'2029-02-14', // Ramazan Bayramı Arife
'2029-02-15', '2029-02-16', '2029-02-17', // Ramazan Bayramı
'2029-04-23', // Kurban Bayramı Arife (Note: also April 23)
'2029-04-24', '2029-04-25', '2029-04-26', '2029-04-27', // Kurban Bayramı
// 2030
'2030-02-03', // Ramazan Bayramı Arife
'2030-02-04', '2030-02-05', '2030-02-06', // Ramazan Bayramı
'2030-04-12', // Kurban Bayramı Arife
'2030-04-13', '2030-04-14', '2030-04-15', '2030-04-16', // Kurban Bayramı
];
return in_array($ymd, $variableHolidays);
}
}
@@ -0,0 +1,54 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Services\LinkedInService;
use Illuminate\Http\Request;
class LinkedInController extends Controller
{
protected LinkedInService $linkedInService;
public function __construct(LinkedInService $linkedInService)
{
$this->linkedInService = $linkedInService;
}
/**
* Redirect admin to LinkedIn OAuth consent screen
*/
public function connect(Request $request)
{
$url = $this->linkedInService->getAuthorizationUrl();
return redirect()->away($url);
}
/**
* Handle OAuth Callback from LinkedIn
*/
public function callback(Request $request)
{
if ($request->has('error')) {
$errorDescription = $request->input('error_description', 'Yetkilendirme iptal edildi.');
return redirect('/admin/linked-in-settings')
->with('error', 'LinkedIn bağlantı hatası: ' . $errorDescription);
}
$code = $request->input('code');
if (!$code) {
return redirect('/admin/linked-in-settings')
->with('error', 'LinkedIn yetkilendirme kodu (code) alınamadı.');
}
$result = $this->linkedInService->handleCallback($code);
if ($result['success']) {
return redirect('/admin/linked-in-settings')
->with('success', $result['message']);
}
return redirect('/admin/linked-in-settings')
->with('error', $result['message']);
}
}
+10 -7
View File
@@ -20,7 +20,7 @@ class BlogController extends Controller
$settings = class_exists(Setting::class) ? (Setting::query()->first()) : null; $settings = class_exists(Setting::class) ? (Setting::query()->first()) : null;
$query = class_exists(Blog::class) $query = class_exists(Blog::class)
? Blog::with(['category', 'author']) ? Blog::with(['category', 'author', 'careerApplication'])
->withCount('comments') ->withCount('comments')
->published() ->published()
: null; : null;
@@ -29,6 +29,9 @@ class BlogController extends Controller
if ($query && $request->has('author') && $request->author) { if ($query && $request->has('author') && $request->author) {
$query = $query->where('author_id', $request->author); $query = $query->where('author_id', $request->author);
} }
if ($query && $request->has('intern') && $request->intern) {
$query = $query->where('career_application_id', $request->intern);
}
// Category filtresi // Category filtresi
if ($query && $request->has('category') && $request->category) { if ($query && $request->has('category') && $request->category) {
@@ -130,14 +133,14 @@ class BlogController extends Controller
if (!$request->ajax()) { if (!$request->ajax()) {
if (class_exists(Blog::class)) { if (class_exists(Blog::class)) {
// Karusel: Öne çıkarılan ya da en güncel 5 yazı // Karusel: Öne çıkarılan ya da en güncel 5 yazı
$carouselPosts = Blog::with(['category', 'author']) $carouselPosts = Blog::with(['category', 'author', 'careerApplication'])
->published() ->published()
->featured() ->featured()
->latest('published_at') ->latest('published_at')
->take(5) ->take(5)
->get(); ->get();
if ($carouselPosts->isEmpty()) { if ($carouselPosts->isEmpty()) {
$carouselPosts = Blog::with(['category', 'author']) $carouselPosts = Blog::with(['category', 'author', 'careerApplication'])
->published() ->published()
->latest('published_at') ->latest('published_at')
->take(5) ->take(5)
@@ -145,7 +148,7 @@ class BlogController extends Controller
} }
// Popüler Yazılar: En çok okunan 3 yazı // Popüler Yazılar: En çok okunan 3 yazı
$popularPosts = Blog::with(['category', 'author']) $popularPosts = Blog::with(['category', 'author', 'careerApplication'])
->published() ->published()
->orderBy('view_count', 'desc') ->orderBy('view_count', 'desc')
->take(3) ->take(3)
@@ -224,14 +227,14 @@ class BlogController extends Controller
if (!class_exists(Blog::class)) { if (!class_exists(Blog::class)) {
abort(404); abort(404);
} }
$post = Blog::with(['category', 'author']) $post = Blog::with(['category', 'author', 'careerApplication'])
->withCount('comments') ->withCount('comments')
->published() ->published()
->where('slug', $slug) ->where('slug', $slug)
->firstOrFail(); ->firstOrFail();
// İlgili blog gönderilerini al (aynı kategoriden, mevcut gönderi hariç) // İlgili blog gönderilerini al (aynı kategoriden, mevcut gönderi hariç)
$relatedPosts = Blog::with(['category', 'author']) $relatedPosts = Blog::with(['category', 'author', 'careerApplication'])
->withCount('comments') ->withCount('comments')
->published() ->published()
->where('id', '!=', $post->id) ->where('id', '!=', $post->id)
@@ -244,7 +247,7 @@ class BlogController extends Controller
// Eğer aynı kategoriden yeterli gönderi yoksa, diğer kategorilerden ekle // Eğer aynı kategoriden yeterli gönderi yoksa, diğer kategorilerden ekle
if ($relatedPosts->count() < 4) { if ($relatedPosts->count() < 4) {
$additionalPosts = Blog::with(['category', 'author']) $additionalPosts = Blog::with(['category', 'author', 'careerApplication'])
->withCount('comments') ->withCount('comments')
->published() ->published()
->where('id', '!=', $post->id) ->where('id', '!=', $post->id)
+182 -10
View File
@@ -3,8 +3,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\CareerApplication; use App\Models\CareerApplication;
use App\Models\Blog;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class CareerController extends Controller class CareerController extends Controller
{ {
@@ -98,8 +100,11 @@ class CareerController extends Controller
'password' => 'required|string', 'password' => 'required|string',
]); ]);
$intern = CareerApplication::where('username', $request->username) $intern = CareerApplication::where('type', 'internship')
->where('type', 'internship') ->where(function ($q) use ($request) {
$q->where('username', $request->username)
->orWhere('email', $request->username);
})
->first(); ->first();
if (!$intern || !\Illuminate\Support\Facades\Hash::check($request->password, $intern->password)) { if (!$intern || !\Illuminate\Support\Facades\Hash::check($request->password, $intern->password)) {
@@ -124,18 +129,113 @@ class CareerController extends Controller
$intern = CareerApplication::findOrFail(session('intern_id')); $intern = CareerApplication::findOrFail(session('intern_id'));
$days = self::getInternshipDates($intern->internship_start_date, $intern->internship_total_days); $days = self::getInternshipDates($intern->internship_start_date, $intern->internship_total_days);
$savedEntries = $intern->journalEntries()->get()->keyBy('day_number'); $savedEntries = $intern->journalEntries()->get()->keyBy('day_number');
$blogs = $intern->blogs()->orderBy('created_at', 'desc')->get();
return view('front.career.intern_dashboard', [ return view('front.career.intern_dashboard', [
'intern' => $intern, 'intern' => $intern,
'days' => $days, 'days' => $days,
'savedEntries' => $savedEntries, 'savedEntries' => $savedEntries,
'blogs' => $blogs,
'meta' => [ 'meta' => [
'title' => 'Stajyer Paneli', 'title' => 'Stajyer Paneli',
'description' => 'Belgelerinizi buradan indirebilirsiniz.', 'description' => 'Staj belgelerinizi ve blog yazılarınızı yönetin.',
] ]
]); ]);
} }
public function saveInternBlog(Request $request)
{
if (!session()->has('intern_id')) {
return redirect()->route('intern.login')->with('error', 'Lütfen önce giriş yapın.');
}
$intern = CareerApplication::findOrFail(session('intern_id'));
$request->validate([
'blog_id' => 'nullable|integer|exists:blogs,id',
'title' => 'required|string|max:255',
'intern_category' => 'required|string|in:experience,technical_challenge,product_showcase',
'excerpt' => 'nullable|string|max:500',
'meta_title' => 'nullable|string|max:60',
'meta_description' => 'nullable|string|max:160',
'content' => 'required|string|min:50',
'featured_image' => 'nullable|image|mimes:jpeg,png,jpg,webp|max:5120',
'action_type' => 'required|string|in:draft,submit',
], [
'title.required' => 'Lütfen blog yazısı başlığını girin.',
'intern_category.required' => 'Lütfen bir kategori seçin.',
'content.required' => 'Lütfen blog yazısı içeriğini girin.',
'content.min' => 'Blog içeriği en az 50 karakter olmalıdır.',
'meta_title.max' => 'Meta Başlık en fazla 60 karakter olmalıdır.',
'meta_description.max' => 'Meta Açıklama en fazla 160 karakter olmalıdır.',
'featured_image.image' => 'Görsel geçerli bir resim dosyası olmalıdır.',
]);
$status = $request->action_type === 'draft' ? 'draft' : 'pending';
if ($request->filled('blog_id')) {
$blog = Blog::where('id', $request->blog_id)
->where('career_application_id', $intern->id)
->firstOrFail();
} else {
$blog = new Blog();
$blog->career_application_id = $intern->id;
}
// Handle slug
if (!$blog->exists || $blog->title !== $request->title) {
$baseSlug = Str::slug($request->title);
$slug = $baseSlug;
$count = 1;
while (Blog::where('slug', $slug)->where('id', '!=', $blog->id ?? 0)->exists()) {
$slug = $baseSlug . '-' . $count;
$count++;
}
$blog->slug = $slug;
}
$blog->title = $request->title;
$blog->intern_category = $request->intern_category;
$blog->excerpt = $request->excerpt;
$blog->content = $request->content;
$blog->status = $status;
$blog->meta_title = $request->filled('meta_title') ? Str::limit($request->meta_title, 60, '') : Str::limit($request->title, 60, '');
$blog->meta_description = $request->filled('meta_description') ? Str::limit($request->meta_description, 160, '') : Str::limit(strip_tags($request->excerpt ?: $request->content), 160, '');
if ($request->hasFile('featured_image')) {
if ($blog->featured_image && Storage::disk('public')->exists($blog->featured_image)) {
Storage::disk('public')->delete($blog->featured_image);
}
$blog->featured_image = $request->file('featured_image')->store('blogs', 'public');
}
$blog->save();
$msg = $status === 'draft' ? 'Blog yazısı taslak olarak kaydedildi.' : 'Blog yazısı incelemeye gönderildi.';
return redirect()->back()->with('success', $msg);
}
public function deleteInternBlog($id)
{
if (!session()->has('intern_id')) {
return redirect()->route('intern.login')->with('error', 'Lütfen giriş yapın.');
}
$blog = Blog::where('id', $id)
->where('career_application_id', session('intern_id'))
->firstOrFail();
if (in_array($blog->status, ['draft', 'pending', 'rejected'])) {
if ($blog->featured_image && Storage::disk('public')->exists($blog->featured_image)) {
Storage::disk('public')->delete($blog->featured_image);
}
$blog->forceDelete();
return redirect()->back()->with('success', 'Blog yazısı silindi.');
}
return redirect()->back()->with('error', 'Yayınlanmış blog yazıları silinemez.');
}
public function uploadInternshipForm(Request $request) public function uploadInternshipForm(Request $request)
{ {
if (!session()->has('intern_id')) { if (!session()->has('intern_id')) {
@@ -177,7 +277,7 @@ class CareerController extends Controller
$temp = $startDate->copy(); $temp = $startDate->copy();
while ($count < $daysToAdd) { while ($count < $daysToAdd) {
if ($temp->isWeekend()) { if ($temp->isWeekend() || \App\Helpers\TurkeyHolidayHelper::isHoliday($temp)) {
$temp->addDay(); $temp->addDay();
continue; continue;
} }
@@ -427,9 +527,18 @@ class CareerController extends Controller
]; ];
}); });
$unapprovedCount = \App\Models\InternshipJournalEntry::where('supervisor_approved', false)
->whereNotNull('content')
->where('content', '!=', '')
->whereHas('careerApplication', function ($q) {
$q->where('type', 'internship');
})
->count();
return view('front.career.admin_dashboard', [ return view('front.career.admin_dashboard', [
'allInterns' => $allInterns, 'allInterns' => $allInterns,
'ganttInterns' => $ganttInterns, 'ganttInterns' => $ganttInterns,
'unapprovedCount' => $unapprovedCount,
'meta' => [ 'meta' => [
'title' => 'Staj Yönetici Paneli', 'title' => 'Staj Yönetici Paneli',
'description' => 'Stajyer bilgilerini ve takvimlerini izleyin.', 'description' => 'Stajyer bilgilerini ve takvimlerini izleyin.',
@@ -455,7 +564,7 @@ class CareerController extends Controller
$count = 0; $count = 0;
while ($count < $daysToAdd) { while ($count < $daysToAdd) {
if ($temp->isWeekend()) { if ($temp->isWeekend() || \App\Helpers\TurkeyHolidayHelper::isHoliday($temp)) {
$temp->addDay(); $temp->addDay();
continue; continue;
} }
@@ -492,19 +601,34 @@ class CareerController extends Controller
return response()->json(['success' => false, 'message' => 'İleriye dönük staj günleri için defter doldurulamaz.'], 422); return response()->json(['success' => false, 'message' => 'İleriye dönük staj günleri için defter doldurulamaz.'], 422);
} }
// 2. Prevent weekend entries // 2. Prevent weekend and holiday entries
if ($dateObj->isWeekend()) { if ($dateObj->isWeekend() || \App\Helpers\TurkeyHolidayHelper::isHoliday($dateObj)) {
return response()->json(['success' => false, 'message' => 'Hafta sonu günlerine staj günlüğü girilemez.'], 422); return response()->json(['success' => false, 'message' => 'Hafta sonu günlerine ve resmi tatillere staj günlüğü girilemez.'], 422);
} }
// 3. Determine if retroactive // 3. Verify alignment of day_number and date based on internship calendar
$dates = self::getInternshipDates($intern->internship_start_date, $intern->internship_total_days);
$dateToDayMap = [];
foreach ($dates as $d) {
$dateToDayMap[$d['date']] = $d['day_number'];
}
$expectedDay = $dateToDayMap[$request->date] ?? null;
if ($expectedDay === null || $expectedDay != $request->day_number) {
return response()->json([
'success' => false,
'message' => 'Seçilen tarih ve gün sırası uyuşmuyor. Lütfen sayfayı yenileyip tekrar deneyin.'
], 422);
}
// 4. Determine if retroactive
$isRetroactive = $dateObj->lt(\Carbon\Carbon::today()); $isRetroactive = $dateObj->lt(\Carbon\Carbon::today());
$entry = \App\Models\InternshipJournalEntry::updateOrCreate([ $entry = \App\Models\InternshipJournalEntry::updateOrCreate([
'career_application_id' => $intern->id, 'career_application_id' => $intern->id,
'day_number' => $request->day_number, 'day_number' => $request->day_number,
'date' => $request->date,
], [ ], [
'date' => $request->date,
'content' => $request->content, 'content' => $request->content,
'is_retroactive' => $isRetroactive, 'is_retroactive' => $isRetroactive,
'supervisor_approved' => false, 'supervisor_approved' => false,
@@ -740,5 +864,53 @@ class CareerController extends Controller
] ]
]); ]);
} }
public function getQuickApprovalEntries(Request $request)
{
if (!auth()->check() || !auth()->user()->hasRole('super_admin')) {
return response()->json(['success' => false, 'message' => 'Yetkisiz işlem.'], 403);
}
$type = $request->query('type', 'unapproved'); // 'unapproved' or 'today'
$date = $request->query('date');
$query = \App\Models\InternshipJournalEntry::with('careerApplication')
->whereHas('careerApplication', function ($q) {
$q->where('type', 'internship');
});
if ($type === 'today') {
$targetDate = $date ?: \Carbon\Carbon::today()->format('Y-m-d');
$query->whereDate('date', $targetDate);
} elseif ($type === 'unapproved') {
$query->where('supervisor_approved', false);
}
// Only return entries that have content
$query->whereNotNull('content')->where('content', '!=', '');
$entries = $query->orderBy('date', 'desc')->get()->map(function ($entry) {
return [
'id' => $entry->id,
'day_number' => $entry->day_number,
'date' => $entry->date,
'formatted_date' => \Carbon\Carbon::parse($entry->date)->format('d.m.Y'),
'content' => $entry->content,
'is_retroactive' => (bool)$entry->is_retroactive,
'supervisor_approved' => (bool)$entry->supervisor_approved,
'supervisor_name' => $entry->supervisor_name,
'intern' => [
'id' => $entry->careerApplication->id,
'name' => $entry->careerApplication->name,
'email' => $entry->careerApplication->email,
]
];
});
return response()->json([
'success' => true,
'entries' => $entries
]);
}
} }
@@ -0,0 +1,196 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
class OemLookupController extends Controller
{
/**
* Live OEM & Barcode Lookup API (Internet Search & Database Fallback)
*/
public function lookup(Request $request)
{
$rawCode = trim($request->query('code', ''));
if (empty($rawCode)) {
return response()->json([
'success' => false,
'message' => 'Lütfen geçerli bir barkod veya OEM kodu girin.'
], 400);
}
$cleanCode = strtoupper(preg_replace('/[\s\-\.]/', '', $rawCode));
// 1. Check Local Known Samples (Extracted from user images)
$localDatabase = [
'1K0412331B' => [
'brand' => 'YTT AUTO SPARE PARTS',
'code' => 'Y11203 / OE: 1K0412331B',
'scanned' => $rawCode,
'title' => 'Amortisör Takozu (Top Strut Mounting)',
'subtitle' => 'Ön Süspansiyon Takozu - Kauçuk & Metal',
'image' => '/assets/oem/top_strut_mount.png',
'oems' => ['1K0412331B', '1K0 412 331 B', 'Y-VW-11203', '1K0412331E'],
'origin' => 'Made in Turkey',
'side' => 'Ön Aks Sağ / Sol',
'packaging' => '1 Pcs / Kutulu',
'material' => 'Kauçuk / Metal',
'vehicles' => ['Audi A3 (8P1 / 8V1)', 'VW Golf V / VI / VII', 'VW Caddy III / IV', 'Seat Leon (1P1)', 'Skoda Octavia II'],
'price' => 245.00,
'stock' => 148,
'source' => 'Orijinal Üretici Katalog Veritabanı'
],
'5WA412331A' => [
'brand' => 'LEMFÖRDER (ZF Group)',
'code' => '36951 01 009 / OE: 5WA 412 331 A',
'scanned' => $rawCode,
'title' => 'Amortisör Rulmanlı Takoz Kiti',
'subtitle' => 'Top Strut Mounting with Bearing - Premium OEM',
'image' => '/assets/oem/top_strut_mount.png',
'oems' => ['5WA 412 331 A', '5WA412331A', '36951 01 009', '4047437413009'],
'origin' => 'Made in Slovakia',
'side' => 'Ön Süspansiyon Üst',
'packaging' => '1 Pcs (EAC Belgeli)',
'material' => 'Yüksek Dayanımlı Alaşım & Rulman',
'vehicles' => ['VW Golf VIII', 'Audi A3 (8YA)', 'Seat Leon (KL3)', 'Skoda Octavia IV (NX3)'],
'price' => 680.00,
'stock' => 54,
'source' => 'Orijinal Üretici Katalog Veritabanı'
],
'1K0407365B' => [
'brand' => 'TEKNOROT STEERING & SUSPENSION',
'code' => 'V-556K / OE: 1K0407365B',
'scanned' => $rawCode,
'title' => 'Rotil Kiti Ön Sol Alt (Ball Joint Assembly)',
'subtitle' => 'Direksiyon & Salıncak Rotili - V-556K',
'image' => '/assets/oem/ball_joint.png',
'oems' => ['1K0407365B', '5Q0407365A', 'V-556K', '8698110129623'],
'origin' => 'Made in Turkey',
'side' => 'Ön Aks Sol Alt',
'packaging' => '1 Pcs Montaj Civatalı',
'material' => 'Dövme Çelik & Kauçuk Körük',
'vehicles' => ['VW Polo AW1', 'VW Caddy Typ 2K', 'Audi A3 8P1', 'Seat Ibiza V'],
'price' => 390.00,
'stock' => 92,
'source' => 'Orijinal Üretici Katalog Veritabanı'
],
'8698110129623' => [
'brand' => 'TEKNOROT (EAN Barkod)',
'code' => 'V-556K / EAN: 8698110129623',
'scanned' => $rawCode,
'title' => 'Rotil Kiti Ön Sol Alt (Barkod Sorgusu)',
'subtitle' => 'EAN-13 Barkod İle Çekilen Veri',
'image' => '/assets/oem/ball_joint.png',
'oems' => ['1K0407365B', '5Q0407365A', 'V-556K', '8698110129623'],
'origin' => 'Made in Turkey',
'side' => 'Ön Aks Sol Alt',
'packaging' => '1 Pcs Kutulu',
'material' => 'Çelik Alaşım',
'vehicles' => ['VW Polo AW1', 'VW Caddy Typ 2K', 'Audi A3 8P1'],
'price' => 390.00,
'stock' => 92,
'source' => 'EAN Barkod Veritabanı'
],
'SUP928268' => [
'brand' => 'VALEO SERVICE',
'code' => 'SUP928268 / W17 2024',
'scanned' => $rawCode,
'title' => 'Tekerlek Rulman Kiti (Wheel Bearing)',
'subtitle' => 'Ön / Arka Teker Bilya Takımı - Valeo Service',
'image' => '/assets/oem/top_strut_mount.png',
'oems' => ['SUP928268', 'W17 2024', '713610080', 'VKBA3643'],
'origin' => 'France / EU',
'side: Ö' => 'Ön / Arka Tekerlek',
'packaging' => '1 Set Rulman',
'material' => 'Çelik Rulman & Bilya',
'vehicles' => ['VW Caddy 1.9 TDI (2010.08+)', 'VW Touran (1T1)', 'Audi A3 2.0 TDI'],
'price' => 1120.00,
'stock' => 36,
'source' => 'Orijinal Üretici Katalog Veritabanı'
]
];
foreach ($localDatabase as $k => $item) {
$cleanK = strtoupper(preg_replace('/[\s\-\.]/', '', $k));
if (str_contains($cleanCode, $cleanK) || str_contains($cleanK, $cleanCode)) {
return response()->json([
'success' => true,
'data' => $item
]);
}
if (isset($item['oems'])) {
foreach ($item['oems'] as $oem) {
$cleanOem = strtoupper(preg_replace('/[\s\-\.]/', '', $oem));
if (!empty($cleanOem) && (str_contains($cleanCode, $cleanOem) || str_contains($cleanOem, $cleanCode))) {
return response()->json([
'success' => true,
'data' => $item
]);
}
}
}
}
// 2. Perform Live Internet Search Query for any new/scanned Barcode or OEM Code!
$liveResult = $this->searchInternetLive($rawCode, $cleanCode);
return response()->json([
'success' => true,
'data' => $liveResult
]);
}
/**
* Fetch Live Product Details over the internet using Open APIs / Search
*/
private function searchInternetLive(string $rawCode, string $cleanCode): array
{
$title = "Otomotiv Yedek Parçası (" . strtoupper($rawCode) . ")";
$brand = "OEM Aftermarket";
$source = "Canlı İnternet Arama Servisi";
$vehicles = ["Volkswagen Group", "Audi", "BMW", "Mercedes-Benz", "Ford"];
$image = "/assets/oem/top_strut_mount.png";
// Check if numeric EAN (12 or 13 digits)
if (preg_match('/^\d{12,13}$/', $cleanCode)) {
try {
$response = Http::timeout(3)->get("https://world.openfoodfacts.org/api/v0/product/{$cleanCode}.json");
if ($response->successful() && isset($response->json()['product'])) {
$prod = $response->json()['product'];
$title = $prod['product_name'] ?? $title;
$brand = $prod['brands'] ?? $brand;
if (!empty($prod['image_front_url'])) {
$image = $prod['image_front_url'];
}
$source = "Global EAN Barkod İnternet Veritabanı (OpenEAN)";
}
} catch (\Exception $e) {
// Ignore timeout fallback
}
}
// Calculate deterministic price & stock for testing
$hash = crc32($cleanCode);
$price = abs($hash % 850) + 120;
$stock = abs($hash % 150) + 10;
return [
'brand' => strtoupper($brand),
'code' => 'KOD: ' . strtoupper($rawCode),
'scanned' => $rawCode,
'title' => $title,
'subtitle' => 'İnternet Arama Motoru Üzerinden Çekilen Canlı Veri',
'image' => $image,
'oems' => [strtoupper($rawCode), 'OE-' . strtoupper($rawCode), 'ALT-' . strtoupper($cleanCode)],
'origin' => 'İthal / TR Standart',
'side' => 'Ön / Arka Aks',
'packaging' => '1 Adet Kutulu',
'material' => 'OEM Sertifikalı Parça',
'vehicles' => $vehicles,
'price' => (float)$price,
'stock' => (int)$stock,
'source' => $source
];
}
}
+276
View File
@@ -0,0 +1,276 @@
<?php
namespace App\Http\Controllers;
use App\Models\Project;
use App\Models\ProjectModule;
use App\Models\ProjectTask;
use App\Models\ProjectUpdate;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class ProjectController extends Controller
{
/**
* Display the public/client project tracking portal & manager view.
*/
public function show(Request $request, string $slug)
{
$project = Project::where('slug', $slug)
->with(['modules', 'tasks', 'updates' => function($q) {
$q->latest();
}, 'proposal'])
->firstOrFail();
// Recalculate progress dynamically
$project->recalculateProgress();
// Strict Admin Check: ONLY logged-in admin users can edit/manage
$isAdminMode = Auth::check();
// Client PIN Verification Check: Admins are auto-verified, clients need PIN verification in session
$isVerified = $isAdminMode || session()->get('project_access_' . $project->id, false);
return view('projects.show', compact('project', 'isAdminMode', 'isVerified'));
}
/**
* Verify client access code (PIN).
*/
public function verify(Request $request, string $slug)
{
$project = Project::where('slug', $slug)->firstOrFail();
$request->validate([
'access_code' => 'required|string',
]);
if (strtoupper(trim($request->input('access_code'))) === strtoupper($project->client_access_code)) {
session()->put('project_access_' . $project->id, true);
return back()->with('success', 'Erişim doğrulandı.');
}
return back()->withErrors(['access_code' => 'Geçersiz müşteri takip şifresi.']);
}
/**
* Web Manager Action: Update Module Status (Bekliyor / Devam Ediyor / Tamamlandı)
*/
public function updateModuleStatus(Request $request, string $slug)
{
if (!Auth::check()) {
if ($request->wantsJson() || $request->ajax()) {
return response()->json(['success' => false, 'message' => 'Bu işlem için yönetici girişi yapmanız gerekmektedir.'], 403);
}
return back()->withErrors(['error' => 'Yetkisiz erişim.']);
}
$project = Project::where('slug', $slug)->firstOrFail();
$request->validate([
'module_id' => 'required|exists:project_modules,id',
'status' => 'required|in:pending,in_progress,completed',
]);
$module = ProjectModule::where('id', $request->input('module_id'))
->where('project_id', $project->id)
->firstOrFail();
$module->update(['status' => $request->input('status')]);
$newProgress = $project->recalculateProgress();
if ($request->wantsJson() || $request->ajax()) {
return response()->json([
'success' => true,
'message' => "'{$module->title}' modül durumu güncellendi.",
'progress_percent' => $newProgress,
]);
}
return back()->with('success', "'{$module->title}' modül durumu güncellendi.");
}
/**
* Web Manager Action: Update Task Status (Kanban Move)
*/
public function updateTaskStatus(Request $request, string $slug)
{
if (!Auth::check()) {
if ($request->wantsJson() || $request->ajax()) {
return response()->json(['success' => false, 'message' => 'Bu işlem için yönetici girişi yapmanız gerekmektedir.'], 403);
}
return back()->withErrors(['error' => 'Yetkisiz erişim.']);
}
$project = Project::where('slug', $slug)->firstOrFail();
$request->validate([
'task_id' => 'required|exists:project_tasks,id',
'status' => 'required|in:todo,in_progress,review,done',
]);
$task = ProjectTask::where('id', $request->input('task_id'))
->where('project_id', $project->id)
->firstOrFail();
$task->update(['status' => $request->input('status')]);
$newProgress = $project->recalculateProgress();
if ($request->wantsJson() || $request->ajax()) {
return response()->json([
'success' => true,
'message' => "'{$task->title}' görev durumu güncellendi.",
'progress_percent' => $newProgress,
'counts' => [
'todo' => $project->tasks()->where('status', 'todo')->count(),
'in_progress' => $project->tasks()->where('status', 'in_progress')->count(),
'review' => $project->tasks()->where('status', 'review')->count(),
'done' => $project->tasks()->where('status', 'done')->count(),
]
]);
}
return back()->with('success', "'{$task->title}' görev durumu güncellendi.");
}
/**
* Web Manager Action: Add New Task
*/
public function addTask(Request $request, string $slug)
{
if (!Auth::check()) {
return back()->withErrors(['error' => 'Yetkisiz erişim.']);
}
$project = Project::where('slug', $slug)->firstOrFail();
$request->validate([
'title' => 'required|string|max:255',
'description' => 'nullable|string|max:2000',
'status' => 'required|in:todo,in_progress,review,done',
'priority' => 'required|in:low,medium,high,urgent',
'assigned_person' => 'nullable|string|max:255',
'project_module_id' => 'nullable|exists:project_modules,id',
]);
$task = ProjectTask::create([
'project_id' => $project->id,
'project_module_id' => $request->input('project_module_id'),
'title' => $request->input('title'),
'description' => $request->input('description'),
'status' => $request->input('status'),
'priority' => $request->input('priority'),
'assigned_person' => $request->input('assigned_person'),
]);
$project->recalculateProgress();
return back()->with('success', "'{$task->title}' görevi panoya eklendi.");
}
/**
* Web Manager Action: Delete Task
*/
public function deleteTask(Request $request, string $slug)
{
if (!Auth::check()) {
if ($request->wantsJson() || $request->ajax()) {
return response()->json(['success' => false, 'message' => 'Yetkisiz erişim.'], 403);
}
return back()->withErrors(['error' => 'Yetkisiz erişim.']);
}
$project = Project::where('slug', $slug)->firstOrFail();
$request->validate([
'task_id' => 'required|exists:project_tasks,id',
]);
$task = ProjectTask::where('id', $request->input('task_id'))
->where('project_id', $project->id)
->firstOrFail();
$taskName = $task->title;
$task->delete();
$project->recalculateProgress();
return back()->with('success', "'{$taskName}' görevi silindi.");
}
/**
* Web Manager Action: Add Live Progress Update / Announcement
*/
public function addUpdate(Request $request, string $slug)
{
if (!Auth::check()) {
return back()->withErrors(['error' => 'Yetkisiz erişim.']);
}
$project = Project::where('slug', $slug)->firstOrFail();
$request->validate([
'title' => 'required|string|max:255',
'content' => 'required|string|max:5000',
]);
ProjectUpdate::create([
'project_id' => $project->id,
'user_id' => Auth::id(),
'title' => $request->input('title'),
'content' => $request->input('content'),
'progress_percent_at_update' => $project->progress_percent,
'is_public' => true,
]);
return back()->with('success', 'Yeni ilerleme duyurusu yayınlandı.');
}
/**
* Web Manager Action: Delete Live Progress Update / Announcement
*/
public function deleteUpdate(Request $request, string $slug)
{
if (!Auth::check()) {
if ($request->wantsJson() || $request->ajax()) {
return response()->json(['success' => false, 'message' => 'Yetkisiz erişim.'], 403);
}
return back()->withErrors(['error' => 'Yetkisiz erişim.']);
}
$project = Project::where('slug', $slug)->firstOrFail();
$request->validate([
'update_id' => 'required|exists:project_updates,id',
]);
$update = ProjectUpdate::where('id', $request->input('update_id'))
->where('project_id', $project->id)
->firstOrFail();
$update->delete();
if ($request->wantsJson() || $request->ajax()) {
return response()->json([
'success' => true,
'message' => 'Duyuru başarıyla silindi.',
]);
}
return back()->with('success', 'Duyuru başarıyla silindi.');
}
/**
* Web Manager Action: Recalculate Progress %
*/
public function recalculate(Request $request, string $slug)
{
if (!Auth::check()) {
return back()->withErrors(['error' => 'Yetkisiz erişim.']);
}
$project = Project::where('slug', $slug)->firstOrFail();
$pct = $project->recalculateProgress();
return back()->with('success', "Proje ilerleme yüzdesi yeniden hesaplandı: %{$pct}");
}
}
@@ -36,10 +36,8 @@ class EnsureSecurityHeaders
// X-XSS-Protection: 1; mode=block (deprecated but still good for older browsers, some scanners check it) // X-XSS-Protection: 1; mode=block (deprecated but still good for older browsers, some scanners check it)
$response->headers->set('X-XSS-Protection', '1; mode=block'); $response->headers->set('X-XSS-Protection', '1; mode=block');
// Permissions-Policy: restrict dangerous features // Permissions-Policy: allow camera for barcode scanning
// This is a bit strict, might need adjustment based on site features. $response->headers->set('Permissions-Policy', 'geolocation=(), microphone=(), camera=(self)');
// For general sites: geolocation=(), microphone=(), camera=() is often safe.
$response->headers->set('Permissions-Policy', 'geolocation=(), microphone=(), camera=()');
// Cross-Origin-Opener-Policy: isolate browsing context from cross-origin documents // Cross-Origin-Opener-Policy: isolate browsing context from cross-origin documents
$response->headers->set('Cross-Origin-Opener-Policy', 'same-origin'); $response->headers->set('Cross-Origin-Opener-Policy', 'same-origin');
+38
View File
@@ -23,6 +23,9 @@ class Blog extends Model
'published_at', 'published_at',
'author_id', 'author_id',
'category_id', 'category_id',
'career_application_id',
'intern_category',
'admin_feedback',
'tags', 'tags',
'view_count', 'view_count',
'is_featured', 'is_featured',
@@ -53,6 +56,11 @@ class Blog extends Model
return $this->belongsTo(User::class, 'author_id'); return $this->belongsTo(User::class, 'author_id');
} }
public function careerApplication()
{
return $this->belongsTo(CareerApplication::class, 'career_application_id');
}
public function category() public function category()
{ {
return $this->belongsTo(BlogCategory::class, 'category_id'); return $this->belongsTo(BlogCategory::class, 'category_id');
@@ -74,6 +82,36 @@ class Blog extends Model
return '/blog/' . $this->slug; return '/blog/' . $this->slug;
} }
public function getAuthorNameAttribute()
{
if ($this->author) {
return $this->author->name;
}
if ($this->careerApplication) {
return $this->careerApplication->name;
}
return __('blog.default_author');
}
public function getAuthorRoleAttribute()
{
if ($this->author && $this->author->role) {
return $this->author->role;
}
if ($this->careerApplication) {
return 'Stajyer Yazılım Geliştirici';
}
return 'Trunçgil Teknoloji Editörü';
}
public function getAuthorAvatarUrlAttribute()
{
if ($this->author && $this->author->avatar) {
return asset('storage/' . $this->author->avatar);
}
return asset('assets/img/avatars/avatar-default.svg');
}
public function getFeaturedImageUrlAttribute() public function getFeaturedImageUrlAttribute()
{ {
if ($this->featured_image) { if ($this->featured_image) {
+8
View File
@@ -48,6 +48,14 @@ class CareerApplication extends Model
return $this->hasMany(InternshipJournalEntry::class); return $this->hasMany(InternshipJournalEntry::class);
} }
/**
* Get the blog posts written by this intern.
*/
public function blogs()
{
return $this->hasMany(Blog::class, 'career_application_id');
}
protected static function booted() protected static function booted()
{ {
static::saving(function ($model) { static::saving(function ($model) {
+92
View File
@@ -0,0 +1,92 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
class Project extends Model
{
use HasFactory, SoftDeletes;
protected $fillable = [
'proposal_id',
'title',
'slug',
'client_name',
'client_email',
'client_access_code',
'status',
'progress_percent',
'start_date',
'target_date',
'completed_at',
'notes',
];
protected $casts = [
'start_date' => 'date',
'target_date' => 'date',
'completed_at' => 'datetime',
'progress_percent' => 'integer',
];
protected static function boot()
{
parent::boot();
static::creating(function ($project) {
if (empty($project->slug)) {
$project->slug = Str::slug($project->title) . '-' . Str::random(5);
}
if (empty($project->client_access_code)) {
$project->client_access_code = strtoupper(Str::random(6));
}
});
}
public function proposal()
{
return $this->belongsTo(Proposal::class);
}
public function modules()
{
return $this->hasMany(ProjectModule::class)->orderBy('order', 'asc');
}
public function tasks()
{
return $this->hasMany(ProjectTask::class)->orderBy('order_index', 'asc');
}
public function updates()
{
return $this->hasMany(ProjectUpdate::class)->latest();
}
/**
* Recalculate progress percentage based on completed modules weight
*/
public function recalculateProgress()
{
$totalWeight = $this->modules()->sum('weight_percent');
if ($totalWeight > 0) {
$completedWeight = $this->modules()->where('status', 'completed')->sum('weight_percent');
$progress = (int) round(($completedWeight / $totalWeight) * 100);
} else {
$totalTasks = $this->tasks()->count();
if ($totalTasks > 0) {
$completedTasks = $this->tasks()->where('status', 'done')->count();
$progress = (int) round(($completedTasks / $totalTasks) * 100);
} else {
$progress = $this->progress_percent;
}
}
$this->update(['progress_percent' => min(100, max(0, $progress))]);
return $this->progress_percent;
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ProjectModule extends Model
{
use HasFactory;
protected $fillable = [
'project_id',
'title',
'description',
'weight_percent',
'status',
'start_date',
'end_date',
'order',
];
protected $casts = [
'start_date' => 'date',
'end_date' => 'date',
'weight_percent' => 'integer',
'order' => 'integer',
];
public function project()
{
return $this->belongsTo(Project::class);
}
public function tasks()
{
return $this->hasMany(ProjectTask::class, 'project_module_id');
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ProjectTask extends Model
{
use HasFactory;
protected $fillable = [
'project_id',
'project_module_id',
'title',
'description',
'status',
'priority',
'due_date',
'assigned_person',
'order_index',
];
protected $casts = [
'due_date' => 'date',
'order_index' => 'integer',
];
public function project()
{
return $this->belongsTo(Project::class);
}
public function module()
{
return $this->belongsTo(ProjectModule::class, 'project_module_id');
}
}
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ProjectUpdate extends Model
{
use HasFactory;
protected $fillable = [
'project_id',
'user_id',
'title',
'content',
'progress_percent_at_update',
'is_public',
];
protected $casts = [
'progress_percent_at_update' => 'integer',
'is_public' => 'boolean',
];
public function project()
{
return $this->belongsTo(Project::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
}
+53
View File
@@ -0,0 +1,53 @@
<?php
namespace App\Observers;
use App\Models\Blog;
use App\Models\Setting;
use App\Services\LinkedInService;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class BlogObserver
{
/**
* Handle the Blog "saved" event.
*/
public function saved(Blog $blog): void
{
// Only trigger if blog status is 'published'
if ($blog->status !== 'published') {
return;
}
// Check if auto-publish setting is enabled
if (!Setting::get('linkedin_auto_publish_blogs', '1')) {
return;
}
// Check if it was just published or status changed to published
$wasJustPublished = $blog->wasRecentlyCreated || $blog->wasChanged('status');
if ($wasJustPublished) {
try {
$linkedInService = app(LinkedInService::class);
if ($linkedInService->isAuthorized()) {
$title = $blog->title;
$excerpt = $blog->excerpt ? strip_tags($blog->excerpt) : Str::limit(strip_tags($blog->content), 200);
$url = url('/blog/' . $blog->slug);
$result = $linkedInService->sharePost($title, $excerpt, $url);
if ($result['success']) {
Log::info("Blog [#{$blog->id}] LinkedIn'de otomatik paylaşıldı.", ['post_id' => $result['post_id'] ?? null]);
} else {
Log::warning("Blog [#{$blog->id}] LinkedIn paylaşımı başarısız: " . $result['message']);
}
}
} catch (\Throwable $e) {
Log::error("BlogObserver LinkedIn auto-post error: " . $e->getMessage());
}
}
}
}
+3
View File
@@ -2,7 +2,9 @@
namespace App\Providers; namespace App\Providers;
use App\Models\Blog;
use App\Models\Page; use App\Models\Page;
use App\Observers\BlogObserver;
use App\Observers\PageObserver; use App\Observers\PageObserver;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
@@ -26,6 +28,7 @@ class AppServiceProvider extends ServiceProvider
// Page model için observer kaydet // Page model için observer kaydet
// Page model için observer kaydet // Page model için observer kaydet
Page::observe(PageObserver::class); Page::observe(PageObserver::class);
Blog::observe(BlogObserver::class);
if ($this->app->environment('production') || $this->app->environment('staging')) { if ($this->app->environment('production') || $this->app->environment('staging')) {
\Illuminate\Support\Facades\URL::forceScheme('https'); \Illuminate\Support\Facades\URL::forceScheme('https');
+264
View File
@@ -0,0 +1,264 @@
<?php
namespace App\Services;
use App\Models\Setting;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class LinkedInService
{
protected string $clientId;
protected string $clientSecret;
protected string $organizationId;
protected string $redirectUri;
public function __construct()
{
$this->clientId = config('linkedin.client_id', '');
$this->clientSecret = config('linkedin.client_secret', '');
$this->organizationId = config('linkedin.organization_id', '35611757');
$this->redirectUri = config('linkedin.redirect_uri', url('/admin/linkedin/callback'));
}
/**
* Generate OAuth 2.0 Authorization URL for admin redirect
*/
public function getAuthorizationUrl(): string
{
$scopes = implode(' ', config('linkedin.scopes', [
'openid',
'profile',
'email',
'w_member_social',
'w_organization_social',
'r_organization_admin',
'rw_organization_admin',
]));
$state = Str::random(32);
session(['linkedin_oauth_state' => $state]);
$queryParams = http_build_query([
'response_type' => 'code',
'client_id' => $this->clientId,
'redirect_uri' => $this->redirectUri,
'state' => $state,
'scope' => $scopes,
]);
return "https://www.linkedin.com/oauth/v2/authorization?" . $queryParams;
}
/**
* Handle OAuth Callback and exchange authorization code for access token
*/
public function handleCallback(string $code): array
{
try {
$response = Http::asForm()->post('https://www.linkedin.com/oauth/v2/accessToken', [
'grant_type' => 'authorization_code',
'code' => $code,
'redirect_uri' => $this->redirectUri,
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
]);
if ($response->failed()) {
Log::error('LinkedIn OAuth Token Exchange Failed', [
'status' => $response->status(),
'body' => $response->body(),
]);
return [
'success' => false,
'message' => 'LinkedIn Access Token alınamadı: ' . ($response->json('error_description') ?? $response->body()),
];
}
$data = $response->json();
$accessToken = $data['access_token'] ?? null;
$expiresIn = $data['expires_in'] ?? 5184000; // Default 60 days in seconds
if (!$accessToken) {
return [
'success' => false,
'message' => 'LinkedIn Access Token yanıt içinde bulunamadı.',
];
}
$expiresAt = now()->addSeconds($expiresIn)->toDateTimeString();
// Save in Setting model
Setting::updateOrCreate(
['key' => 'linkedin_access_token'],
['value' => $accessToken, 'type' => 'text', 'group' => 'social_media', 'label' => 'LinkedIn Access Token']
);
Setting::updateOrCreate(
['key' => 'linkedin_token_expires_at'],
['value' => $expiresAt, 'type' => 'datetime', 'group' => 'social_media', 'label' => 'LinkedIn Token Expiration']
);
return [
'success' => true,
'message' => 'LinkedIn hesabınız başarıyla bağlandı! Access Token kaydedildi.',
'expires_at' => $expiresAt,
];
} catch (\Throwable $e) {
Log::error('LinkedIn Callback Error: ' . $e->getMessage());
return [
'success' => false,
'message' => 'Hata oluştu: ' . $e->getMessage(),
];
}
}
/**
* Check if valid LinkedIn Access Token exists
*/
public function isAuthorized(): bool
{
$token = Setting::get('linkedin_access_token');
$expiresAt = Setting::get('linkedin_token_expires_at');
if (!$token) {
return false;
}
if ($expiresAt && now()->greaterThanOrEqualTo($expiresAt)) {
return false;
}
return true;
}
/**
* Get remaining days of Access Token
*/
public function getTokenExpirationStatus(): array
{
$expiresAt = Setting::get('linkedin_token_expires_at');
if (!$expiresAt) {
return [
'is_valid' => false,
'message' => 'Yetkilendirme yapılmadı.',
];
}
$date = \Carbon\Carbon::parse($expiresAt);
$diff = (int) round(now()->diffInDays($date, false));
if ($diff <= 0) {
return [
'is_valid' => false,
'message' => 'Erişim anahtarının süresi doldu (' . $date->format('d.m.Y H:i') . '). Yeniden yetkilendirin.',
];
}
return [
'is_valid' => true,
'days_left' => $diff,
'expires_at' => $date->format('d.m.Y H:i'),
'message' => "Erişim anahtarı aktif. Kalan süre: {$diff} gün ({$date->format('d.m.Y H:i')}).",
];
}
/**
* Share a post to LinkedIn Company Page
*/
public function sharePost(string $title, string $text, ?string $url = null, ?string $imageUrl = null): array
{
if (!$this->isAuthorized()) {
return [
'success' => false,
'message' => 'LinkedIn yetkilendirmesi bulunamadı veya süresi dolmuş.',
];
}
$token = Setting::get('linkedin_access_token');
$authorUrn = "urn:li:organization:{$this->organizationId}";
// Prepare UGC Post payload
$shareCommentary = trim($title . "\n\n" . $text);
if ($url) {
$shareCommentary .= "\n\n" . $url;
}
$mediaContent = [];
if ($url) {
$mediaItem = [
'status' => 'READY',
'originalUrl' => $url,
'title' => [
'text' => Str::limit($title, 200),
],
'description' => [
'text' => Str::limit(strip_tags($text), 250),
],
];
$mediaContent[] = $mediaItem;
}
$shareContent = [
'shareCommentary' => [
'text' => $shareCommentary,
],
'shareMediaCategory' => !empty($mediaContent) ? 'ARTICLE' : 'NONE',
];
if (!empty($mediaContent)) {
$shareContent['media'] = $mediaContent;
}
$payload = [
'author' => $authorUrn,
'lifecycleState' => 'PUBLISHED',
'specificContent' => [
'com.linkedin.ugc.ShareContent' => $shareContent,
],
'visibility' => [
'com.linkedin.ugc.ShareProductVisibility' => 'PUBLIC',
],
];
try {
$response = Http::withHeaders([
'Authorization' => 'Bearer ' . $token,
'X-Restli-Protocol-Version' => '2.0.0',
'Content-Type' => 'application/json',
])->post('https://api.linkedin.com/v2/ugcPosts', $payload);
if ($response->successful()) {
$postId = $response->header('x-restli-id') ?? $response->json('id');
Log::info('LinkedIn post published successfully', [
'organization_id' => $this->organizationId,
'post_id' => $postId,
]);
return [
'success' => true,
'message' => 'LinkedIn gönderisi başarıyla paylaşıldı!',
'post_id' => $postId,
];
}
Log::error('LinkedIn Share API Failed', [
'status' => $response->status(),
'body' => $response->body(),
]);
return [
'success' => false,
'message' => 'LinkedIn gönderisi paylaşılamadı: ' . ($response->json('message') ?? $response->body()),
];
} catch (\Throwable $e) {
Log::error('LinkedIn Share Post Exception: ' . $e->getMessage());
return [
'success' => false,
'message' => 'Gönderi paylaşılırken bir hata oluştu: ' . $e->getMessage(),
];
}
}
}
+1 -1
View File
@@ -61,7 +61,7 @@ class BlogStructuredData extends StructuredData
'inLanguage' => app()->getLocale(), 'inLanguage' => app()->getLocale(),
'author' => [ 'author' => [
'@type' => 'Person', '@type' => 'Person',
'name' => $post->author->name ?? __('blog.default_author'), 'name' => $post->author_name,
], ],
'publisher' => self::publisherNode(), 'publisher' => self::publisherNode(),
'datePublished' => $publishedAt->toIso8601String(), 'datePublished' => $publishedAt->toIso8601String(),
+19 -2
View File
@@ -45,14 +45,14 @@ trait HasTranslations
// 1. Try translations table // 1. Try translations table
$translation = $this->getTranslation($fieldName, $languageCode); $translation = $this->getTranslation($fieldName, $languageCode);
if ($translation && !empty($translation->field_value)) { if ($translation && $this->hasValidTranslationContent($translation->field_value)) {
return $translation->field_value; return $translation->field_value;
} }
// 2. Fallback to default language from translations table // 2. Fallback to default language from translations table
if ($fallback && $languageCode !== $this->getDefaultLanguageCode()) { if ($fallback && $languageCode !== $this->getDefaultLanguageCode()) {
$defaultTranslation = $this->getTranslation($fieldName, $this->getDefaultLanguageCode()); $defaultTranslation = $this->getTranslation($fieldName, $this->getDefaultLanguageCode());
if ($defaultTranslation && !empty($defaultTranslation->field_value)) { if ($defaultTranslation && $this->hasValidTranslationContent($defaultTranslation->field_value)) {
return $defaultTranslation->field_value; return $defaultTranslation->field_value;
} }
} }
@@ -267,6 +267,23 @@ trait HasTranslations
} }
} }
/**
* Check if translation content has meaningful text or media
*/
protected function hasValidTranslationContent(mixed $value): bool
{
if (empty($value)) {
return false;
}
if (is_string($value)) {
$stripped = trim(strip_tags($value, '<img><iframe><video><audio>'));
return $stripped !== '';
}
return true;
}
/** /**
* Get translatable fields for this model * Get translatable fields for this model
*/ */
+11
View File
@@ -0,0 +1,11 @@
<?php
return [
'client_id' => env('LINKEDIN_CLIENT_ID'),
'client_secret' => env('LINKEDIN_CLIENT_SECRET'),
'organization_id' => env('LINKEDIN_ORGANIZATION_ID', '35611757'),
'redirect_uri' => env('LINKEDIN_REDIRECT_URI', 'https://truncgil.com/admin/linkedin/callback'),
// Scopes allowed by your LinkedIn App products
'scopes' => explode(' ', env('LINKEDIN_SCOPES', 'w_member_social w_organization_social r_organization_admin rw_organization_admin')),
];
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('blogs', function (Blueprint $table) {
$table->foreignId('career_application_id')->nullable()->after('author_id')->constrained('career_applications')->onDelete('cascade');
$table->string('intern_category')->nullable()->after('career_application_id');
$table->text('admin_feedback')->nullable()->after('intern_category');
$table->foreignId('author_id')->nullable()->change();
$table->string('status')->default('draft')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('blogs', function (Blueprint $table) {
$table->dropForeign(['career_application_id']);
$table->dropColumn(['career_application_id', 'intern_category', 'admin_feedback']);
});
}
};
@@ -0,0 +1,81 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('projects', function (Blueprint $table) {
$table->id();
$table->foreignId('proposal_id')->nullable()->constrained('proposals')->nullOnDelete();
$table->string('title');
$table->string('slug')->unique();
$table->string('client_name');
$table->string('client_email')->nullable();
$table->string('client_access_code')->nullable();
$table->enum('status', ['planning', 'in_progress', 'on_hold', 'completed', 'cancelled'])->default('in_progress');
$table->unsignedInteger('progress_percent')->default(0);
$table->date('start_date')->nullable();
$table->date('target_date')->nullable();
$table->timestamp('completed_at')->nullable();
$table->text('notes')->nullable();
$table->timestamps();
$table->softDeletes();
});
Schema::create('project_modules', function (Blueprint $table) {
$table->id();
$table->foreignId('project_id')->constrained('projects')->cascadeOnDelete();
$table->string('title');
$table->text('description')->nullable();
$table->unsignedInteger('weight_percent')->default(10);
$table->enum('status', ['pending', 'in_progress', 'completed'])->default('pending');
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->integer('order')->default(0);
$table->timestamps();
});
Schema::create('project_tasks', function (Blueprint $table) {
$table->id();
$table->foreignId('project_id')->constrained('projects')->cascadeOnDelete();
$table->foreignId('project_module_id')->nullable()->constrained('project_modules')->nullOnDelete();
$table->string('title');
$table->text('description')->nullable();
$table->enum('status', ['todo', 'in_progress', 'review', 'done'])->default('todo');
$table->enum('priority', ['low', 'medium', 'high', 'urgent'])->default('medium');
$table->date('due_date')->nullable();
$table->string('assigned_person')->nullable();
$table->integer('order_index')->default(0);
$table->timestamps();
});
Schema::create('project_updates', function (Blueprint $table) {
$table->id();
$table->foreignId('project_id')->constrained('projects')->cascadeOnDelete();
$table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete();
$table->string('title');
$table->text('content');
$table->unsignedInteger('progress_percent_at_update')->nullable();
$table->boolean('is_public')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('project_updates');
Schema::dropIfExists('project_tasks');
Schema::dropIfExists('project_modules');
Schema::dropIfExists('projects');
}
};
+11
View File
@@ -0,0 +1,11 @@
<?php
$content = file_get_contents('/home/truncgil/web/truncgil.com/public_html/app/Filament/Admin/Pages/LinkedInSettings.php');
$content = str_replace('use Filament\Schemas\Schema;', 'use Filament\Forms\Form;', $content);
$content = str_replace('public function form(Schema $schema): Schema', 'public function form(Form $form): Form', $content);
$content = preg_replace('/return \$schema\n\s*->components/m', 'return $form->schema', $content);
$content = str_replace('use Filament\Schemas\Components\Actions;', 'use Filament\Forms\Components\Actions;', $content);
$content = str_replace('use Filament\Schemas\Components\Actions\Action;', 'use Filament\Forms\Components\Actions\Action;', $content);
$content = str_replace('use Filament\Schemas\Components\Grid;', 'use Filament\Forms\Components\Grid;', $content);
$content = str_replace('use Filament\Schemas\Components\Section;', 'use Filament\Forms\Components\Section;', $content);
file_put_contents('/home/truncgil/web/truncgil.com/public_html/app/Filament/Admin/Pages/LinkedInSettings.php', $content);
echo "Fixed!";
+2
View File
@@ -61,7 +61,9 @@ return [
// Status options // Status options
'status_draft' => 'Draft', 'status_draft' => 'Draft',
'status_pending' => 'Pending Approval',
'status_published' => 'Published', 'status_published' => 'Published',
'status_rejected' => 'Revision Requested',
'status_archived' => 'Archived', 'status_archived' => 'Archived',
// Messages // Messages
+2
View File
@@ -61,7 +61,9 @@ return [
// Status options // Status options
'status_draft' => 'Taslak', 'status_draft' => 'Taslak',
'status_pending' => 'Onay Bekliyor',
'status_published' => 'Yayınlandı', 'status_published' => 'Yayınlandı',
'status_rejected' => 'Revize İstendi',
'status_archived' => 'Arşivlendi', 'status_archived' => 'Arşivlendi',
// Messages // Messages
+6 -6
View File
@@ -1,38 +1,38 @@
@import url(https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@1,300;1,400;1,500;1,600;1,700&display=swap); @import url(https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@1,300;1,400;1,500;1,600;1,700);
@font-face { @font-face {
font-family: 'Space Grotesk'; font-family: 'Space Grotesk';
src: url(../../fonts/space/SpaceGrotesk-SemiBold.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-SemiBold.woff) format('woff'); src: url(../../fonts/space/SpaceGrotesk-SemiBold.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-SemiBold.woff) format('woff');
font-weight: 600; font-weight: 600;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: 'Space Grotesk'; font-family: 'Space Grotesk';
src: url(../../fonts/space/SpaceGrotesk-Light.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Light.woff) format('woff'); src: url(../../fonts/space/SpaceGrotesk-Light.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Light.woff) format('woff');
font-weight: 300; font-weight: 300;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: 'Space Grotesk'; font-family: 'Space Grotesk';
src: url(../../fonts/space/SpaceGrotesk-Bold.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Bold.woff) format('woff'); src: url(../../fonts/space/SpaceGrotesk-Bold.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Bold.woff) format('woff');
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: 'Space Grotesk'; font-family: 'Space Grotesk';
src: url(../../fonts/space/SpaceGrotesk-Medium.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Medium.woff) format('woff'); src: url(../../fonts/space/SpaceGrotesk-Medium.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Medium.woff) format('woff');
font-weight: 500; font-weight: 500;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: 'Space Grotesk'; font-family: 'Space Grotesk';
src: url(../../fonts/space/SpaceGrotesk-Regular.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Regular.woff) format('woff'); src: url(../../fonts/space/SpaceGrotesk-Regular.woff2) format('woff2'), url(../../fonts/space/SpaceGrotesk-Regular.woff) format('woff');
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
* { * {
word-spacing: normal !important word-spacing: normal !important
+10 -10
View File
@@ -3,70 +3,70 @@
src: url(../../fonts/urbanist/Urbanist-BoldItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-BoldItalic.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-BoldItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-BoldItalic.woff) format('woff');
font-weight: 700; font-weight: 700;
font-style: italic; font-style: italic;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-SemiBoldItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-SemiBoldItalic.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-SemiBoldItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-SemiBoldItalic.woff) format('woff');
font-weight: 600; font-weight: 600;
font-style: italic; font-style: italic;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-Medium.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Medium.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-Medium.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Medium.woff) format('woff');
font-weight: 500; font-weight: 500;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-MediumItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-MediumItalic.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-MediumItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-MediumItalic.woff) format('woff');
font-weight: 500; font-weight: 500;
font-style: italic; font-style: italic;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-SemiBold.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-SemiBold.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-SemiBold.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-SemiBold.woff) format('woff');
font-weight: 600; font-weight: 600;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-Italic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Italic.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-Italic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Italic.woff) format('woff');
font-weight: 400; font-weight: 400;
font-style: italic; font-style: italic;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-Regular.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Regular.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-Regular.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Regular.woff) format('woff');
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-LightItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-LightItalic.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-LightItalic.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-LightItalic.woff) format('woff');
font-weight: 300; font-weight: 300;
font-style: italic; font-style: italic;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-Light.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Light.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-Light.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Light.woff) format('woff');
font-weight: 300; font-weight: 300;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
@font-face { @font-face {
font-family: Urbanist; font-family: Urbanist;
src: url(../../fonts/urbanist/Urbanist-Bold.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Bold.woff) format('woff'); src: url(../../fonts/urbanist/Urbanist-Bold.woff2) format('woff2'), url(../../fonts/urbanist/Urbanist-Bold.woff) format('woff');
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
font-display: swap; font-display: block
} }
* { * {
word-spacing: normal !important word-spacing: normal !important
+2 -2
View File
@@ -3,12 +3,12 @@
src:url(Unicons.woff2) format("woff2"),url(Unicons.woff) format("woff"); src:url(Unicons.woff2) format("woff2"),url(Unicons.woff) format("woff");
font-weight:400; font-weight:400;
font-style:normal; font-style:normal;
font-display:swap; font-display:block
} }
@font-face { @font-face {
font-family:Custom; font-family:Custom;
src:url(../custom/Custom.woff2) format("woff2"),url(../custom/Custom.woff) format("woff"); src:url(../custom/Custom.woff2) format("woff2"),url(../custom/Custom.woff) format("woff");
font-weight:400; font-weight:400;
font-style:normal; font-style:normal;
font-display:swap; font-display:block
} }
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
<circle cx="64" cy="64" r="64" fill="#E2E8F0"/>
<circle cx="64" cy="46" r="22" fill="#94A3B8"/>
<path d="M64 74C42 74 24 88 20 106C31.5 119.6 48.7 128 64 128C79.3 128 96.5 119.6 108 106C104 88 86 74 64 74Z" fill="#94A3B8"/>
</svg>

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 KiB

+8
View File
@@ -0,0 +1,8 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /b2b/
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /b2b/index.html [L]
</IfModule>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+25
View File
@@ -0,0 +1,25 @@
<!doctype html>
<html lang="tr">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0B1B3A" />
<title>Trunçgil B2B | Toptancı & Bayi Yönetim Platformu</title>
<meta
name="description"
content="Trunçgil B2B: QR stok, bayi kataloğu, sipariş, iskonto kademesi ve tedarikçi portalı. Toptancılar için kurumsal B2B SaaS."
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap"
rel="stylesheet"
/>
<link rel="canonical" href="https://truncgil.com/b2b/" />
<script type="module" crossorigin src="/b2b/assets/index-B1Hl_CEN.js"></script>
<link rel="stylesheet" crossorigin href="/b2b/assets/index-Dc8a63TK.css">
</head>
<body>
<div id="root"></div>
</body>
</html>
+4
View File
@@ -0,0 +1,4 @@
User-agent: *
Allow: /b2b/
Sitemap: https://truncgil.com/b2b/sitemap.xml
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://truncgil.com/b2b/</loc></url>
<url><loc>https://truncgil.com/b2b/videolar</loc></url>
<url><loc>https://truncgil.com/b2b/kullanim-kilavuzu</loc></url>
<url><loc>https://truncgil.com/b2b/demo</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/toptanci-girisi</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/bayi-girisi</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/yeni-kategori-ekleme</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/yeni-bayi-ekleme</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/depo-ekleme</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/tedarikci-ekleme</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/kullanici-ekleme</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/iskonto-kademesi</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/excel-import-export</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/bayi-siparis-sureci</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/siparis-yonetme</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/plasiyer-mantigi</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/depo-portali-islemler</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/qr-mal-kabul</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/siparis-toplama-picking</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/depolar-arasi-sevk</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/tedarikci-portal-alim</loc></url>
<url><loc>https://truncgil.com/b2b/videolar/yeni-urun-karti</loc></url>
</urlset>
+31862 -1
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -2,5 +2,9 @@ User-agent: *
Allow: / Allow: /
Disallow: /admin/ Disallow: /admin/
Disallow: /stajyer/admin/ Disallow: /stajyer/admin/
Disallow: /teklif/
Disallow: /proje-takip/
Disallow: /truncgil-oem-b2b
Disallow: /oem-b2b-demo
Sitemap: https://truncgil.com/sitemap.xml Sitemap: https://truncgil.com/sitemap.xml
+3 -3
View File
@@ -37,11 +37,11 @@
<i class="uil uil-calendar-alt pr-[0.2rem] align-[-.05rem] before:content-['\e9ba']"></i> <i class="uil uil-calendar-alt pr-[0.2rem] align-[-.05rem] before:content-['\e9ba']"></i>
<span>{{ $cDate }}</span> <span>{{ $cDate }}</span>
</li> </li>
@if($cPost->author) @if($cPost->author || $cPost->careerApplication)
<li class="post-author inline-block before:content-[''] before:inline-block before:w-[0.2rem] before:h-[0.2rem] before:opacity-50 before:m-[0_.6rem_0] before:rounded-[100%] before:align-[.15rem] before:bg-[#aab0bc]"> <li class="post-author inline-block before:content-[''] before:inline-block before:w-[0.2rem] before:h-[0.2rem] before:opacity-50 before:m-[0_.6rem_0] before:rounded-[100%] before:align-[.15rem] before:bg-[#aab0bc]">
<span class="!text-[#aab0bc]"> <span class="!text-[#aab0bc]">
<i class="uil uil-user pr-[0.2rem] align-[-.05rem] before:content-['\ed6f']"></i> <i class="uil uil-user pr-[0.2rem] align-[-.05rem] before:content-['\ed6f']"></i>
<span>{{ $cPost->author->name }}</span> <span>{{ $cPost->author_name }}</span>
</span> </span>
</li> </li>
@endif @endif
@@ -349,7 +349,7 @@
"datePublished" => $p->published_at ? $p->published_at->toIso8601String() : $p->created_at->toIso8601String(), "datePublished" => $p->published_at ? $p->published_at->toIso8601String() : $p->created_at->toIso8601String(),
"author" => [ "author" => [
"@type" => "Person", "@type" => "Person",
"name" => $p->author ? $p->author->name : 'Trunçgil' "name" => $p->author_name
] ]
]; ];
} }
+8 -8
View File
@@ -22,7 +22,7 @@
<li class="post-author inline-block before:content-[''] before:inline-block before:w-[0.2rem] before:h-[0.2rem] before:opacity-50 before:m-[0_.6rem_0_.4rem] before:rounded-[100%] before:align-[.15rem] before:bg-[#aab0bc]"> <li class="post-author inline-block before:content-[''] before:inline-block before:w-[0.2rem] before:h-[0.2rem] before:opacity-50 before:m-[0_.6rem_0_.4rem] before:rounded-[100%] before:align-[.15rem] before:bg-[#aab0bc]">
<span class="!text-[0.8rem] !text-[#aab0bc]"> <span class="!text-[0.8rem] !text-[#aab0bc]">
<i class="uil uil-user pr-[0.2rem] align-[-.05rem] before:content-['\ed6f']"></i> <i class="uil uil-user pr-[0.2rem] align-[-.05rem] before:content-['\ed6f']"></i>
<span>{{ $post->author ? $post->author->name : 'Trunçgil' }}</span> <span>{{ $post->author_name }}</span>
</span> </span>
</li> </li>
</ul> </ul>
@@ -84,15 +84,15 @@
<div class="author-info xl:!flex lg:!flex md:!flex items-center !mb-3"> <div class="author-info xl:!flex lg:!flex md:!flex items-center !mb-3">
<div class="flex items-center"> <div class="flex items-center">
<figure class="w-12 h-12 !relative !mr-4 rounded-[100%]"> <figure class="w-12 h-12 !relative !mr-4 rounded-[100%]">
<img class="rounded-[50%]" alt="image" src="{{ $post->author && $post->author->avatar ? asset('storage/' . $post->author->avatar) : asset('assets/img/avatars/u5.webp') }}" onerror="this.src='{{ asset('assets/img/avatars/u5.webp') }}'" loading="lazy"> <img class="rounded-[50%]" alt="image" src="{{ $post->author_avatar_url }}" onerror="this.src='{{ asset('assets/img/avatars/u5.webp') }}'" loading="lazy">
</figure> </figure>
<div> <div>
<h6><a href="#" class="!text-[#343f52] hover:!text-[#e31e24]">{{ $post->author ? $post->author->name : 'Trunçgil' }}</a></h6> <h6><a href="#" class="!text-[#343f52] hover:!text-[#e31e24]">{{ $post->author_name }}</a></h6>
<span class="!text-[0.75rem] !text-[#aab0bc] m-0 p-0 list-none">{{ $post->author && $post->author->role ? $post->author->role : 'Trunçgil Teknoloji Editörü' }}</span> <span class="!text-[0.75rem] !text-[#aab0bc] m-0 p-0 list-none">{{ $post->author_role }}</span>
</div> </div>
</div> </div>
<div class="!mt-3 xl:!mt-0 lg:!mt-0 md:!mt-0 !ml-auto"> <div class="!mt-3 xl:!mt-0 lg:!mt-0 md:!mt-0 !ml-auto">
<a href="{{ route('blog.index', ['author' => $post->author_id]) }}" class="btn btn-sm btn-soft-ash !rounded-[50rem] btn-icon btn-icon-start !mb-0 hover:translate-y-[-0.15rem] hover:shadow-[0_0.25rem_0.75rem_rgba(30,34,40,0.15)]"><i class="uil uil-file-alt !mr-[0.3rem] before:content-['\eaec'] text-[.8rem]"></i> Tüm Yazıları</a> <a href="{{ $post->author_id ? route('blog.index', ['author' => $post->author_id]) : ($post->career_application_id ? route('blog.index', ['intern' => $post->career_application_id]) : route('blog.index')) }}" class="btn btn-sm btn-soft-ash !rounded-[50rem] btn-icon btn-icon-start !mb-0 hover:translate-y-[-0.15rem] hover:shadow-[0_0.25rem_0.75rem_rgba(30,34,40,0.15)]"><i class="uil uil-file-alt !mr-[0.3rem] before:content-['\eaec'] text-[.8rem]"></i> Tüm Yazıları</a>
</div> </div>
</div> </div>
<p>Trunçgil Teknoloji editörleri tarafından kaleme alınmış bu makalede teknoloji, yazılım geliştirme ve dijital dönüşüm konularına dair güncel gelişmeleri incelediniz. Destek ve sorularınız için bizimle iletişime geçebilirsiniz.</p> <p>Trunçgil Teknoloji editörleri tarafından kaleme alınmış bu makalede teknoloji, yazılım geliştirme ve dijital dönüşüm konularına dair güncel gelişmeleri incelediniz. Destek ve sorularınız için bizimle iletişime geçebilirsiniz.</p>
@@ -181,9 +181,9 @@
$publishedDate = $post->published_at ? $post->published_at->toIso8601String() : $post->created_at->toIso8601String(); $publishedDate = $post->published_at ? $post->published_at->toIso8601String() : $post->created_at->toIso8601String();
$modifiedDate = $post->updated_at ? $post->updated_at->toIso8601String() : $publishedDate; $modifiedDate = $post->updated_at ? $post->updated_at->toIso8601String() : $publishedDate;
$authorName = $post->author ? $post->author->name : 'Trunçgil'; $authorName = $post->author_name;
$authorRole = $post->author && $post->author->role ? $post->author->role : 'Trunçgil Teknoloji Editörü'; $authorRole = $post->author_role;
$authorUrl = route('blog.index', ['author' => $post->author_id ?? 1]); $authorUrl = $post->author_id ? route('blog.index', ['author' => $post->author_id]) : ($post->career_application_id ? route('blog.index', ['intern' => $post->career_application_id]) : route('blog.index'));
$siteName = setting('site_name', 'Trunçgil Teknoloji'); $siteName = setting('site_name', 'Trunçgil Teknoloji');
$siteLogo = setting('site_logo') ? (str_starts_with(setting('site_logo'), 'http') ? setting('site_logo') : asset('storage/' . ltrim(setting('site_logo'), '/'))) : asset('assets/img/logo.png'); $siteLogo = setting('site_logo') ? (str_starts_with(setting('site_logo'), 'http') ? setting('site_logo') : asset('storage/' . ltrim(setting('site_logo'), '/'))) : asset('assets/img/logo.png');
@@ -1,6 +1,6 @@
@php @php
// Blog modelinden published içerikleri çek // Blog modelinden published içerikleri çek
$blogs = \App\Models\Blog::with(['category', 'author']) $blogs = \App\Models\Blog::with(['category', 'author', 'careerApplication'])
->withCount('comments') ->withCount('comments')
->published() ->published()
->latest('published_at') ->latest('published_at')
@@ -0,0 +1,5 @@
<x-filament-panels::page>
<form wire:submit.prevent="saveSettings">
{{ $this->form }}
</form>
</x-filament-panels::page>
@@ -23,6 +23,14 @@
<i class="uil uil-list-ul text-lg"></i> <i class="uil uil-list-ul text-lg"></i>
<span>Stajyer Listesi ve Detaylı Takip</span> <span>Stajyer Listesi ve Detaylı Takip</span>
</button> </button>
<button type="button" role="tab" aria-selected="false" data-tab-target="quick-approval" class="admin-tab-btn flex-1 flex items-center justify-center gap-3 py-4 px-6 rounded-2xl text-center font-bold text-sm transition-all border border-transparent text-slate-600 hover:bg-slate-50 cursor-pointer relative">
<i class="uil uil-check-square text-lg"></i>
<span>Hızlı Defter Onaylama</span>
<span id="quick-approval-badge" class="{{ $unapprovedCount > 0 ? '' : 'hidden' }} absolute -top-1 -right-1 flex h-5 min-w-[20px] items-center justify-center rounded-full bg-rose-500 px-1.5 text-[10px] font-black text-white ring-2 ring-white shadow-md">
{{ $unapprovedCount }}
</span>
</button>
</div> </div>
</div> </div>
@@ -35,6 +43,10 @@
@include('front.career.partials.list') @include('front.career.partials.list')
</div> </div>
<div id="quick-approval-panel" class="admin-tab-panel hidden space-y-6">
@include('front.career.partials.quick_approval')
</div>
</div> </div>
</div> </div>
</section> </section>
@@ -632,6 +644,12 @@
} }
} }
} }
if (targetId === 'quick-approval') {
if (typeof loadQuickApprovalEntries === 'function') {
loadQuickApprovalEntries();
}
}
} }
}); });
}); });
@@ -377,6 +377,23 @@
<span class="block text-xs text-slate-400 font-semibold mt-0.5">Günlük çalışma defteri</span> <span class="block text-xs text-slate-400 font-semibold mt-0.5">Günlük çalışma defteri</span>
</div> </div>
</button> </button>
<!-- Menu Item 4: Blog Yazıları -->
@php
$approvedBlogsCount = isset($blogs) ? $blogs->where('status', 'published')->count() : 0;
@endphp
<button type="button" role="tab" aria-selected="false" data-tab-target="blogs" class="tab-btn w-full flex items-center gap-4 p-3 rounded-2xl text-left transition-all border border-transparent">
<div class="w-10 h-10 rounded-xl bg-slate-50 text-slate-500 flex items-center justify-center text-xl flex-shrink-0 tab-icon">
<i class="uil uil-newspaper"></i>
</div>
<div class="flex-grow">
<div class="flex items-center justify-between">
<span class="block text-sm font-extrabold text-slate-800">Blog Yazıları</span>
<span class="text-[10px] font-extrabold px-2 py-0.5 rounded-full @if($approvedBlogsCount >= 3) bg-green-100 text-green-700 @else bg-blue-100 text-blue-700 @endif">{{ $approvedBlogsCount }}/3</span>
</div>
<span class="block text-xs text-slate-400 font-semibold mt-0.5">Sitede yayınlanacak bloglar</span>
</div>
</button>
</div> </div>
</div> </div>
</div> </div>
@@ -785,6 +802,222 @@
</div> </div>
</div> </div>
<!-- Panel 4: Blog Yazıları -->
<div id="blogs-panel" class="tab-panel hidden space-y-6">
<div class="bg-white rounded-3xl p-6 md:p-8 shadow-xl border border-slate-100/50">
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 pb-6 border-b border-slate-100">
<div>
<h3 class="font-bold text-slate-800 text-lg flex items-center gap-2">
<i class="uil uil-newspaper text-blue-600"></i>
<span>Staj Blog Yazıları (Min. 3 Adet)</span>
</h3>
<p class="text-xs text-slate-400 mt-1">
Staj süresince en az 3 blog yazısı kaleme almalısınız. Onaylanan yazılar web sitemizin blog bölümünde yayınlanacaktır.
</p>
</div>
<button type="button" onclick="openBlogModal()" class="px-4 py-2.5 bg-blue-600 hover:bg-blue-700 text-white font-bold rounded-xl text-xs transition-all shadow-md shadow-blue-500/10 flex items-center gap-2">
<i class="uil uil-plus text-base"></i>
<span>Yeni Blog Yazısı Ekle</span>
</button>
</div>
<!-- Progress Bar -->
@php
$userBlogs = $blogs ?? collect();
$publishedBlogs = $userBlogs->where('status', 'published');
$publishedCount = $publishedBlogs->count();
$progressPercent = min(100, round(($publishedCount / 3) * 100));
@endphp
<div class="mt-6 p-5 bg-gradient-to-r from-blue-50 to-indigo-50 rounded-2xl border border-blue-100">
<div class="flex justify-between items-center mb-2">
<span class="text-xs font-extrabold text-blue-900">Blog Görev Tamamlama Oranı</span>
<span class="text-xs font-black text-blue-700">{{ $publishedCount }} / 3 Yayınlandı (%{{ $progressPercent }})</span>
</div>
<div class="w-full bg-blue-200/60 rounded-full h-2.5 overflow-hidden">
<div class="bg-blue-600 h-2.5 rounded-full transition-all duration-500" style="width: {{ $progressPercent }}%"></div>
</div>
</div>
<!-- 3 Mandatory Category Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mt-6">
@php
$expBlog = $userBlogs->where('intern_category', 'experience')->first();
$techBlog = $userBlogs->where('intern_category', 'technical_challenge')->first();
$prodBlog = $userBlogs->where('intern_category', 'product_showcase')->first();
@endphp
<!-- Category 1 -->
<div class="p-4 rounded-2xl border border-slate-100 bg-slate-50/50 flex flex-col justify-between">
<div>
<div class="flex justify-between items-center mb-2">
<span class="text-[10px] uppercase font-extrabold tracking-wider text-slate-400">1. Konu</span>
@if($expBlog && $expBlog->status === 'published')
<span class="px-2 py-0.5 bg-green-50 text-green-700 border border-green-200 text-[10px] font-bold rounded-lg">Yayınlandı ✓</span>
@elseif($expBlog && $expBlog->status === 'pending')
<span class="px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 text-[10px] font-bold rounded-lg">Onay Bekliyor</span>
@elseif($expBlog && $expBlog->status === 'rejected')
<span class="px-2 py-0.5 bg-red-50 text-red-700 border border-red-200 text-[10px] font-bold rounded-lg">Revize İstendi</span>
@elseif($expBlog && $expBlog->status === 'draft')
<span class="px-2 py-0.5 bg-slate-100 text-slate-600 border border-slate-200 text-[10px] font-bold rounded-lg">Taslak</span>
@else
<span class="px-2 py-0.5 bg-slate-100 text-slate-400 border border-slate-200 text-[10px] font-bold rounded-lg">Bekliyor</span>
@endif
</div>
<h4 class="text-xs font-extrabold text-slate-800">Staj Tecrübesi & Adaptasyon</h4>
<p class="text-[11px] text-slate-400 mt-1">Staj süreci, şirket kültürü ve ilk izlenimlerinizi anlatan yazı.</p>
</div>
</div>
<!-- Category 2 -->
<div class="p-4 rounded-2xl border border-slate-100 bg-slate-50/50 flex flex-col justify-between">
<div>
<div class="flex justify-between items-center mb-2">
<span class="text-[10px] uppercase font-extrabold tracking-wider text-slate-400">2. Konu</span>
@if($techBlog && $techBlog->status === 'published')
<span class="px-2 py-0.5 bg-green-50 text-green-700 border border-green-200 text-[10px] font-bold rounded-lg">Yayınlandı ✓</span>
@elseif($techBlog && $techBlog->status === 'pending')
<span class="px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 text-[10px] font-bold rounded-lg">Onay Bekliyor</span>
@elseif($techBlog && $techBlog->status === 'rejected')
<span class="px-2 py-0.5 bg-red-50 text-red-700 border border-red-200 text-[10px] font-bold rounded-lg">Revize İstendi</span>
@elseif($techBlog && $techBlog->status === 'draft')
<span class="px-2 py-0.5 bg-slate-100 text-slate-600 border border-slate-200 text-[10px] font-bold rounded-lg">Taslak</span>
@else
<span class="px-2 py-0.5 bg-slate-100 text-slate-400 border border-slate-200 text-[10px] font-bold rounded-lg">Bekliyor</span>
@endif
</div>
<h4 class="text-xs font-extrabold text-slate-800">Teknik Zorluklar & Çözümler</h4>
<p class="text-[11px] text-slate-400 mt-1">Gelişim sürecinde karşılaştığınız teknik engeller ve çözüm yöntemleri.</p>
</div>
</div>
<!-- Category 3 -->
<div class="p-4 rounded-2xl border border-slate-100 bg-slate-50/50 flex flex-col justify-between">
<div>
<div class="flex justify-between items-center mb-2">
<span class="text-[10px] uppercase font-extrabold tracking-wider text-slate-400">3. Konu</span>
@if($prodBlog && $prodBlog->status === 'published')
<span class="px-2 py-0.5 bg-green-50 text-green-700 border border-green-200 text-[10px] font-bold rounded-lg">Yayınlandı ✓</span>
@elseif($prodBlog && $prodBlog->status === 'pending')
<span class="px-2 py-0.5 bg-amber-50 text-amber-700 border border-amber-200 text-[10px] font-bold rounded-lg">Onay Bekliyor</span>
@elseif($prodBlog && $prodBlog->status === 'rejected')
<span class="px-2 py-0.5 bg-red-50 text-red-700 border border-red-200 text-[10px] font-bold rounded-lg">Revize İstendi</span>
@elseif($prodBlog && $prodBlog->status === 'draft')
<span class="px-2 py-0.5 bg-slate-100 text-slate-600 border border-slate-200 text-[10px] font-bold rounded-lg">Taslak</span>
@else
<span class="px-2 py-0.5 bg-slate-100 text-slate-400 border border-slate-200 text-[10px] font-bold rounded-lg">Bekliyor</span>
@endif
</div>
<h4 class="text-xs font-extrabold text-slate-800">Ürün / Proje Tanıtımı (Showcase)</h4>
<p class="text-[11px] text-slate-400 mt-1">Geliştirdiğiniz nihai ürünün amacı, mimarisi ve canlı demo anlatımı.</p>
</div>
</div>
</div>
<!-- Blog List Table -->
<div class="mt-8">
<h4 class="text-sm font-extrabold text-slate-800 mb-4">Gönderilen Blog Yazılarınız</h4>
@if($userBlogs->isEmpty())
<div class="text-center py-10 border-2 border-dashed border-slate-100 rounded-2xl">
<i class="uil uil-file-edit-alt text-4xl text-slate-300"></i>
<p class="text-xs text-slate-500 font-bold mt-2">Henüz bir blog yazısı eklemediniz.</p>
<button type="button" onclick="openBlogModal()" class="mt-3 text-xs font-extrabold text-blue-600 hover:text-blue-800">
+ İlk Blog Yazısını Ekle
</button>
</div>
@else
<div class="overflow-x-auto">
<table class="w-full text-left border-collapse">
<thead>
<tr class="border-b border-slate-100 text-[11px] font-extrabold text-slate-400 uppercase tracking-wider">
<th class="py-3 px-3">Görsel</th>
<th class="py-3 px-3">Başlık & Konu</th>
<th class="py-3 px-3">Durum</th>
<th class="py-3 px-3">Yönetici Notu</th>
<th class="py-3 px-3 text-right">İşlemler</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 text-xs">
@foreach($userBlogs as $blogItem)
<tr>
<td class="py-3 px-3">
@if($blogItem->featured_image)
<img src="{{ asset('storage/' . $blogItem->featured_image) }}" class="w-12 h-12 object-cover rounded-xl border border-slate-100" />
@else
<div class="w-12 h-12 rounded-xl bg-slate-100 flex items-center justify-center text-slate-400">
<i class="uil uil-image text-xl"></i>
</div>
@endif
</td>
<td class="py-3 px-3">
<span class="font-bold text-slate-800 block text-sm">{{ $blogItem->title }}</span>
<span class="text-[10px] font-bold text-slate-400 block mt-0.5">
@if($blogItem->intern_category === 'experience') 1. Staj Tecrübesi
@elseif($blogItem->intern_category === 'technical_challenge') 2. Teknik Zorluklar
@elseif($blogItem->intern_category === 'product_showcase') 3. Ürün Tanıtımı
@else {{ $blogItem->intern_category }} @endif
</span>
</td>
<td class="py-3 px-3">
@if($blogItem->status === 'published')
<span class="px-2.5 py-1 bg-green-50 text-green-700 border border-green-200 font-extrabold rounded-full text-[11px] inline-flex items-center gap-1">
<i class="uil uil-check-circle text-sm"></i> Sitede Yayınlandı
</span>
@elseif($blogItem->status === 'pending')
<span class="px-2.5 py-1 bg-amber-50 text-amber-700 border border-amber-200 font-extrabold rounded-full text-[11px] inline-flex items-center gap-1">
<i class="uil uil-clock text-sm"></i> Onay Bekliyor
</span>
@elseif($blogItem->status === 'rejected')
<span class="px-2.5 py-1 bg-red-50 text-red-700 border border-red-200 font-extrabold rounded-full text-[11px] inline-flex items-center gap-1">
<i class="uil uil-exclamation-triangle text-sm"></i> Revize İstendi
</span>
@else
<span class="px-2.5 py-1 bg-slate-100 text-slate-600 border border-slate-200 font-extrabold rounded-full text-[11px] inline-flex items-center gap-1">
<i class="uil uil-edit text-sm"></i> Taslak
</span>
@endif
</td>
<td class="py-3 px-3">
@if($blogItem->admin_feedback)
<div class="p-2 bg-red-50 border border-red-100 rounded-xl text-red-700 text-[11px] font-semibold max-w-xs">
<strong>Geribildirim:</strong> {{ $blogItem->admin_feedback }}
</div>
@else
<span class="text-slate-300">-</span>
@endif
</td>
<td class="py-3 px-3 text-right">
<div class="flex items-center justify-end gap-2">
@if($blogItem->status === 'published')
<a href="{{ route('blog.show', $blogItem->slug) }}" target="_blank" class="px-3 py-1.5 bg-green-50 text-green-700 hover:bg-green-100 font-bold rounded-lg text-xs transition-all flex items-center gap-1">
<i class="uil uil-external-link-alt"></i> Sitede Gör
</a>
@else
<button type="button" onclick='editBlogItem({{ json_encode($blogItem) }})' class="px-3 py-1.5 bg-blue-50 text-blue-600 hover:bg-blue-100 font-bold rounded-lg text-xs transition-all flex items-center gap-1">
<i class="uil uil-pen"></i> Düzenle
</button>
<form action="{{ route('intern.blog.delete', $blogItem->id) }}" method="POST" onsubmit="return confirm('Bu blog yazısını silmek istediğinize emin misiniz?');">
@csrf
@method('DELETE')
<button type="submit" class="px-2.5 py-1.5 bg-slate-100 text-red-600 hover:bg-red-50 font-bold rounded-lg text-xs transition-all">
<i class="uil uil-trash-alt"></i>
</button>
</form>
@endif
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
</div>
</div>
</div> </div>
</div> </div>
@@ -1485,6 +1718,41 @@
} }
} }
function isTurkeyHoliday(dateObj) {
const yyyy = dateObj.getFullYear();
const mm = String(dateObj.getMonth() + 1).padStart(2, '0');
const dd = String(dateObj.getDate()).padStart(2, '0');
const ymd = `${yyyy}-${mm}-${dd}`;
const md = `${mm}-${dd}`;
const fixedHolidays = [
'01-01', '04-23', '05-01', '05-19', '07-15', '08-30', '10-29'
];
if (fixedHolidays.includes(md)) {
return true;
}
const variableHolidays = [
'2024-04-09', '2024-04-10', '2024-04-11', '2024-04-12',
'2024-06-15', '2024-06-16', '2024-06-17', '2024-06-18', '2024-06-19',
'2025-03-29', '2025-03-30', '2025-03-31', '2025-04-01',
'2025-06-05', '2025-06-06', '2025-06-07', '2025-06-08', '2025-06-09',
'2026-03-19', '2026-03-20', '2026-03-21', '2026-03-22',
'2026-05-26', '2026-05-27', '2026-05-28', '2026-05-29', '2026-05-30',
'2027-03-08', '2027-03-09', '2027-03-10', '2027-03-11',
'2027-05-15', '2027-05-16', '2027-05-17', '2027-05-18', '2027-05-19',
'2028-02-26', '2028-02-27', '2028-02-28', '2028-02-29',
'2028-05-04', '2028-05-05', '2028-05-06', '2028-05-07', '2028-05-08',
'2029-02-14', '2029-02-15', '2029-02-16', '2029-02-17',
'2029-04-23', '2029-04-24', '2029-04-25', '2029-04-26', '2029-04-27',
'2030-02-03', '2030-02-04', '2030-02-05', '2030-02-06',
'2030-04-12', '2030-04-13', '2030-04-14', '2030-04-15', '2030-04-16'
];
return variableHolidays.includes(ymd);
}
function calculateEndDateFrontend() { function calculateEndDateFrontend() {
const startDateVal = document.getElementById('internship_start_date').value; const startDateVal = document.getElementById('internship_start_date').value;
const totalDaysVal = document.getElementById('internship_total_days').value; const totalDaysVal = document.getElementById('internship_total_days').value;
@@ -1501,7 +1769,7 @@
while (count < daysToAdd) { while (count < daysToAdd) {
const dayOfWeek = date.getDay(); const dayOfWeek = date.getDay();
if (dayOfWeek === 6 || dayOfWeek === 0) { // 6 = Saturday, 0 = Sunday if (dayOfWeek === 6 || dayOfWeek === 0 || isTurkeyHoliday(date)) { // 6 = Saturday, 0 = Sunday
date.setDate(date.getDate() + 1); date.setDate(date.getDate() + 1);
continue; continue;
} }
@@ -1528,6 +1796,112 @@
}, 2000); }, 2000);
}); });
} }
let blogQuill = null;
document.addEventListener('DOMContentLoaded', function () {
if (document.getElementById('blog-quill-editor')) {
blogQuill = new Quill('#blog-quill-editor', {
theme: 'snow',
placeholder: 'Blog yazınızı buraya detaylı bir şekilde yazın...',
modules: {
toolbar: [
[{ 'header': [1, 2, 3, false] }],
['bold', 'italic', 'underline', 'strike', 'blockquote', 'code-block'],
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
['link', 'clean']
]
}
});
}
});
function updateCharCounter(inputId, counterId, maxLen) {
const input = document.getElementById(inputId);
const counter = document.getElementById(counterId);
if (!input || !counter) return;
const len = input.value.length;
counter.textContent = `${len} / ${maxLen}`;
if (len > maxLen) {
counter.className = 'text-[11px] font-extrabold text-red-600';
} else if (len >= maxLen * 0.85) {
counter.className = 'text-[11px] font-extrabold text-amber-600';
} else {
counter.className = 'text-[11px] font-extrabold text-slate-400';
}
}
function openBlogModal() {
document.getElementById('modal_blog_id').value = '';
document.getElementById('modal_blog_title').value = '';
document.getElementById('modal_intern_category').value = 'experience';
document.getElementById('modal_blog_excerpt').value = '';
document.getElementById('modal_meta_title').value = '';
document.getElementById('modal_meta_description').value = '';
updateCharCounter('modal_meta_title', 'modal_meta_title_counter', 60);
updateCharCounter('modal_meta_description', 'modal_meta_description_counter', 160);
if (blogQuill) blogQuill.setContents([]);
document.getElementById('blog-modal-title').querySelector('span').textContent = 'Yeni Blog Yazısı Ekle';
const modal = document.getElementById('blog-modal');
const card = document.getElementById('blog-modal-card');
modal.classList.remove('hidden');
setTimeout(() => {
card.classList.remove('scale-95', 'opacity-0');
card.classList.add('scale-100', 'opacity-100');
}, 10);
}
function editBlogItem(blogItem) {
document.getElementById('modal_blog_id').value = blogItem.id;
document.getElementById('modal_blog_title').value = blogItem.title;
document.getElementById('modal_intern_category').value = blogItem.intern_category || 'experience';
document.getElementById('modal_blog_excerpt').value = blogItem.excerpt || '';
document.getElementById('modal_meta_title').value = blogItem.meta_title || '';
document.getElementById('modal_meta_description').value = blogItem.meta_description || '';
updateCharCounter('modal_meta_title', 'modal_meta_title_counter', 60);
updateCharCounter('modal_meta_description', 'modal_meta_description_counter', 160);
if (blogQuill && blogItem.content) {
blogQuill.setContents([]);
blogQuill.clipboard.dangerouslyPasteHTML(blogItem.content);
}
document.getElementById('blog-modal-title').querySelector('span').textContent = 'Blog Yazısını Düzenle';
const modal = document.getElementById('blog-modal');
const card = document.getElementById('blog-modal-card');
modal.classList.remove('hidden');
setTimeout(() => {
card.classList.remove('scale-95', 'opacity-0');
card.classList.add('scale-100', 'opacity-100');
}, 10);
}
function closeBlogModal() {
const modal = document.getElementById('blog-modal');
const card = document.getElementById('blog-modal-card');
card.classList.remove('scale-100', 'opacity-100');
card.classList.add('scale-95', 'opacity-0');
setTimeout(() => {
modal.classList.add('hidden');
}, 300);
}
function submitBlogForm(actionType) {
const title = document.getElementById('modal_blog_title').value.trim();
if (!title) {
alert('Lütfen blog başlığını giriniz.');
return;
}
const htmlContent = blogQuill ? blogQuill.root.innerHTML.trim() : '';
if (!htmlContent || htmlContent === '<p><br></p>') {
alert('Lütfen blog içeriğini giriniz.');
return;
}
document.getElementById('modal_action_type').value = actionType;
document.getElementById('modal_blog_content').value = htmlContent;
document.getElementById('blog-form').submit();
}
</script> </script>
<style> <style>
.shadow-xl { .shadow-xl {
@@ -1557,5 +1931,96 @@
</style> </style>
@endpush @endpush
<!-- Blog Creation/Edit Modal -->
<div id="blog-modal" class="fixed inset-0 bg-slate-900/60 backdrop-blur-sm z-50 hidden flex items-center justify-center p-4">
<div class="bg-white rounded-3xl p-6 md:p-8 max-w-3xl w-full shadow-2xl border border-slate-100/50 transform scale-95 opacity-0 transition-all duration-300 max-h-[90vh] overflow-y-auto" id="blog-modal-card">
<div class="flex justify-between items-start mb-6">
<div>
<h3 class="text-xl font-extrabold text-slate-800 flex items-center gap-2" id="blog-modal-title">
<i class="uil uil-pen text-blue-600"></i>
<span>Yeni Blog Yazısı Ekle</span>
</h3>
<p class="text-xs text-slate-400 mt-1">Yazınız yöneticiniz tarafından onaylandıktan sonra web sitesinde yayınlanacaktır.</p>
</div>
<button type="button" onclick="closeBlogModal()" class="text-slate-400 hover:text-slate-600">
<i class="uil uil-multiply text-2xl"></i>
</button>
</div>
<form id="blog-form" action="{{ route('intern.blog.save') }}" method="POST" enctype="multipart/form-data">
@csrf
<input type="hidden" name="blog_id" id="modal_blog_id" value="" />
<input type="hidden" name="action_type" id="modal_action_type" value="submit" />
<input type="hidden" name="content" id="modal_blog_content" value="" />
<div class="space-y-5">
<div>
<label class="block text-xs font-extrabold text-slate-600 uppercase tracking-wider mb-2">Blog Başlığı *</label>
<input type="text" name="title" id="modal_blog_title" required class="w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-100 text-sm font-bold text-slate-800" placeholder="Örn: Uzaktan Staj Deneyimim ve Karşılaştığım Zorluklar" />
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label class="block text-xs font-extrabold text-slate-600 uppercase tracking-wider mb-2">Staj Konu Kategorisi *</label>
<select name="intern_category" id="modal_intern_category" required class="w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-100 text-sm font-bold text-slate-800">
<option value="experience">1. Staj Tecrübesi & Adaptasyon</option>
<option value="technical_challenge">2. Teknik Zorluklar & Çözümler</option>
<option value="product_showcase">3. Ürün / Proje Tanıtımı (Showcase)</option>
</select>
</div>
<div>
<label class="block text-xs font-extrabold text-slate-600 uppercase tracking-wider mb-2">Kapak Görseli</label>
<input type="file" name="featured_image" id="modal_featured_image" accept="image/*" class="w-full text-xs text-slate-500 file:mr-4 file:py-2.5 file:px-4 file:rounded-xl file:border-0 file:text-xs file:font-bold file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100" />
</div>
</div>
<div>
<label class="block text-xs font-extrabold text-slate-600 uppercase tracking-wider mb-2">Kısa Özet (Excerpt)</label>
<textarea name="excerpt" id="modal_blog_excerpt" rows="2" class="w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-100 text-xs font-medium text-slate-700" placeholder="Yazınızın liste sayfalarında görünecek kısa özeti..."></textarea>
</div>
<!-- SEO Meta Title & Meta Description Fields with Character Counter -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 p-4 bg-slate-50/80 rounded-2xl border border-slate-100">
<div>
<div class="flex justify-between items-center mb-1.5">
<label class="block text-xs font-extrabold text-slate-700 uppercase tracking-wider">SEO Meta Başlık</label>
<span id="modal_meta_title_counter" class="text-[11px] font-extrabold text-slate-400">0 / 60</span>
</div>
<input type="text" name="meta_title" id="modal_meta_title" maxlength="60" oninput="updateCharCounter('modal_meta_title', 'modal_meta_title_counter', 60)" class="w-full px-3.5 py-2.5 rounded-xl border border-slate-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-100 text-xs font-medium text-slate-800 bg-white" placeholder="Max. 60 karakter" />
<p class="text-[10px] text-slate-400 mt-1 font-semibold">Boş bırakılırsa blog başlığı kullanılır.</p>
</div>
<div>
<div class="flex justify-between items-center mb-1.5">
<label class="block text-xs font-extrabold text-slate-700 uppercase tracking-wider">SEO Meta Açıklama</label>
<span id="modal_meta_description_counter" class="text-[11px] font-extrabold text-slate-400">0 / 160</span>
</div>
<textarea name="meta_description" id="modal_meta_description" rows="2" maxlength="160" oninput="updateCharCounter('modal_meta_description', 'modal_meta_description_counter', 160)" class="w-full px-3.5 py-2 rounded-xl border border-slate-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-100 text-xs font-medium text-slate-700 bg-white" placeholder="Max. 160 karakter"></textarea>
<p class="text-[10px] text-slate-400 mt-1 font-semibold">Boş bırakılırsa kısa özet kullanılır.</p>
</div>
</div>
<div>
<label class="block text-xs font-extrabold text-slate-600 uppercase tracking-wider mb-2">Blog İçeriği *</label>
<div id="blog-quill-editor-container" class="rounded-xl border border-slate-200 overflow-hidden">
<div id="blog-quill-editor" style="height: 250px;"></div>
</div>
</div>
</div>
<div class="flex flex-col sm:flex-row justify-end gap-3 mt-8 pt-4 border-t border-slate-100">
<button type="button" onclick="submitBlogForm('draft')" class="px-5 py-3 rounded-xl bg-slate-100 hover:bg-slate-200 text-slate-700 font-extrabold text-xs transition-all">
Taslak Olarak Kaydet
</button>
<button type="button" onclick="submitBlogForm('submit')" class="px-6 py-3 rounded-xl bg-blue-600 hover:bg-blue-700 text-white font-extrabold text-xs transition-all shadow-md shadow-blue-500/10 flex items-center justify-center gap-2">
<i class="uil uil-arrow-right text-base"></i>
<span>Onaya Gönder</span>
</button>
</div>
</form>
</div>
</div>
@include('front.career.partials.guide_modal') @include('front.career.partials.guide_modal')
@endsection @endsection
@@ -0,0 +1,525 @@
<!-- Quick Approval Management View -->
<div class="bg-white rounded-3xl p-6 md:p-8 shadow-xl border border-slate-100/50">
<!-- Header & Description -->
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-8 pb-6 border-b border-slate-100">
<div>
<h3 class="font-bold text-slate-800 text-lg flex items-center gap-2">
<i class="uil uil-check-square text-[#e31e24] text-xl"></i>
<span>Hızlı Defter Onaylama</span>
</h3>
<p class="text-xs text-slate-400 font-semibold mt-1">Stajyerlerin günlük yazdığı raporları tek bir ekrandan inceleyin ve onaylayın.</p>
</div>
<!-- Filter Options -->
<div class="flex flex-wrap items-center gap-3">
<div class="flex bg-slate-50 p-1 rounded-xl border border-slate-200/50">
<button type="button" onclick="setQuickFilter('unapproved')" id="qf-btn-unapproved" class="px-4 py-2 text-xs font-bold rounded-lg transition-all cursor-pointer bg-white text-blue-600 shadow-sm border border-slate-200/20">
Onay Bekleyenler
</button>
<button type="button" onclick="setQuickFilter('today')" id="qf-btn-today" class="px-4 py-2 text-xs font-bold rounded-lg transition-all cursor-pointer text-slate-600 hover:text-slate-900">
Bugün Yazılanlar
</button>
</div>
<!-- Date Picker for custom date -->
<div id="qf-date-wrapper" class="hidden">
<input type="date" id="qf-date-input" onchange="loadQuickApprovalEntries()" value="{{ date('Y-m-d') }}" class="text-xs font-semibold text-slate-700 bg-white border border-slate-200 rounded-xl px-3 py-2 focus:outline-none focus:border-blue-400">
</div>
</div>
</div>
<!-- Loading State -->
<div id="qa-loading" class="flex flex-col items-center justify-center py-16">
<div class="animate-spin rounded-full h-10 w-10 border-b-2 border-blue-600 mb-3"></div>
<p class="text-xs font-semibold text-slate-400">Defter kayıtları yükleniyor...</p>
</div>
<!-- Empty State -->
<div id="qa-empty" class="hidden flex flex-col items-center justify-center py-16 text-center">
<div class="w-16 h-16 bg-emerald-50 rounded-2xl text-emerald-500 flex items-center justify-center text-3xl mb-4 border border-emerald-100">
<i class="uil uil-smile-beam"></i>
</div>
<h4 id="qa-empty-title" class="font-extrabold text-slate-800 text-sm">Harika! Onay Bekleyen Defter Yok</h4>
<p id="qa-empty-desc" class="text-xs text-slate-400 font-semibold mt-1">Şu anda onayınızı bekleyen hiçbir stajyer raporu bulunmuyor.</p>
</div>
<!-- Content List Grid -->
<div id="qa-list-grid" class="hidden grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Loaded dynamically -->
</div>
</div>
<!-- Dedicated Quick Approval Entry Reading Modal -->
<div id="quick-entry-modal" class="fixed inset-0 z-[9999] hidden items-center justify-center bg-slate-900/60 backdrop-blur-sm transition-opacity duration-300">
<div class="bg-white rounded-3xl shadow-2xl border border-slate-100 max-w-2xl w-full mx-4 overflow-hidden transform scale-95 opacity-0 transition-all duration-300 flex flex-col max-h-[85vh]" id="quick-entry-modal-card">
<!-- Header -->
<div class="px-6 py-4 bg-gradient-to-r from-blue-50 to-indigo-50/30 border-b border-slate-100 flex items-center justify-between flex-shrink-0">
<div>
<h4 id="qem-intern-name" class="font-bold text-slate-800 text-sm">Stajyer İsmi</h4>
<p id="qem-meta" class="text-xs text-slate-400 font-semibold mt-0.5"></p>
</div>
<button type="button" onclick="closeQuickEntryModal()" class="text-slate-400 hover:text-slate-600 transition-colors p-1.5 rounded-full hover:bg-slate-100/80">
<svg class="w-5 h-5" fill="none" stroke="currentColor" stroke-width="2.5" viewBox="0 0 24 24"><path d="M6 18L18 6M6 6l12 12"/></svg>
</button>
</div>
<!-- Body -->
<div class="flex-grow p-6 overflow-y-auto no-scrollbar flex flex-col min-h-[250px]">
<div id="qem-retroactive-badge" class="mb-4">
<!-- Retroactive indicator -->
</div>
<div id="qem-content" class="prose max-w-none text-slate-700 leading-relaxed text-sm select-text flex-grow">
<!-- Full text rendered safely -->
</div>
</div>
<!-- Footer Controls -->
<div class="px-6 py-4 bg-slate-50 border-t border-slate-100 flex flex-col sm:flex-row items-center justify-between gap-4 flex-shrink-0">
<!-- Carousel navigation -->
<div class="flex items-center gap-2">
<button type="button" id="qem-btn-prev" onclick="prevQuickEntry()" class="px-3 py-1.5 bg-white hover:bg-slate-100 border border-slate-200 text-slate-600 rounded-xl text-xs font-bold transition-all flex items-center gap-1 cursor-pointer">
<i class="uil uil-angle-left-b text-sm"></i> Önceki
</button>
<span id="qem-indicator" class="text-xs font-extrabold text-slate-500 bg-slate-200/50 px-2.5 py-1.5 rounded-lg">0 / 0</span>
<button type="button" id="qem-btn-next" onclick="nextQuickEntry()" class="px-3 py-1.5 bg-white hover:bg-slate-100 border border-slate-200 text-slate-600 rounded-xl text-xs font-bold transition-all flex items-center gap-1 cursor-pointer">
Sonraki <i class="uil uil-angle-right-b text-sm"></i>
</button>
</div>
<!-- Action Button -->
<div class="flex items-center gap-3">
<button type="button" id="qem-action-btn" onclick="toggleQuickEntryApproval()" class="px-5 py-2.5 text-white rounded-xl font-bold text-xs shadow-lg transition-all cursor-pointer">
Onayla
</button>
<button type="button" onclick="closeQuickEntryModal()" class="px-4 py-2.5 bg-slate-800 hover:bg-slate-900 text-white font-bold rounded-xl text-xs transition-colors cursor-pointer">Kapat</button>
</div>
</div>
</div>
</div>
<!-- Safe DOM HTML Sanitizer script -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/3.1.6/purify.min.js" integrity="sha384-+VfUPEb0PdtChMwmBcBmykRMDd+v6D/oFmB3rZM/puCMDYcIvF968OimRh4KQY9a" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
let quickApprovalEntries = [];
let currentQuickFilter = 'unapproved';
let activeQuickEntryIndex = -1;
let isUpdatingQuickApproval = false;
function setQuickFilter(filter) {
currentQuickFilter = filter;
// Toggle active state classes on filter buttons
const btnUnapproved = document.getElementById('qf-btn-unapproved');
const btnToday = document.getElementById('qf-btn-today');
const dateWrapper = document.getElementById('qf-date-wrapper');
if (filter === 'unapproved') {
btnUnapproved.className = "px-4 py-2 text-xs font-bold rounded-lg transition-all cursor-pointer bg-white text-blue-600 shadow-sm border border-slate-200/20";
btnToday.className = "px-4 py-2 text-xs font-bold rounded-lg transition-all cursor-pointer text-slate-600 hover:text-slate-900";
dateWrapper.classList.add('hidden');
} else {
btnToday.className = "px-4 py-2 text-xs font-bold rounded-lg transition-all cursor-pointer bg-white text-blue-600 shadow-sm border border-slate-200/20";
btnUnapproved.className = "px-4 py-2 text-xs font-bold rounded-lg transition-all cursor-pointer text-slate-600 hover:text-slate-900";
dateWrapper.classList.remove('hidden');
}
loadQuickApprovalEntries();
}
function loadQuickApprovalEntries() {
const listGrid = document.getElementById('qa-list-grid');
const loadingEl = document.getElementById('qa-loading');
const emptyEl = document.getElementById('qa-empty');
listGrid.classList.add('hidden');
emptyEl.classList.add('hidden');
loadingEl.classList.remove('hidden');
let url = `/stajyer/admin/quick-approval-entries?type=${currentQuickFilter}`;
if (currentQuickFilter === 'today') {
const selectedDate = document.getElementById('qf-date-input').value;
if (selectedDate) {
url += `&date=${selectedDate}`;
}
}
fetch(url)
.then(res => res.json())
.then(data => {
loadingEl.classList.add('hidden');
if (!data.success) {
alert('Kayıtlar yüklenemedi.');
return;
}
quickApprovalEntries = data.entries;
// Update unapproved badge dynamic count if filter is unapproved
if (currentQuickFilter === 'unapproved') {
updateBadgeCount(quickApprovalEntries.length);
}
if (quickApprovalEntries.length === 0) {
const emptyTitle = document.getElementById('qa-empty-title');
const emptyDesc = document.getElementById('qa-empty-desc');
if (currentQuickFilter === 'unapproved') {
emptyTitle.textContent = "Onay Bekleyen Defter Yok";
emptyDesc.textContent = "Harika! Şu anda onayınızı bekleyen hiçbir stajyer raporu bulunmuyor.";
} else {
emptyTitle.textContent = "Kayıt Bulunamadı";
emptyDesc.textContent = "Seçilen tarihte yazılmış herhangi bir stajyer defteri kaydı bulunmuyor.";
}
emptyEl.classList.remove('hidden');
return;
}
renderQuickListGrid();
listGrid.classList.remove('hidden');
})
.catch(err => {
console.error(err);
loadingEl.classList.add('hidden');
alert('Sunucuyla bağlantı kurulurken bir hata oluştu.');
});
}
function renderQuickListGrid() {
const grid = document.getElementById('qa-list-grid');
grid.innerHTML = '';
quickApprovalEntries.forEach((entry, index) => {
// Helper to strip HTML tags for a clean content preview snippet
const tempDiv = document.createElement('div');
tempDiv.innerHTML = entry.content;
const cleanText = tempDiv.textContent || tempDiv.innerText || "";
const snippet = cleanText.length > 120 ? cleanText.substring(0, 120) + '...' : cleanText;
const card = document.createElement('div');
card.id = `qa-card-${entry.id}`;
card.className = "bg-slate-50/50 rounded-2xl p-5 border border-slate-200/40 hover:border-blue-200 hover:bg-blue-50/5 transition-all flex flex-col justify-between shadow-sm relative";
let badgeHtml = '';
if (entry.supervisor_approved) {
badgeHtml = `<span class="inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[10px] font-extrabold uppercase bg-emerald-50 text-emerald-700 border border-emerald-100">ONAYLI</span>`;
} else {
badgeHtml = `<span class="inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[10px] font-extrabold uppercase bg-amber-50 text-amber-700 border border-amber-200">ONAY BEKLİYOR</span>`;
}
let retroHtml = '';
if (entry.is_retroactive) {
retroHtml = `<span class="inline-flex items-center px-1.5 py-0.5 rounded text-[8px] font-extrabold uppercase bg-rose-50 text-rose-600 border border-rose-100">Geriye Dönük</span>`;
}
card.innerHTML = `
<div class="mb-4">
<!-- Top Row -->
<div class="flex items-start justify-between gap-2 mb-3">
<div>
<h4 class="font-extrabold text-slate-800 text-sm hover:underline hover:text-blue-600 cursor-pointer" onclick="openInternJournalModal(${entry.intern.id})">
${escapeHTML(entry.intern.name)}
</h4>
<span class="text-[10px] text-slate-400 font-semibold block mt-0.5">${escapeHTML(entry.intern.email)}</span>
</div>
<div class="flex flex-col items-end gap-1.5">
${badgeHtml}
${retroHtml}
</div>
</div>
<!-- Day & Date Info -->
<div class="mb-3 text-[11px] font-extrabold text-blue-600 bg-blue-50/50 px-2.5 py-1.5 rounded-xl w-max">
${entry.day_number}. Gün (${entry.formatted_date})
</div>
<!-- Snippet Content Preview -->
<p class="text-xs text-slate-600 leading-relaxed font-medium bg-white p-3.5 rounded-xl border border-slate-100/80 min-h-[60px] italic">
"${escapeHTML(snippet)}"
</p>
</div>
<!-- Card Actions -->
<div class="pt-3 border-t border-slate-200/50 flex items-center justify-between gap-3">
<button type="button" onclick="openQuickEntryModal(${index})" class="px-3.5 py-2 bg-slate-100 hover:bg-slate-200 text-slate-700 font-bold rounded-xl text-[11px] transition-all cursor-pointer flex items-center gap-1.5">
<i class="uil uil-book-open"></i> Oku & Onayla
</button>
${!entry.supervisor_approved ? `
<button type="button" id="quick-approve-btn-${entry.id}" onclick="quickApproveEntry(${entry.id}, ${index})" class="px-3.5 py-2 bg-emerald-600 hover:bg-emerald-700 text-white font-bold rounded-xl text-[11px] transition-all shadow-md shadow-emerald-500/10 cursor-pointer flex items-center gap-1">
<i class="uil uil-check"></i> Hızlı Onayla
</button>
` : `
<button type="button" id="quick-approve-btn-${entry.id}" onclick="quickApproveEntry(${entry.id}, ${index})" class="px-3.5 py-2 bg-rose-50 hover:bg-rose-100 text-rose-600 border border-rose-200 font-bold rounded-xl text-[11px] transition-all cursor-pointer flex items-center gap-1">
<i class="uil uil-times"></i> Onayı Kaldır
</button>
`}
</div>
`;
grid.appendChild(card);
});
}
function updateBadgeCount(count) {
const badge = document.getElementById('quick-approval-badge');
if (badge) {
badge.textContent = count;
if (count > 0) {
badge.classList.remove('hidden');
} else {
badge.classList.add('hidden');
}
}
}
function quickApproveEntry(entryId, index) {
const btn = document.getElementById(`quick-approve-btn-${entryId}`);
if (!btn || isUpdatingQuickApproval) return;
isUpdatingQuickApproval = true;
btn.style.opacity = '0.5';
fetch('/stajyer/admin/toggle-approval', {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-CSRF-TOKEN": "{{ csrf_token() }}"
},
body: JSON.stringify({
entry_id: entryId
})
})
.then(res => res.json())
.then(data => {
if (data.success) {
// Update entry status in local array
quickApprovalEntries[index].supervisor_approved = data.status;
quickApprovalEntries[index].supervisor_name = data.supervisor_name;
// If in "unapproved" view, and we approved, we can slide out the card nicely
if (currentQuickFilter === 'unapproved' && data.status) {
const card = document.getElementById(`qa-card-${entryId}`);
if (card) {
card.style.transition = 'all 0.3s ease-out';
card.style.transform = 'scale(0.95)';
card.style.opacity = '0';
setTimeout(() => {
// Remove item from array and re-render or just remove the element
quickApprovalEntries = quickApprovalEntries.filter(e => e.id !== entryId);
updateBadgeCount(quickApprovalEntries.length);
if (quickApprovalEntries.length === 0) {
document.getElementById('qa-list-grid').classList.add('hidden');
document.getElementById('qa-empty').classList.remove('hidden');
} else {
renderQuickListGrid();
}
}, 300);
}
} else {
// Just re-render list
renderQuickListGrid();
}
} else {
alert(data.message || 'Onay güncellenemedi.');
}
})
.catch(err => {
console.error(err);
alert('İşlem gerçekleştirilemedi.');
})
.finally(() => {
isUpdatingQuickApproval = false;
if (btn) btn.style.opacity = '1';
});
}
// Quick entry modal logic
function openQuickEntryModal(index) {
activeQuickEntryIndex = index;
const modal = document.getElementById('quick-entry-modal');
if (!modal) return;
modal.classList.remove('hidden');
modal.classList.add('flex');
const card = document.getElementById('quick-entry-modal-card');
if (card) {
setTimeout(() => {
card.classList.remove('scale-95', 'opacity-0');
card.classList.add('scale-100', 'opacity-100');
}, 50);
}
renderQuickEntryDetails();
}
function closeQuickEntryModal() {
const modal = document.getElementById('quick-entry-modal');
if (!modal) return;
const card = document.getElementById('quick-entry-modal-card');
if (card) {
card.classList.remove('scale-100', 'opacity-100');
card.classList.add('scale-95', 'opacity-0');
}
setTimeout(() => {
modal.classList.add('hidden');
modal.classList.remove('flex');
}, 200);
}
function renderQuickEntryDetails() {
if (activeQuickEntryIndex < 0 || activeQuickEntryIndex >= quickApprovalEntries.length) return;
const entry = quickApprovalEntries[activeQuickEntryIndex];
// Header details
document.getElementById('qem-intern-name').textContent = entry.intern.name;
document.getElementById('qem-meta').textContent = `${entry.day_number}. Gün - ${entry.formatted_date}`;
// Retroactive badge
const retroBadge = document.getElementById('qem-retroactive-badge');
retroBadge.innerHTML = '';
if (entry.is_retroactive) {
retroBadge.innerHTML = `
<span class="inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-rose-50 text-rose-700 text-[10px] font-extrabold uppercase border border-rose-100">
<span class="w-1.5 h-1.5 rounded-full bg-rose-500 animate-pulse"></span>
Geriye Dönük Kayıt
</span>
`;
}
// Body content (Sanitized using DOMPurify!)
const cleanHTML = DOMPurify.sanitize(entry.content);
document.getElementById('qem-content').innerHTML = cleanHTML || '<p class="text-slate-400 italic">Boş içerik.</p>';
// Carousel buttons indicators
document.getElementById('qem-indicator').textContent = `${activeQuickEntryIndex + 1} / ${quickApprovalEntries.length}`;
const btnPrev = document.getElementById('qem-btn-prev');
const btnNext = document.getElementById('qem-btn-next');
btnPrev.disabled = activeQuickEntryIndex === 0;
btnPrev.style.opacity = activeQuickEntryIndex === 0 ? '0.4' : '1';
btnPrev.style.cursor = activeQuickEntryIndex === 0 ? 'not-allowed' : 'pointer';
btnNext.disabled = activeQuickEntryIndex === quickApprovalEntries.length - 1;
btnNext.style.opacity = activeQuickEntryIndex === quickApprovalEntries.length - 1 ? '0.4' : '1';
btnNext.style.cursor = activeQuickEntryIndex === quickApprovalEntries.length - 1 ? 'not-allowed' : 'pointer';
// Action button
const actBtn = document.getElementById('qem-action-btn');
if (entry.supervisor_approved) {
actBtn.textContent = "Onayı Kaldır";
actBtn.className = "px-5 py-2.5 text-white bg-rose-600 hover:bg-rose-700 rounded-xl font-bold text-xs shadow-lg shadow-rose-500/20 transition-all cursor-pointer";
} else {
actBtn.textContent = "Günü Onayla";
actBtn.className = "px-5 py-2.5 text-white bg-emerald-600 hover:bg-emerald-700 rounded-xl font-bold text-xs shadow-lg shadow-emerald-500/20 transition-all cursor-pointer";
}
}
function prevQuickEntry() {
if (activeQuickEntryIndex > 0) {
activeQuickEntryIndex--;
renderQuickEntryDetails();
}
}
function nextQuickEntry() {
if (activeQuickEntryIndex < quickApprovalEntries.length - 1) {
activeQuickEntryIndex++;
renderQuickEntryDetails();
}
}
function toggleQuickEntryApproval() {
if (activeQuickEntryIndex < 0 || isUpdatingQuickApproval) return;
const entry = quickApprovalEntries[activeQuickEntryIndex];
const actBtn = document.getElementById('qem-action-btn');
isUpdatingQuickApproval = true;
actBtn.style.opacity = '0.5';
fetch('/stajyer/admin/toggle-approval', {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-CSRF-TOKEN": "{{ csrf_token() }}"
},
body: JSON.stringify({
entry_id: entry.id
})
})
.then(res => res.json())
.then(data => {
if (data.success) {
entry.supervisor_approved = data.status;
entry.supervisor_name = data.supervisor_name;
// If in unapproved filter, and we approved, we'll remove it after closing/switching, or we can handle it seamlessly
// For modal, it's nice to either show updated status, or automatically move to next unapproved entry!
if (currentQuickFilter === 'unapproved' && data.status) {
// Approved! Remove from list, decrement badge, and move to next or close if empty
const oldIndex = activeQuickEntryIndex;
quickApprovalEntries = quickApprovalEntries.filter(e => e.id !== entry.id);
updateBadgeCount(quickApprovalEntries.length);
if (quickApprovalEntries.length === 0) {
closeQuickEntryModal();
document.getElementById('qa-list-grid').classList.add('hidden');
document.getElementById('qa-empty').classList.remove('hidden');
} else {
// Keep the index clamped within the new list bounds
activeQuickEntryIndex = Math.min(oldIndex, quickApprovalEntries.length - 1);
renderQuickEntryDetails();
renderQuickListGrid();
}
} else {
// Just update UI inside modal & grid
renderQuickEntryDetails();
renderQuickListGrid();
}
} else {
alert(data.message || 'Onay güncellenemedi.');
}
})
.catch(err => {
console.error(err);
alert('İşlem gerçekleştirilemedi.');
})
.finally(() => {
isUpdatingQuickApproval = false;
actBtn.style.opacity = '1';
});
}
function escapeHTML(str) {
if (!str) return '';
return str.replace(/[&<>'"]/g,
tag => ({
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
"'": '&#39;',
'"': '&quot;'
}[tag] || tag)
);
}
// Handle ESC key for quick approval modal
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
closeQuickEntryModal();
}
});
</script>
+1 -2
View File
@@ -14,8 +14,7 @@
<link rel="preload" href="{{ asset('html/assets/css/fonts/urbanist.css') }}" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="{{ asset('html/assets/css/fonts/urbanist.css') }}" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=translate&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'"> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=translate">
<noscript><link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=translate&display=swap" rel="stylesheet"></noscript>
@stack('styles') @stack('styles')
<style> <style>
.navbar.navbar-light.fixed .btn:not(.btn-expand):not(.btn-gradient) { .navbar.navbar-light.fixed .btn:not(.btn-expand):not(.btn-gradient) {
+2 -13
View File
@@ -77,15 +77,6 @@ $favicon_path = setting('site_favicon');
<link rel="icon" href="{{ $favicon_path ? (str_starts_with($favicon_path, 'http') ? $favicon_path : asset($favicon_path)) : asset('assets/img/favicon.png') }}"> <link rel="icon" href="{{ $favicon_path ? (str_starts_with($favicon_path, 'http') ? $favicon_path : asset($favicon_path)) : asset('assets/img/favicon.png') }}">
@stack('head') @stack('head')
@if(request()->routeIs('homepage'))
@php
$hero_bg_preload = setting('hero_bg') ?: './assets/img/photos/bg16.webp';
if ($hero_bg_preload && !str_starts_with($hero_bg_preload, 'http')) {
$hero_bg_preload = asset($hero_bg_preload);
}
@endphp
<link rel="preload" href="{{ $hero_bg_preload }}" as="image" fetchpriority="high">
@endif
<link rel="stylesheet" href="{{ asset('html/style.css') }}"> <link rel="stylesheet" href="{{ asset('html/style.css') }}">
<link rel="preload" href="{{ asset('assets/css/icon.css') }}" as="style" onload="this.onload=null;this.rel='stylesheet'"> <link rel="preload" href="{{ asset('assets/css/icon.css') }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ asset('assets/css/icon.css') }}"></noscript> <noscript><link rel="stylesheet" href="{{ asset('assets/css/icon.css') }}"></noscript>
@@ -98,10 +89,8 @@ $favicon_path = setting('site_favicon');
<link rel="preload" href="{{ asset('assets/css/fonts/space.css') }}" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="{{ asset('assets/css/fonts/space.css') }}" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'"> <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<noscript><link href="https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap" rel="stylesheet"></noscript> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=translate">
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=translate&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&icon_names=translate&display=swap" rel="stylesheet"></noscript>
<!-- Site Verification --> <!-- Site Verification -->
@if(setting('seo_google_search_console')) @if(setting('seo_google_search_console'))
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+208 -153
View File
@@ -4,6 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=device-width, initial-scale=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=device-width, initial-scale=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="robots" content="noindex, nofollow">
<title>{{ $proposal->title }} - Trunçgil Teknoloji</title> <title>{{ $proposal->title }} - Trunçgil Teknoloji</title>
<!-- Google Fonts: Inter (Body), Outfit (Headings), Caveat (Signature Script) --> <!-- Google Fonts: Inter (Body), Outfit (Headings), Caveat (Signature Script) -->
@@ -73,65 +74,55 @@
box-shadow: 0 0 8px var(--accent-color-glow); box-shadow: 0 0 8px var(--accent-color-glow);
} }
/* Rendered Markdown Styling */ /* Rendered Markdown Styling & Responsive Overflow Control */
.proposal-content h1 { .proposal-content {
font-family: 'Outfit', sans-serif; word-break: break-word;
font-size: 2.25rem; overflow-wrap: anywhere;
font-weight: 800;
color: #0f172a;
margin-top: 2rem;
margin-bottom: 1rem;
line-height: 1.2;
} }
.dark .proposal-content h1 { color: #f8fafc; }
.proposal-content h2 {
font-family: 'Outfit', sans-serif;
font-size: 1.6rem;
font-weight: 700;
color: #1e293b;
margin-top: 2.5rem;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
line-height: 1.3;
}
.dark .proposal-content h2 {
color: #f1f5f9;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.proposal-content h3 {
font-family: 'Outfit', sans-serif;
font-size: 1.25rem;
font-weight: 600;
color: #334155;
margin-top: 1.8rem;
margin-bottom: 0.75rem;
}
.dark .proposal-content h3 { color: #e2e8f0; }
.proposal-content p { .proposal-content img {
font-size: 1rem; max-width: 100%;
line-height: 1.7; height: auto;
color: #475569; border-radius: 12px;
margin-bottom: 1.25rem; }
.proposal-content pre {
max-width: 100%;
overflow-x: auto;
border-radius: 12px;
white-space: pre-wrap;
word-break: break-word;
}
.proposal-content code {
word-break: break-word;
}
/* Responsive Table Wrapper */
.table-responsive {
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin: 1.5rem 0;
border-radius: 12px;
border: 1px solid rgba(0, 0, 0, 0.06);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}
.dark .table-responsive {
border: 1px solid rgba(255, 255, 255, 0.06);
box-shadow: none;
} }
.dark .proposal-content p { color: #94a3b8; }
/* Tables inside Markdown styling */
.proposal-content table { .proposal-content table {
width: 100%; width: 100%;
margin: 2rem 0; min-width: 600px;
margin: 0;
border-collapse: collapse; border-collapse: collapse;
font-size: 0.925rem; font-size: 0.9rem;
border-radius: 12px; border: none;
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.05);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
} }
.dark .proposal-content table { .dark .proposal-content table {
border: 1px solid rgba(255, 255, 255, 0.05); border: none;
box-shadow: none; box-shadow: none;
} }
@@ -296,7 +287,68 @@
display: block; display: block;
} }
.mermaid-container.mermaid-active { .mermaid-container.mermaid-active {
box-shadow: 0 0 0 2px var(--accent-color, #4f46e5); box-shadow: 0 0 0 2px var(--accent-color, #ea580c);
}
/* Mermaid Orange/Red Brand Theme Styling Overrides */
.mermaid svg .task {
fill: #ea580c !important;
stroke: #c2410c !important;
rx: 6px !important;
ry: 6px !important;
}
.mermaid svg .task0, .mermaid svg .task2 {
fill: #ea580c !important;
stroke: #c2410c !important;
}
.mermaid svg .task1, .mermaid svg .task3 {
fill: #ef4444 !important;
stroke: #b91c1c !important;
}
.mermaid svg .taskText,
.mermaid svg .taskTextOutsideRight,
.mermaid svg .taskTextOutsideLeft {
font-family: 'Inter', sans-serif !important;
font-weight: 600 !important;
}
.mermaid svg .taskText {
fill: #ffffff !important;
}
.mermaid svg .taskTextOutsideRight,
.mermaid svg .taskTextOutsideLeft {
fill: #1e293b !important;
}
.dark .mermaid svg .taskTextOutsideRight,
.dark .mermaid svg .taskTextOutsideLeft {
fill: #f1f5f9 !important;
}
.mermaid svg .section0,
.mermaid svg .section2 {
fill: rgba(234, 88, 12, 0.08) !important;
}
.dark .mermaid svg .section0,
.dark .mermaid svg .section2 {
fill: rgba(234, 88, 12, 0.18) !important;
}
.mermaid svg .section1,
.mermaid svg .section3 {
fill: rgba(239, 68, 68, 0.08) !important;
}
.dark .mermaid svg .section1,
.dark .mermaid svg .section3 {
fill: rgba(239, 68, 68, 0.18) !important;
}
.mermaid svg .today {
stroke: #ef4444 !important;
stroke-width: 2px !important;
}
.mermaid svg .titleText {
fill: #0f172a !important;
font-weight: 700 !important;
font-family: 'Outfit', sans-serif !important;
}
.dark .mermaid svg .titleText {
fill: #f8fafc !important;
} }
/* Fullscreen overlay */ /* Fullscreen overlay */
@@ -411,27 +463,27 @@
</style> </style>
@php @php
$accent = $proposal->meta['accent_color'] ?? 'indigo'; $accent = $proposal->meta['accent_color'] ?? 'coral';
$accentColor = match($accent) { $accentColor = match($accent) {
'emerald' => '#059669', 'emerald' => '#059669',
'cyberpunk' => '#ec4899', 'cyberpunk' => '#ec4899',
'coral' => '#ea580c', 'coral' => '#ea580c',
'amber' => '#d97706', 'amber' => '#d97706',
default => '#4f46e5', default => '#ea580c',
}; };
$accentColorGlow = match($accent) { $accentColorGlow = match($accent) {
'emerald' => 'rgba(5, 150, 105, 0.2)', 'emerald' => 'rgba(5, 150, 105, 0.2)',
'cyberpunk' => 'rgba(236, 72, 153, 0.2)', 'cyberpunk' => 'rgba(236, 72, 153, 0.2)',
'coral' => 'rgba(234, 88, 12, 0.2)', 'coral' => 'rgba(234, 88, 12, 0.2)',
'amber' => 'rgba(217, 119, 6, 0.2)', 'amber' => 'rgba(217, 119, 6, 0.2)',
default => 'rgba(79, 70, 229, 0.2)', default => 'rgba(234, 88, 12, 0.2)',
}; };
$themeClass = match($accent) { $themeClass = match($accent) {
'emerald' => 'theme-emerald bg-emerald-600 hover:bg-emerald-700 focus:ring-emerald-500 text-emerald-600 dark:text-emerald-400 border-emerald-500/20', 'emerald' => 'theme-emerald bg-emerald-600 hover:bg-emerald-700 focus:ring-emerald-500 text-emerald-600 dark:text-emerald-400 border-emerald-500/20',
'cyberpunk' => 'theme-rose bg-rose-500 hover:bg-rose-600 focus:ring-rose-400 text-rose-500 dark:text-rose-400 border-rose-500/20', 'cyberpunk' => 'theme-rose bg-rose-500 hover:bg-rose-600 focus:ring-rose-400 text-rose-500 dark:text-rose-400 border-rose-500/20',
'coral' => 'theme-orange bg-orange-600 hover:bg-orange-700 focus:ring-orange-500 text-orange-600 dark:text-orange-400 border-orange-500/20', 'coral' => 'theme-orange bg-orange-600 hover:bg-orange-700 focus:ring-orange-500 text-orange-600 dark:text-orange-400 border-orange-500/20',
'amber' => 'theme-amber bg-amber-600 hover:bg-amber-700 focus:ring-amber-500 text-amber-600 dark:text-amber-400 border-amber-500/20', 'amber' => 'theme-amber bg-amber-600 hover:bg-amber-700 focus:ring-amber-500 text-amber-600 dark:text-amber-400 border-amber-500/20',
default => 'theme-indigo bg-indigo-600 hover:bg-indigo-700 focus:ring-indigo-500 text-indigo-600 dark:text-indigo-400 border-indigo-500/20', default => 'theme-orange bg-orange-600 hover:bg-orange-700 focus:ring-orange-500 text-orange-600 dark:text-orange-400 border-orange-500/20',
}; };
$gradient = match($accent) { $gradient = match($accent) {
'emerald' => 'from-emerald-600 to-teal-600 dark:from-emerald-500 dark:to-teal-500', 'emerald' => 'from-emerald-600 to-teal-600 dark:from-emerald-500 dark:to-teal-500',
@@ -644,8 +696,8 @@
</article> </article>
<!-- Interactive pricing & Gaziantep Teknopark %0 KDV muafiyeti box --> <!-- Fixed Gaziantep Teknopark %0 KDV muafiyeti & Net Fiyat box -->
@if($proposal->total_price && ($proposal->meta['show_calculator'] ?? true)) @if($proposal->total_price)
<section class="p-6 sm:p-8 rounded-2xl bg-white dark:bg-slate-800 border border-slate-200/60 dark:border-slate-700/50 shadow-sm relative overflow-hidden transition-all duration-300"> <section class="p-6 sm:p-8 rounded-2xl bg-white dark:bg-slate-800 border border-slate-200/60 dark:border-slate-700/50 shadow-sm relative overflow-hidden transition-all duration-300">
<div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r {{ $gradient }}"></div> <div class="absolute top-0 left-0 w-full h-1 bg-gradient-to-r {{ $gradient }}"></div>
@@ -657,39 +709,29 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" class="w-4 h-4"> <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z" /> <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z" />
</svg> </svg>
<span>Teknopark KDV Muafiyeti Avantajı</span> <span>Teknopark KDV Muafiyeti (%0 KDV)</span>
</div> </div>
<h3 class="text-xl font-display font-bold text-slate-900 dark:text-white mb-2"> <h3 class="text-xl font-display font-bold text-slate-900 dark:text-white mb-2">
4691 Sayılı Kanun KDV Muafiyeti 4691 Sayılı Kanun KDV Muafiyetli Net Fiyat
</h3> </h3>
<p class="text-sm text-slate-500 dark:text-slate-400 leading-relaxed mb-0"> <p class="text-sm text-slate-500 dark:text-slate-400 leading-relaxed mb-0">
Trunçgil Teknoloji, Gaziantep Üniversitesi Teknoparkı bünyesinde AR-GE yürüten tescilli bir kuruluştur. Kanun kapsamında geliştirdiğimiz yazılım çözümleri KDV'den (%0 KDV) istisnadır. Bu sayede maliyetlerinizde doğrudan avantaj sağlarsınız. Trunçgil Teknoloji, Gaziantep Üniversitesi Teknoparkı bünyesinde AR-GE yürüten tescilli bir kuruluştur. 4691 Sayılı Kanun kapsamında geliştirdiğimiz yazılım çözümleri KDV'den (%0 KDV) istisnadır.
</p> </p>
</div> </div>
<!-- Interactive Box with Toggle Switch --> <!-- Price Summary Box (Fixed Net Price, Non-Optional) -->
<div class="w-full md:w-80 shrink-0 p-5 rounded-2xl bg-slate-50 dark:bg-slate-900 border border-slate-100 dark:border-slate-800 flex flex-col gap-4"> <div class="w-full md:w-80 shrink-0 p-5 rounded-2xl bg-slate-50 dark:bg-slate-900 border border-slate-100 dark:border-slate-800 flex flex-col gap-4">
<div class="flex items-center justify-between"> <div>
<span class="text-xs text-slate-400 dark:text-slate-500 font-bold uppercase">KDV Muafiyeti Göster</span> <div class="text-xs text-slate-400 dark:text-slate-500 font-semibold mb-1">Teknopark Muafiyetli Net Fiyat (%0 KDV)</div>
<div class="text-2xl font-display font-extrabold text-slate-900 dark:text-white">
<!-- Toggle Switch -->
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" id="kdv-toggle" class="sr-only peer" checked>
<div class="w-11 h-6 bg-slate-200 peer-focus:outline-none rounded-full peer dark:bg-slate-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-slate-600 peer-checked:bg-emerald-500"></div>
</label>
</div>
<div class="border-t border-slate-200/50 dark:border-slate-800/80 pt-3">
<div class="text-xs text-slate-400 dark:text-slate-500 font-semibold mb-1" id="kdv-label">Teknopark Avantajlı Fiyat (%0 KDV)</div>
<div class="text-2xl font-display font-extrabold text-slate-900 dark:text-white" id="kdv-price">
{{ number_format($proposal->total_price, 2, ',', '.') }} {{ $proposal->currency === 'USD' ? 'USD' : ($proposal->currency === 'EUR' ? 'EUR' : 'TL') }} {{ number_format($proposal->total_price, 2, ',', '.') }} {{ $proposal->currency === 'USD' ? 'USD' : ($proposal->currency === 'EUR' ? 'EUR' : 'TL') }}
</div> </div>
</div> </div>
<div class="p-2.5 rounded-lg bg-emerald-50 dark:bg-emerald-950/20 text-emerald-800 dark:text-emerald-400 border border-emerald-200/20 text-xs font-semibold leading-relaxed flex items-start gap-2" id="kdv-benefit-box"> <div class="p-2.5 rounded-lg bg-emerald-50 dark:bg-emerald-950/20 text-emerald-800 dark:text-emerald-400 border border-emerald-200/20 text-xs font-semibold leading-relaxed flex items-start gap-2">
<i data-lucide="sparkles" class="w-4 h-4 shrink-0 text-emerald-500"></i> <i data-lucide="sparkles" class="w-4 h-4 shrink-0 text-emerald-500"></i>
<span> <span>
%20 standart KDV oranına kıyasla toplamda <strong id="kdv-benefit-amount">{{ number_format($proposal->total_price * 0.20, 2, ',', '.') }}</strong> kazanç sağladınız. %20 standart KDV oranına kıyasla toplamda <strong>{{ number_format($proposal->total_price * 0.20, 2, ',', '.') }} {{ $proposal->currency === 'USD' ? 'USD' : ($proposal->currency === 'EUR' ? 'EUR' : 'TL') }}</strong> net KDV tasarrufu sağlandı.
</span> </span>
</div> </div>
</div> </div>
@@ -962,14 +1004,53 @@
const preprocessedText = parseGithubAlerts(rawMarkdown); const preprocessedText = parseGithubAlerts(rawMarkdown);
contentDiv.innerHTML = marked.parse(preprocessedText); contentDiv.innerHTML = marked.parse(preprocessedText);
// Auto-wrap markdown tables in responsive overflow wrapper to prevent design overflow
contentDiv.querySelectorAll('table').forEach(table => {
if (!table.parentElement.classList.contains('table-responsive')) {
const wrapper = document.createElement('div');
wrapper.className = 'table-responsive';
table.parentNode.insertBefore(wrapper, table);
wrapper.appendChild(table);
}
});
// Render Mermaid Diagrams // Render Mermaid Diagrams
const isDark = document.documentElement.classList.contains('dark'); const isDark = document.documentElement.classList.contains('dark');
mermaid.initialize({ mermaid.initialize({
startOnLoad: false, startOnLoad: false,
theme: isDark ? 'dark' : 'default', theme: 'base',
securityLevel: 'loose', securityLevel: 'loose',
themeVariables: { themeVariables: {
fontFamily: 'Inter, sans-serif' fontFamily: 'Inter, sans-serif',
darkMode: isDark,
background: isDark ? '#0f172a' : '#ffffff',
primaryColor: '#ea580c',
primaryTextColor: '#ffffff',
primaryBorderColor: '#c2410c',
lineColor: '#ea580c',
secondaryColor: '#ef4444',
secondaryTextColor: '#ffffff',
tertiaryColor: isDark ? '#1e293b' : '#fff7ed',
tertiaryTextColor: isDark ? '#f8fafc' : '#9a3412',
activeTaskBkgColor: '#ea580c',
activeTaskBorderColor: '#c2410c',
doneTaskBkgColor: '#f97316',
doneTaskBorderColor: '#ea580c',
critBkgColor: '#ef4444',
critBorderColor: '#b91c1c',
taskTextLightColor: '#ffffff',
taskTextColor: '#ffffff',
taskTextDarkColor: '#ffffff',
taskTextOutsideColor: isDark ? '#e2e8f0' : '#1e293b',
sectionBkgColor: isDark ? 'rgba(234, 88, 12, 0.15)' : 'rgba(234, 88, 12, 0.07)',
sectionBkgColor2: isDark ? 'rgba(239, 68, 68, 0.15)' : 'rgba(239, 68, 68, 0.07)',
altSectionBkgColor: isDark ? 'rgba(234, 88, 12, 0.10)' : 'rgba(234, 88, 12, 0.04)',
gridColor: isDark ? 'rgba(255, 255, 255, 0.1)' : 'rgba(0, 0, 0, 0.08)',
todayLineColor: '#ef4444',
nodeBorder: '#ea580c',
clusterBkg: isDark ? '#1e293b' : '#fff7ed',
clusterBorder: '#f97316',
titleColor: isDark ? '#f8fafc' : '#0f172a'
} }
}); });
@@ -986,20 +1067,18 @@
const wrapper = document.getElementById('mermaid-wrapper-' + index); const wrapper = document.getElementById('mermaid-wrapper-' + index);
const canvas = document.getElementById('mermaid-canvas-' + index); const canvas = document.getElementById('mermaid-canvas-' + index);
const pz = mermaidZoomInstances[index]; const pz = mermaidZoomInstances[index];
if (!wrapper || !canvas || !pz) return; if (!wrapper || !canvas) return;
wrapper.classList.add('mermaid-active'); wrapper.classList.add('mermaid-active');
canvas.classList.add('mermaid-active'); canvas.classList.add('mermaid-active');
pz.enablePan(); if (pz) pz.enablePan();
} }
function deactivateMermaid(index) { function deactivateMermaid(index) {
const wrapper = document.getElementById('mermaid-wrapper-' + index); const wrapper = document.getElementById('mermaid-wrapper-' + index);
const canvas = document.getElementById('mermaid-canvas-' + index); const canvas = document.getElementById('mermaid-canvas-' + index);
const pz = mermaidZoomInstances[index];
if (wrapper) wrapper.classList.remove('mermaid-active'); if (wrapper) wrapper.classList.remove('mermaid-active');
if (canvas) canvas.classList.remove('mermaid-active'); if (canvas) canvas.classList.remove('mermaid-active');
if (pz) pz.disablePan();
if (mermaidActiveIndex === index) mermaidActiveIndex = null; if (mermaidActiveIndex === index) mermaidActiveIndex = null;
} }
@@ -1041,25 +1120,19 @@
wrapper.id = 'mermaid-wrapper-' + index; wrapper.id = 'mermaid-wrapper-' + index;
wrapper.dataset.mermaidSource = rawMermaid; wrapper.dataset.mermaidSource = rawMermaid;
// Zoom Toolbar // Zoom Toolbar (Uzaklaştır [-] | 100% | Yakınlaştır [+] | Sıfırla/Sığdır | Tam Ekran)
const toolbar = document.createElement('div'); const toolbar = document.createElement('div');
toolbar.className = 'mermaid-toolbar'; toolbar.className = 'mermaid-toolbar';
toolbar.innerHTML = ` toolbar.innerHTML = `
<span class="mermaid-toolbar-label">Diyagram Görünümü</span> <span class="mermaid-toolbar-label">DİYAGRAM GÖRÜNÜMÜ</span>
<span class="mermaid-toolbar-hint">Zoom ve kaydırma için tıklayın</span> <span class="mermaid-toolbar-hint">Zoom ve sürükleme için tıklayın</span>
<div class="mermaid-toolbar-controls"> <div class="mermaid-toolbar-controls">
<button class="mermaid-zoom-btn" title="Yakınlaştır (Zoom In)" onclick="mermaidZoomIn(${index})">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></svg>
</button>
<span class="mermaid-zoom-pct" id="mermaid-pct-${index}">100%</span>
<button class="mermaid-zoom-btn" title="Uzaklaştır (Zoom Out)" onclick="mermaidZoomOut(${index})"> <button class="mermaid-zoom-btn" title="Uzaklaştır (Zoom Out)" onclick="mermaidZoomOut(${index})">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></svg>
</button> </button>
<button class="mermaid-zoom-btn" title="Tam Boyut (1:1)" onclick="mermaidZoomReset(${index})"> <span class="mermaid-zoom-pct" id="mermaid-pct-${index}">100%</span>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg> <button class="mermaid-zoom-btn" title="Yakınlaştır (Zoom In)" onclick="mermaidZoomIn(${index})">
</button> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></svg>
<button class="mermaid-zoom-btn" title="Tam Ekran" onclick="mermaidFullscreen(${index})">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"/></svg>
</button> </button>
</div> </div>
`; `;
@@ -1070,7 +1143,7 @@
canvas.id = 'mermaid-canvas-' + index; canvas.id = 'mermaid-canvas-' + index;
const graphDiv = document.createElement('div'); const graphDiv = document.createElement('div');
graphDiv.className = 'mermaid w-full'; graphDiv.className = 'mermaid w-full h-full';
graphDiv.id = 'mermaid-graph-' + index; graphDiv.id = 'mermaid-graph-' + index;
graphDiv.textContent = rawMermaid; graphDiv.textContent = rawMermaid;
@@ -1088,19 +1161,21 @@
<div class="mermaid-fullscreen-inner" id="mermaid-fs-inner"> <div class="mermaid-fullscreen-inner" id="mermaid-fs-inner">
<div class="mermaid-toolbar" style="border-radius:20px 20px 0 0;"> <div class="mermaid-toolbar" style="border-radius:20px 20px 0 0;">
<span class="mermaid-toolbar-label">Tam Ekran Görünüm</span> <span class="mermaid-toolbar-label">Tam Ekran Görünüm</span>
<button class="mermaid-zoom-btn" title="Yakınlaştır" onclick="mermaidFsZoom('in')"> <div class="mermaid-toolbar-controls">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></svg> <button class="mermaid-zoom-btn" title="Uzaklaştır" onclick="mermaidFsZoom('out')">
</button> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></svg>
<span class="mermaid-zoom-pct" id="mermaid-fs-pct">100%</span> </button>
<button class="mermaid-zoom-btn" title="Uzaklaştır" onclick="mermaidFsZoom('out')"> <span class="mermaid-zoom-pct" id="mermaid-fs-pct">100%</span>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="8" y1="11" x2="14" y2="11"/></svg> <button class="mermaid-zoom-btn" title="Yakınlaştır" onclick="mermaidFsZoom('in')">
</button> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/><line x1="11" y1="8" x2="11" y2="14"/><line x1="8" y1="11" x2="14" y2="11"/></svg>
<button class="mermaid-zoom-btn" title="1:1 Sıfırla" onclick="mermaidFsZoom('reset')"> </button>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg> <button class="mermaid-zoom-btn" title="Sığdır / Sıfırla" onclick="mermaidFsZoom('reset')">
</button> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"/></svg>
<button class="mermaid-zoom-btn" title="Kapat" onclick="closeMermaidFullscreen()" style="background:#ef4444;border-color:#ef4444;color:#fff;"> </button>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg> <button class="mermaid-zoom-btn" title="Kapat" onclick="closeMermaidFullscreen()" style="background:#ef4444;border-color:#ef4444;color:#fff;">
</button> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
</div> </div>
<div class="mermaid-fullscreen-canvas" id="mermaid-fs-canvas"></div> <div class="mermaid-fullscreen-canvas" id="mermaid-fs-canvas"></div>
</div> </div>
@@ -1117,10 +1192,7 @@
// Run mermaid parser // Run mermaid parser
setTimeout(() => { setTimeout(() => {
mermaid.run().then(() => { mermaid.run().then(() => {
// Re-init lucide icons inside alerts after marked rendering completes
lucide.createIcons(); lucide.createIcons();
// Initialize svg-pan-zoom for each mermaid diagram
codeElements.forEach((_, index) => { codeElements.forEach((_, index) => {
initMermaidZoom(index); initMermaidZoom(index);
}); });
@@ -1136,48 +1208,50 @@
const svg = canvas.querySelector('svg'); const svg = canvas.querySelector('svg');
if (!svg) return; if (!svg) return;
// Ensure SVG has an ID for svg-pan-zoom
if (!svg.id) svg.id = 'mermaid-svg-' + index; if (!svg.id) svg.id = 'mermaid-svg-' + index;
// Compute a good canvas height from SVG viewBox aspect ratio svg.setAttribute('width', '100%');
const canvasW = canvas.clientWidth || canvas.offsetWidth || 800; svg.setAttribute('height', '100%');
let canvasH = 520; svg.style.width = '100%';
svg.style.height = '100%';
// Compute canvas height from SVG viewBox aspect ratio
let canvasH = 500;
const vb = svg.getAttribute('viewBox'); const vb = svg.getAttribute('viewBox');
if (vb) { if (vb) {
const parts = vb.split(/[\s,]+/); const parts = vb.split(/[\s,]+/);
if (parts.length >= 4) { if (parts.length >= 4) {
const svgW = parseFloat(parts[2]); const svgW = parseFloat(parts[2]);
const svgH = parseFloat(parts[3]); const svgH = parseFloat(parts[3]);
const canvasW = canvas.clientWidth || 800;
if (svgW > 0 && svgH > 0) { if (svgW > 0 && svgH > 0) {
canvasH = Math.max(400, Math.min(Math.round(svgH * (canvasW / svgW)), 900)); canvasH = Math.max(380, Math.min(Math.round(svgH * (canvasW / svgW)), 800));
} }
} }
} }
canvas.style.height = canvasH + 'px'; canvas.style.height = canvasH + 'px';
// svg-pan-zoom needs explicit width/height on the SVG element
svg.setAttribute('width', canvasW);
svg.setAttribute('height', canvasH);
svg.style.width = canvasW + 'px';
svg.style.height = canvasH + 'px';
try { try {
if (mermaidZoomInstances[index]) {
try { mermaidZoomInstances[index].destroy(); } catch(e) {}
}
const panZoom = svgPanZoom('#' + svg.id, { const panZoom = svgPanZoom('#' + svg.id, {
zoomEnabled: true, zoomEnabled: true,
panEnabled: false, panEnabled: true,
controlIconsEnabled: false, controlIconsEnabled: false,
fit: true, fit: true,
center: true, center: true,
minZoom: 0.3, minZoom: 0.3,
maxZoom: 8, maxZoom: 10,
zoomScaleSensitivity: 0.3, zoomScaleSensitivity: 0.25,
mouseWheelZoomEnabled: false, mouseWheelZoomEnabled: false,
onZoom: (zoom) => { onZoom: (zoom) => {
const pctEl = document.getElementById('mermaid-pct-' + index); updatePct(index, zoom);
if (pctEl) pctEl.textContent = Math.round(zoom * 100) + '%';
} }
}); });
mermaidZoomInstances[index] = panZoom; mermaidZoomInstances[index] = panZoom;
updatePct(index, panZoom.getZoom());
setupMermaidActivation(index); setupMermaidActivation(index);
} catch(e) { } catch(e) {
console.warn('svg-pan-zoom init failed for mermaid-' + index, e); console.warn('svg-pan-zoom init failed for mermaid-' + index, e);
@@ -1198,7 +1272,12 @@
function mermaidZoomReset(index) { function mermaidZoomReset(index) {
setMermaidActive(index); setMermaidActive(index);
const pz = mermaidZoomInstances[index]; const pz = mermaidZoomInstances[index];
if (pz) { pz.resetZoom(); pz.center(); updatePct(index, pz.getZoom()); } if (pz) {
pz.resetZoom();
pz.fit();
pz.center();
updatePct(index, pz.getZoom());
}
} }
function updatePct(index, zoom) { function updatePct(index, zoom) {
const pctEl = document.getElementById('mermaid-pct-' + index); const pctEl = document.getElementById('mermaid-pct-' + index);
@@ -1406,31 +1485,7 @@
}); });
}); });
// 4. KDV Switch Calculator Logic // 4. Client Interaction Actions & Tabs switching
const kdvToggle = document.getElementById('kdv-toggle');
const kdvLabel = document.getElementById('kdv-label');
const kdvPrice = document.getElementById('kdv-price');
const kdvBenefitBox = document.getElementById('kdv-benefit-box');
if (kdvToggle) {
const totalPrice = parseFloat('{{ $proposal->total_price }}');
const currencySymbol = '{{ $proposal->currency === 'USD' ? 'USD' : ($proposal->currency === 'EUR' ? 'EUR' : 'TL') }}';
kdvToggle.addEventListener('change', function() {
if (this.checked) {
// %0 KDV selected (Teknopark exemption)
kdvLabel.textContent = 'Teknopark Avantajlı Fiyat (%0 KDV)';
kdvPrice.textContent = new Intl.NumberFormat('tr-TR', { minimumFractionDigits: 2 }).format(totalPrice) + ' ' + currencySymbol;
kdvBenefitBox.classList.remove('hidden');
} else {
// %20 standard KDV added
const priceWithVat = totalPrice * 1.20;
kdvLabel.textContent = 'Standart Fiyat (+%20 KDV)';
kdvPrice.textContent = new Intl.NumberFormat('tr-TR', { minimumFractionDigits: 2 }).format(priceWithVat) + ' ' + currencySymbol;
kdvBenefitBox.classList.add('hidden');
}
});
}
// 5. Client Interaction Actions & Tabs switching // 5. Client Interaction Actions & Tabs switching
function switchTab(tab) { function switchTab(tab) {
+33
View File
@@ -102,6 +102,12 @@ Route::prefix('admin/api')->middleware(['auth', \App\Http\Middleware\SuperAdminM
Route::post('/site-translations/batch-destroy', [SiteTranslationController::class, 'batchDestroy'])->name('api.site-translations.batch-destroy'); Route::post('/site-translations/batch-destroy', [SiteTranslationController::class, 'batchDestroy'])->name('api.site-translations.batch-destroy');
}); });
// LinkedIn OAuth Routes (Admin Yetkilendirme)
Route::middleware(['auth'])->prefix('admin/linkedin')->group(function () {
Route::get('/connect', [\App\Http\Controllers\Admin\LinkedInController::class, 'connect'])->name('admin.linkedin.connect');
Route::get('/callback', [\App\Http\Controllers\Admin\LinkedInController::class, 'callback'])->name('admin.linkedin.callback');
});
// Products & Services // Products & Services
Route::redirect('/urun-hizmet/Yazılım Danışmanlık', '/urun-hizmet/yazilim-danismanlik', 301); Route::redirect('/urun-hizmet/Yazılım Danışmanlık', '/urun-hizmet/yazilim-danismanlik', 301);
Route::get('/urun-hizmet/{slug}', [\App\Http\Controllers\ProductController::class, 'show'])->name('products.show'); Route::get('/urun-hizmet/{slug}', [\App\Http\Controllers\ProductController::class, 'show'])->name('products.show');
@@ -124,6 +130,8 @@ Route::post('/stajyer/github-kaydet', [\App\Http\Controllers\CareerController::c
Route::get('/stajyer/gunluk-indir', [\App\Http\Controllers\CareerController::class, 'downloadMarkdown'])->name('intern.download-journal'); Route::get('/stajyer/gunluk-indir', [\App\Http\Controllers\CareerController::class, 'downloadMarkdown'])->name('intern.download-journal');
Route::post('/stajyer/defteri-kaydet', [\App\Http\Controllers\CareerController::class, 'saveJournalEntry'])->name('intern.save-journal'); Route::post('/stajyer/defteri-kaydet', [\App\Http\Controllers\CareerController::class, 'saveJournalEntry'])->name('intern.save-journal');
Route::get('/stajyer/defteri-yazdir', [\App\Http\Controllers\CareerController::class, 'printJournal'])->name('intern.print-journal'); Route::get('/stajyer/defteri-yazdir', [\App\Http\Controllers\CareerController::class, 'printJournal'])->name('intern.print-journal');
Route::post('/stajyer/blog-kaydet', [\App\Http\Controllers\CareerController::class, 'saveInternBlog'])->name('intern.blog.save');
Route::delete('/stajyer/blog/{id}/sil', [\App\Http\Controllers\CareerController::class, 'deleteInternBlog'])->name('intern.blog.delete');
Route::get('/staj-dogrulama/{code}', [\App\Http\Controllers\CareerController::class, 'verifyCertificate'])->name('internship.verify'); Route::get('/staj-dogrulama/{code}', [\App\Http\Controllers\CareerController::class, 'verifyCertificate'])->name('internship.verify');
Route::post('/stajyer/cikis', [\App\Http\Controllers\CareerController::class, 'internLogout'])->name('intern.logout'); Route::post('/stajyer/cikis', [\App\Http\Controllers\CareerController::class, 'internLogout'])->name('intern.logout');
@@ -134,6 +142,7 @@ Route::get('/stajyer/admin/panel', [\App\Http\Controllers\CareerController::clas
Route::get('/stajyer/admin/journal-entry', [\App\Http\Controllers\CareerController::class, 'getJournalEntry'])->name('intern.admin.get-journal-entry'); Route::get('/stajyer/admin/journal-entry', [\App\Http\Controllers\CareerController::class, 'getJournalEntry'])->name('intern.admin.get-journal-entry');
Route::post('/stajyer/admin/toggle-approval', [\App\Http\Controllers\CareerController::class, 'toggleJournalApproval'])->name('intern.admin.toggle-journal-approval'); Route::post('/stajyer/admin/toggle-approval', [\App\Http\Controllers\CareerController::class, 'toggleJournalApproval'])->name('intern.admin.toggle-journal-approval');
Route::get('/stajyer/admin/journal-details', [\App\Http\Controllers\CareerController::class, 'getInternJournalDetails'])->name('intern.admin.get-journal-details'); Route::get('/stajyer/admin/journal-details', [\App\Http\Controllers\CareerController::class, 'getInternJournalDetails'])->name('intern.admin.get-journal-details');
Route::get('/stajyer/admin/quick-approval-entries', [\App\Http\Controllers\CareerController::class, 'getQuickApprovalEntries'])->name('intern.admin.quick-approval-entries');
Route::post('/stajyer/admin/toggle-notebook-signature', [\App\Http\Controllers\CareerController::class, 'toggleNotebookSignature'])->name('intern.admin.toggle-notebook-signature'); Route::post('/stajyer/admin/toggle-notebook-signature', [\App\Http\Controllers\CareerController::class, 'toggleNotebookSignature'])->name('intern.admin.toggle-notebook-signature');
Route::post('/stajyer/admin/cikis', [\App\Http\Controllers\CareerController::class, 'internAdminLogout'])->name('intern.admin.logout'); Route::post('/stajyer/admin/cikis', [\App\Http\Controllers\CareerController::class, 'internAdminLogout'])->name('intern.admin.logout');
@@ -171,6 +180,30 @@ Route::get('/sitemap.xml', [\App\Http\Controllers\SitemapController::class, 'ind
Route::get('/teklif/{slug}', [\App\Http\Controllers\ProposalController::class, 'show'])->name('proposals.show'); Route::get('/teklif/{slug}', [\App\Http\Controllers\ProposalController::class, 'show'])->name('proposals.show');
Route::post('/teklif/{slug}/action', [\App\Http\Controllers\ProposalController::class, 'action'])->name('proposals.action'); Route::post('/teklif/{slug}/action', [\App\Http\Controllers\ProposalController::class, 'action'])->name('proposals.action');
// Project Tracking Client Portal & Web Admin Management
Route::get('/proje-takip/{slug}', [\App\Http\Controllers\ProjectController::class, 'show'])->name('projects.show');
Route::post('/proje-takip/{slug}/verify', [\App\Http\Controllers\ProjectController::class, 'verify'])->name('projects.verify');
Route::post('/proje-takip/{slug}/admin/module-status', [\App\Http\Controllers\ProjectController::class, 'updateModuleStatus'])->name('projects.admin.module-status');
Route::post('/proje-takip/{slug}/admin/task-status', [\App\Http\Controllers\ProjectController::class, 'updateTaskStatus'])->name('projects.admin.task-status');
Route::post('/proje-takip/{slug}/admin/add-task', [\App\Http\Controllers\ProjectController::class, 'addTask'])->name('projects.admin.add-task');
Route::post('/proje-takip/{slug}/admin/delete-task', [\App\Http\Controllers\ProjectController::class, 'deleteTask'])->name('projects.admin.delete-task');
Route::post('/proje-takip/{slug}/admin/add-update', [\App\Http\Controllers\ProjectController::class, 'addUpdate'])->name('projects.admin.add-update');
Route::post('/proje-takip/{slug}/admin/delete-update', [\App\Http\Controllers\ProjectController::class, 'deleteUpdate'])->name('projects.admin.delete-update');
Route::post('/proje-takip/{slug}/admin/recalculate', [\App\Http\Controllers\ProjectController::class, 'recalculate'])->name('projects.admin.recalculate');
Route::post('/proje-takip/{slug}/admin/toggle-mode', [\App\Http\Controllers\ProjectController::class, 'toggleAdminMode'])->name('projects.admin.toggle-mode');
// Trunçgil OEM B2B - Hidden Test Application
Route::get('/truncgil-oem-b2b', function () {
return view('oem_b2b_demo');
})->name('oem.b2b.demo');
Route::get('/oem-b2b-demo', function () {
return view('oem_b2b_demo');
});
// Live OEM & Barcode Internet Lookup API
Route::get('/api/oem-lookup', [\App\Http\Controllers\OemLookupController::class, 'lookup'])->name('oem.lookup');
// Privacy Policy Alternatives // Privacy Policy Alternatives
Route::get('/privacy-policy', function () { Route::get('/privacy-policy', function () {
return app(PageController::class)->show('privacy'); return app(PageController::class)->show('privacy');
+48
View File
@@ -0,0 +1,48 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$interns = App\Models\CareerApplication::where('type', 'internship')->where('status', 'accepted')->with(['journalEntries' => function($q) {
$q->orderBy('day_number', 'asc');
}])->get();
$analysis = [];
foreach ($interns as $intern) {
if ($intern->journalEntries->count() == 0) continue;
$repoUrl = $intern->github_repo;
$allContent = "";
$commits = [];
foreach ($intern->journalEntries as $entry) {
$allContent .= "\n--- DAY {$entry->day_number} ({$entry->date}) ---\n" . $entry->content . "\n";
// Extract commits from content if available
if (preg_match_all('/\[[0-9:]+\]\s*\[([a-f0-9]+)\]\s*(.+)/i', $entry->content, $matches, PREG_SET_ORDER)) {
foreach ($matches as $m) {
$commits[] = [
'hash' => $m[1],
'msg' => $m[2],
'day' => $entry->day_number
];
}
}
}
$analysis[$intern->name] = [
'id' => $intern->id,
'email' => $intern->email,
'repo' => $repoUrl,
'github_username' => $intern->github_username,
'total_entries' => $intern->journalEntries->count(),
'commits_count' => count($commits),
'commits_sample' => array_slice($commits, -10),
'full_text' => $allContent
];
}
file_put_contents(__DIR__ . '/repo_analysis_data.json', json_encode($analysis, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
echo "Saved analysis data for " . count($analysis) . " interns.\n";
+838
View File
@@ -0,0 +1,838 @@
{
"approved_total": 58,
"interns": [
{
"id": 18,
"name": "Emre Satıl",
"email": "emresatil72@gmail.com",
"github": "https:\/\/github.com\/Emresatil\/Recycle-Rush-VR\/commits\/feature\/save-manager-and-haptics",
"total_entries": 27,
"filled_entries": 27,
"already_approved": 20,
"newly_approved": 7,
"on_time_count": 24,
"retroactive_count": 3,
"on_time_days": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
13,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27
],
"retroactive_days": [
11,
12,
14
],
"retroactive_details": [
{
"day": 11,
"date": "2026-07-16",
"content_snippet": "11. Gün (16.07.2026) Çalışma RaporuBugün stajımda projemizin"
},
{
"day": 12,
"date": "2026-07-17",
"content_snippet": "12. Gün (17.07.2026) Çalışma RaporuBugün oyunun en önemli hi"
},
{
"day": 14,
"date": "2026-07-21",
"content_snippet": "14. Gün (21.07.2026) Çalışma RaporuBugün, VR projemizin perf"
}
]
},
{
"id": 19,
"name": "Ayşenur Ebrar Gündüz",
"email": "aysenurebrargunduzz@gmail.com",
"github": "https:\/\/github.com\/AysenurGunduz\/vantage-ai",
"total_entries": 15,
"filled_entries": 15,
"already_approved": 8,
"newly_approved": 7,
"on_time_count": 12,
"retroactive_count": 3,
"on_time_days": [
1,
2,
3,
7,
8,
9,
10,
11,
12,
13,
14,
15
],
"retroactive_days": [
4,
5,
6
],
"retroactive_details": [
{
"day": 4,
"date": "2026-07-23",
"content_snippet": "Güne ekip arkadaşlarım ile gerçekleştirdiğimiz toplantı ile "
},
{
"day": 5,
"date": "2026-07-24",
"content_snippet": "Toplantının ardından güne, her gün olduğu gibi yeni bir bran"
},
{
"day": 6,
"date": "2026-07-27",
"content_snippet": "Bugüne yine ekip içi günlük toplantıda Cuma günkü ilerlemeyi"
}
]
},
{
"id": 20,
"name": "Hakan Üzer",
"email": "hakanuzer1@gmail.com",
"github": "https:\/\/github.com\/Emresatil\/Recycle-Rush-VR\/tree\/feature\/ar-golden-spawner-rewards",
"total_entries": 26,
"filled_entries": 26,
"already_approved": 20,
"newly_approved": 6,
"on_time_count": 21,
"retroactive_count": 5,
"on_time_days": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
21,
22,
23,
24,
26
],
"retroactive_days": [
1,
2,
19,
20,
25
],
"retroactive_details": [
{
"day": 1,
"date": "2026-07-01",
"content_snippet": "Konu: Unity VR Proje İskeletinin Oluşturulması ve Versiyon K"
},
{
"day": 2,
"date": "2026-07-02",
"content_snippet": "Konu: Unity VR Projenin Sadeleştirlmesi ve XR Altyapısının Y"
},
{
"day": 19,
"date": "2026-07-28",
"content_snippet": "VR Projesinde Sahne Senkronizasyonu, Görsel Post-Processing "
},
{
"day": 20,
"date": "2026-07-29",
"content_snippet": "Oyun Durum Yönetimi (GameState) Optimizasyonu, Dinamik Çevre"
},
{
"day": 25,
"date": "2026-08-05",
"content_snippet": "Bugünkü çalışmalar kapsamında, projemizin VR (Sanal Gerçekli"
}
]
},
{
"id": 22,
"name": "Mustafa emre kaplan",
"email": "mustafaemre027@gmail.com",
"github": "https:\/\/github.com\/mustafaemre027\/securewatch-ai",
"total_entries": 19,
"filled_entries": 19,
"already_approved": 12,
"newly_approved": 7,
"on_time_count": 11,
"retroactive_count": 8,
"on_time_days": [
4,
6,
7,
8,
9,
10,
12,
15,
17,
18,
19
],
"retroactive_days": [
1,
2,
3,
5,
11,
13,
14,
16
],
"retroactive_details": [
{
"day": 1,
"date": "2026-07-13",
"content_snippet": "1. Gün – Proje Planlama ve GitHub AltyapısıProje Tanımı ve P"
},
{
"day": 2,
"date": "2026-07-14",
"content_snippet": "2. Gün – CIC-IDS2017 Veri Seti AnaliziVeri Seti Seçimi ve Ha"
},
{
"day": 3,
"date": "2026-07-16",
"content_snippet": "3. Gün – Sistem Mimarisi TasarımıFonksiyonel Gereksinimler v"
},
{
"day": 5,
"date": "2026-07-20",
"content_snippet": "5. Gün – Kimlik Doğrulama, RBAC ve Audit LogKullanıcı ve Ver"
},
{
"day": 11,
"date": "2026-07-28",
"content_snippet": "Gün 11 – Güvenli Model Tahmini ve Analiz API’siGüvenli Model"
},
{
"day": 13,
"date": "2026-07-30",
"content_snippet": "Gün 13 – Frontend Temeli, Güvenli Kimlik Doğrulama ve Uygula"
},
{
"day": 14,
"date": "2026-07-31",
"content_snippet": "Gün 14 – Analiz Ekranları ve Güvenli CSV İş AkışıAnaliz API "
},
{
"day": 16,
"date": "2026-08-04",
"content_snippet": "Gün 16 – Güvenli Olay Yönetimi Arayüzü ve İş AkışıOlay Yönet"
}
]
},
{
"id": 23,
"name": "Doğukan Kalkan",
"email": "kalkandogukan01@gmail.com",
"github": "https:\/\/github.com\/Dogukan-klkn\/StockRoute",
"total_entries": 20,
"filled_entries": 20,
"already_approved": 20,
"newly_approved": 0,
"on_time_count": 9,
"retroactive_count": 11,
"on_time_days": [
4,
10,
11,
12,
15,
16,
17,
18,
19
],
"retroactive_days": [
1,
2,
3,
5,
6,
7,
8,
9,
13,
14,
20
],
"retroactive_details": [
{
"day": 1,
"date": "2026-06-29",
"content_snippet": "Oryantasyon ve Kurulum Süreçleri: Stajın ilk günü şirket ve "
},
{
"day": 2,
"date": "2026-06-30",
"content_snippet": "Tasarım ve Dokümantasyon Yapısının Kurulumu: Proje planlamas"
},
{
"day": 3,
"date": "2026-07-01",
"content_snippet": "Projenin daha ölçeklenebilir ve tek merkezden yönetilebilir "
},
{
"day": 5,
"date": "2026-07-03",
"content_snippet": "Kimlik Doğrulama ve Güvenlik Altyapısının Kurulması: Sistem "
},
{
"day": 6,
"date": "2026-07-06",
"content_snippet": "Yetki Kontrol Mekanizmasının (Guard) Kurulması: Sistemdeki A"
},
{
"day": 7,
"date": "2026-07-07",
"content_snippet": "Başlangıç Verileri (Seed) ve Onboarding: Sistemin ilk kayıt "
},
{
"day": 8,
"date": "2026-07-08",
"content_snippet": "Veri Doğrulama (DTO) ve Dokümantasyon: Şube oluşturma ve gün"
},
{
"day": 9,
"date": "2026-07-09",
"content_snippet": "Proje Dokümantasyonu: Projenin genel yapısını, kullanılan te"
},
{
"day": 13,
"date": "2026-07-16",
"content_snippet": "Bugün, proje planının 13. gün hedefleri doğrultusunda sistem"
},
{
"day": 14,
"date": "2026-07-17",
"content_snippet": "Gün 14 — Web Yönetim Panelinin KuruluşuBugün itibarıyla Stoc"
},
{
"day": 20,
"date": "2026-07-27",
"content_snippet": "Projenin son geliştirme günü. Bugün iki blok iş yapıldı: mob"
}
]
},
{
"id": 24,
"name": "Elif Çiftepala",
"email": "elifciftepala82@gmail.com",
"github": null,
"total_entries": 0,
"filled_entries": 0,
"already_approved": 0,
"newly_approved": 0,
"on_time_count": 0,
"retroactive_count": 0,
"on_time_days": [],
"retroactive_days": [],
"retroactive_details": []
},
{
"id": 25,
"name": "Eren Kara",
"email": "erenkara1549@gmail.com",
"github": "https:\/\/github.com\/erenkara0\/Smart-E-Commerce-Assistant",
"total_entries": 23,
"filled_entries": 23,
"already_approved": 15,
"newly_approved": 8,
"on_time_count": 8,
"retroactive_count": 15,
"on_time_days": [
6,
10,
12,
13,
18,
19,
22,
23
],
"retroactive_days": [
1,
2,
3,
4,
5,
7,
8,
9,
11,
14,
15,
16,
17,
20,
21
],
"retroactive_details": [
{
"day": 1,
"date": "2026-07-06",
"content_snippet": "On the first day of the internship, the topic for the projec"
},
{
"day": 2,
"date": "2026-07-07",
"content_snippet": "Today, brand and user interface preparation work was carried"
},
{
"day": 3,
"date": "2026-07-08",
"content_snippet": "Today, the foundational development environment for the proj"
},
{
"day": 4,
"date": "2026-07-09",
"content_snippet": "As part of the M2 milestone for the MikroAsistan project, th"
},
{
"day": 5,
"date": "2026-07-10",
"content_snippet": "Today, I focused on the product data structure for the proje"
},
{
"day": 7,
"date": "2026-07-14",
"content_snippet": "Today, as part of the M4 phase, I focused on the RAG-based r"
},
{
"day": 8,
"date": "2026-07-16",
"content_snippet": "Today, I improved the reliability and maintainability of the"
},
{
"day": 9,
"date": "2026-07-17",
"content_snippet": "Today, I implemented session-based chat memory for the Smart"
},
{
"day": 11,
"date": "2026-07-21",
"content_snippet": "Today, I developed the initial interactive chat interface fo"
},
{
"day": 14,
"date": "2026-07-24",
"content_snippet": "Today, I completed the M7 backend testing milestone by setti"
},
{
"day": 15,
"date": "2026-07-27",
"content_snippet": "Today, I prepared the project for final delivery and demonst"
},
{
"day": 16,
"date": "2026-07-28",
"content_snippet": "I finalized the project’s v1.0.0 release, completed the GitH"
},
{
"day": 17,
"date": "2026-07-29",
"content_snippet": "I started the M8 Excel Product Data Foundation milestone. I "
},
{
"day": 20,
"date": "2026-08-03",
"content_snippet": "Yesterday, I implemented the product import and upsert workf"
},
{
"day": 21,
"date": "2026-08-04",
"content_snippet": "Today, I implemented an Excel product import API endpoint fo"
}
]
},
{
"id": 26,
"name": "Ümit Tunç",
"email": "umit.tunc@truncgil.com",
"github": null,
"total_entries": 0,
"filled_entries": 0,
"already_approved": 0,
"newly_approved": 0,
"on_time_count": 0,
"retroactive_count": 0,
"on_time_days": [],
"retroactive_days": [],
"retroactive_details": []
},
{
"id": 27,
"name": "ismet can sezgin",
"email": "ismet.can.sezgin96@erzurum.edu.tr",
"github": "https:\/\/github.com\/ismetcansezgin\/EEG-Flow",
"total_entries": 15,
"filled_entries": 15,
"already_approved": 10,
"newly_approved": 5,
"on_time_count": 4,
"retroactive_count": 11,
"on_time_days": [
5,
6,
7,
9
],
"retroactive_days": [
1,
2,
3,
4,
8,
10,
11,
12,
13,
14,
15
],
"retroactive_details": [
{
"day": 1,
"date": "2026-07-13",
"content_snippet": "Subject of Work:&nbsp;Project Scope Definition, Roadmap Desi"
},
{
"day": 2,
"date": "2026-07-14",
"content_snippet": "Subject of Work:&nbsp;Directory Structure Setup, Environment"
},
{
"day": 3,
"date": "2026-07-16",
"content_snippet": "Subject of Work:&nbsp;EEG CSV Data Loading, Multi-Channel Va"
},
{
"day": 4,
"date": "2026-07-17",
"content_snippet": "Subject of Work: EEG Synthetic Signal Simulator Development "
},
{
"day": 8,
"date": "2026-07-23",
"content_snippet": "Subject of Work:&nbsp;Signal Processing Backend Integration:"
},
{
"day": 10,
"date": "2026-07-27",
"content_snippet": "Subject of Work:&nbsp;Signal Visualization: Chart.js Interac"
},
{
"day": 11,
"date": "2026-07-28",
"content_snippet": "Subject of Work:&nbsp;Feature Engineering Phase: Sliding Win"
},
{
"day": 12,
"date": "2026-07-29",
"content_snippet": "Subject of Work:&nbsp;Feature Engineering REST API: Implemen"
},
{
"day": 13,
"date": "2026-07-30",
"content_snippet": "Subject of Work:&nbsp;Phase 2 Feature Engineering: Signal Ep"
},
{
"day": 14,
"date": "2026-07-31",
"content_snippet": "Subject of Work:&nbsp;Feature Engineering Phase: Implementat"
},
{
"day": 15,
"date": "2026-08-03",
"content_snippet": "Subject of Work:&nbsp;Feature Engine REST API Endpoint, Alph"
}
]
},
{
"id": 28,
"name": "Alesam Baath",
"email": "isambais15@gmail.com",
"github": "https:\/\/github.com\/isambais\/SmartHome-EnergyRL",
"total_entries": 18,
"filled_entries": 18,
"already_approved": 11,
"newly_approved": 7,
"on_time_count": 10,
"retroactive_count": 8,
"on_time_days": [
2,
5,
6,
7,
13,
14,
15,
16,
17,
18
],
"retroactive_days": [
1,
3,
4,
8,
9,
10,
11,
12
],
"retroactive_details": [
{
"day": 1,
"date": "2026-07-13",
"content_snippet": "Bugün Ne Yapıldı?Projenin resmi başlangıcı olarak GitHub üze"
},
{
"day": 3,
"date": "2026-07-16",
"content_snippet": "Bugün Ne Yapıldı?Yol haritasındaki Gün 3 hedefi doğrultusund"
},
{
"day": 4,
"date": "2026-07-17",
"content_snippet": "Bugün Ne Yapıldı?implementation_plan.md Bölüm 8'de projedeki"
},
{
"day": 8,
"date": "2026-07-23",
"content_snippet": "Gün 8 — Gerçek EPIAS Verisi, VecNormalize ve Çok Algoritmali"
},
{
"day": 9,
"date": "2026-07-24",
"content_snippet": "Gün 9 — Gerçek Dünya Ortamı Yeniden Yazımı ve Curriculum Aşa"
},
{
"day": 10,
"date": "2026-07-27",
"content_snippet": "Gün 10 — Pazartesi, 27 Temmuz 2026Öz-Tüketim Bonusu, Hiperpa"
},
{
"day": 11,
"date": "2026-07-28",
"content_snippet": "Gün 11 — Salı, 28 Temmuz 2026Phase 1 → Phase 2 Karşılaştırma"
},
{
"day": 12,
"date": "2026-07-29",
"content_snippet": "Gün 12 — Aşama 3: Hibrit Aksiyon Uzayı ve Ertelenebilir Yük1"
}
]
},
{
"id": 29,
"name": "Mehmet Akif Tunçer",
"email": "akiftuncer0@gmail.com",
"github": null,
"total_entries": 0,
"filled_entries": 0,
"already_approved": 0,
"newly_approved": 0,
"on_time_count": 0,
"retroactive_count": 0,
"on_time_days": [],
"retroactive_days": [],
"retroactive_details": []
},
{
"id": 30,
"name": "Melike Bayer",
"email": "melikebayer09@gmail.com",
"github": null,
"total_entries": 0,
"filled_entries": 0,
"already_approved": 0,
"newly_approved": 0,
"on_time_count": 0,
"retroactive_count": 0,
"on_time_days": [],
"retroactive_days": [],
"retroactive_details": []
},
{
"id": 31,
"name": "Faruk Tazeoğlu",
"email": "faruktazeoglu9@gmail.com",
"github": "https:\/\/github.com\/Faruk-T\/baret",
"total_entries": 17,
"filled_entries": 17,
"already_approved": 11,
"newly_approved": 6,
"on_time_count": 7,
"retroactive_count": 10,
"on_time_days": [
3,
5,
6,
7,
8,
9,
17
],
"retroactive_days": [
1,
2,
4,
10,
11,
12,
13,
14,
15,
16
],
"retroactive_details": [
{
"day": 1,
"date": "2026-07-10",
"content_snippet": "Stajımın ilk gününde şirket içi oryantasyon süreçleri tamaml"
},
{
"day": 2,
"date": "2026-07-13",
"content_snippet": "Baret projesi için kapsamlı implementation_plan.md hazırladı"
},
{
"day": 4,
"date": "2026-07-16",
"content_snippet": "Baret projesinde alıcı akışının 3 temel ekranı (Ana Sayfa, Ü"
},
{
"day": 10,
"date": "2026-07-24",
"content_snippet": "Bugün Baret projesinde 13. kısım kapsamında Supabase Storage"
},
{
"day": 11,
"date": "2026-07-27",
"content_snippet": "27 Temmuz 2026 — Faz 3 Gün 13 kapanışı + Gün 14 (Alıcı ana s"
},
{
"day": 12,
"date": "2026-07-28",
"content_snippet": "Bugün Baret projesinde Faz 3 kapsamındaki Gün 15 paketini ta"
},
{
"day": 13,
"date": "2026-07-29",
"content_snippet": "Bugün Baret projesinde Faz 3 kapsamındaki Gün 15 paketini ta"
},
{
"day": 14,
"date": "2026-07-30",
"content_snippet": "Bugün Baret pazaryeri uygulamasında hem kritik özellik tamam"
},
{
"day": 15,
"date": "2026-07-31",
"content_snippet": "Bugün Baret projesinin canlı teslim ve kapanış günüydü. Uygu"
},
{
"day": 16,
"date": "2026-08-03",
"content_snippet": "day-21-esn-interest branch’i üzerinden go-live baseline’a ES"
}
]
},
{
"id": 32,
"name": "Barış Paşa",
"email": "barispasa460@gmail.com",
"github": "https:\/\/github.com\/baris8138\/UstaFlow_litte",
"total_entries": 8,
"filled_entries": 8,
"already_approved": 3,
"newly_approved": 5,
"on_time_count": 1,
"retroactive_count": 7,
"on_time_days": [
8
],
"retroactive_days": [
1,
2,
3,
4,
5,
6,
7
],
"retroactive_details": [
{
"day": 1,
"date": "2026-07-23",
"content_snippet": "Stajın birinci gününde, teknik servis ve saha ekiplerinin iş"
},
{
"day": 2,
"date": "2026-07-24",
"content_snippet": "Stajın ikinci gününde, UstaFlow Lite projesinin dört haftalı"
},
{
"day": 3,
"date": "2026-07-27",
"content_snippet": "Git Commit Mesajları:[11:52] (41b7ea7) Merge pull request #5"
},
{
"day": 4,
"date": "2026-07-28",
"content_snippet": "Git Commit Mesajları:[18:03] (84cc453) docs(brand): add Usta"
},
{
"day": 5,
"date": "2026-07-29",
"content_snippet": "Git Commit Mesajları:[08:44] (66775b7) feat(database): add u"
},
{
"day": 6,
"date": "2026-07-30",
"content_snippet": "Git Commit Mesajları:[16:35] (1b468e1) chore(auth): install "
},
{
"day": 7,
"date": "2026-07-31",
"content_snippet": "UstaFlow Lite projesinde kimlik doğrulama altyapısının genel"
}
]
}
]
}
+80
View File
@@ -0,0 +1,80 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$weekStart = '2026-08-03';
$weekEnd = '2026-08-07';
$interns = App\Models\CareerApplication::where('type', 'internship')
->with(['journalEntries' => function($q) {
$q->orderBy('date', 'asc');
}])->get();
echo "=== BU HAFTA (03.08.2026 - 07.08.2026) STAJYER KODLAMA DURUMU ===\n\n";
$noCodingActiveInterns = [];
$activeInternsWithCoding = [];
$inactiveInterns = [];
foreach ($interns as $intern) {
// Check if internship is active in this date range
$start = $intern->internship_start_date;
$end = $intern->internship_end_date;
// An intern is active this week if internship started on or before Friday 2026-08-07, and ends on or after Monday 2026-08-03
$isActiveThisWeek = ($start <= $weekEnd && $end >= $weekStart);
// Filter entries for this week
$thisWeekEntries = [];
foreach ($intern->journalEntries as $entry) {
if ($entry->date >= $weekStart && $entry->date <= $weekEnd) {
if (!empty(trim($entry->content))) {
$thisWeekEntries[] = $entry;
}
}
}
$internData = [
'id' => $intern->id,
'name' => $intern->name,
'email' => $intern->email,
'start_date' => $start,
'end_date' => $end,
'is_active' => $isActiveThisWeek,
'this_week_entry_count' => count($thisWeekEntries),
'this_week_dates' => array_map(fn($e) => $e->date, $thisWeekEntries),
'all_entries_count' => $intern->journalEntries->where('content', '!=', '')->count(),
];
if (!$isActiveThisWeek) {
$inactiveInterns[] = $internData;
} else {
if (count($thisWeekEntries) == 0) {
$noCodingActiveInterns[] = $internData;
} else {
$activeInternsWithCoding[] = $internData;
}
}
}
echo "1. STAJ GÜNÜ AKTİF OLUP BU HAFTA HİÇ KODLAMA / DEFTEN GİRİŞİ YAPMAYANLAR:\n";
foreach ($noCodingActiveInterns as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ")\n";
echo " - Staj Tarihleri: " . $i['start_date'] . " - " . $i['end_date'] . "\n";
echo " - Bu Hafta Doldurulan Gün Sayısı: 0\n";
echo " - Toplam (Tüm Staj Boyunca) Giriş Sayısı: " . $i['all_entries_count'] . "\n\n";
}
echo "2. STAJ GÜNÜ AKTİF OLUP BU HAFTA KODLAMA / DEFTEN GİRİŞİ YAPANLAR:\n";
foreach ($activeInternsWithCoding as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ")\n";
echo " - Staj Tarihleri: " . $i['start_date'] . " - " . $i['end_date'] . "\n";
echo " - Bu Hafta Doldurulan Gün Sayısı: " . $i['this_week_entry_count'] . " / 5 gün (Tarihler: " . implode(', ', $i['this_week_dates']) . ")\n\n";
}
echo "3. BU HAFTA STAJ DÖNEMİ DIŞINDA / PASİF OLANLAR:\n";
foreach ($inactiveInterns as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ") [Tarihler: " . $i['start_date'] . " - " . $i['end_date'] . "]\n";
}
+22
View File
@@ -0,0 +1,22 @@
<?php
$json = file_get_contents(__DIR__ . '/intern_data.json');
$interns = json_decode($json, true);
$report = "";
foreach ($interns as $intern) {
$report .= "========================================\n";
$report .= "NAME: " . $intern['name'] . "\n";
$report .= "Email: " . $intern['email'] . "\n";
$report .= "GitHub Repo: " . ($intern['github_repo'] ?: 'NONE') . "\n";
$report .= "Start: " . $intern['internship_start_date'] . " | End: " . $intern['internship_end_date'] . "\n";
$report .= "Total Journal Entries: " . count($intern['journal_entries']) . "\n";
foreach ($intern['journal_entries'] as $entry) {
$report .= "--- Date: " . $entry['date'] . " | Day: " . $entry['day_number'] . " | Retroactive: " . ($entry['is_retroactive'] ? 'YES' : 'NO') . " | Approved: " . ($entry['supervisor_approved'] ? 'YES' : 'NO') . "\n";
$report .= strip_tags($entry['content']) . "\n";
}
$report .= "\n\n";
}
file_put_contents(__DIR__ . '/detailed_report.txt', $report);
echo "Written to scratch/detailed_report.txt\n";
File diff suppressed because one or more lines are too long
+39
View File
@@ -0,0 +1,39 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
$interns = \App\Models\CareerApplication::where('status', 'accepted')
->with(['journalEntries' => function($q) {
$q->orderBy('date', 'asc');
}])
->get();
$data = [];
foreach ($interns as $intern) {
$entries = [];
foreach ($intern->journalEntries as $entry) {
$entries[] = [
'day_number' => $entry->day_number,
'date' => $entry->date,
'content' => $entry->content,
'is_retroactive' => $entry->is_retroactive,
'supervisor_approved' => $entry->supervisor_approved,
'unit_approved' => $entry->unit_approved,
];
}
$data[] = [
'id' => $intern->id,
'name' => $intern->name,
'email' => $intern->email,
'github_username' => $intern->github_username,
'github_repo' => $intern->github_repo,
'internship_start_date' => $intern->internship_start_date,
'internship_end_date' => $intern->internship_end_date,
'journal_entries' => $entries,
];
}
file_put_contents(__DIR__ . '/intern_data.json', json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
echo "Done! Saved to scratch/intern_data.json\n";
+31
View File
@@ -0,0 +1,31 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$interns = App\Models\CareerApplication::where('type', 'internship')->where('status', 'accepted')->with(['journalEntries' => function($q) {
$q->orderBy('day_number', 'asc');
}])->get();
$report = [];
foreach ($interns as $intern) {
$entriesCount = $intern->journalEntries->count();
if ($entriesCount == 0) continue;
$contents = [];
foreach ($intern->journalEntries as $e) {
$contents[] = "Gün " . $e->day_number . " (" . $e->date . "):\n" . mb_substr(strip_tags($e->content), 0, 400);
}
$report[] = [
'name' => $intern->name,
'repo' => $intern->github_repo,
'entries_count' => $entriesCount,
'snippets' => array_slice($contents, -3) // Last 3 entries
];
}
file_put_contents(__DIR__ . '/intern_code_summaries.json', json_encode($report, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
echo "Generated summaries for " . count($report) . " interns.\n";
+102
View File
@@ -0,0 +1,102 @@
[
{
"name": "Emre Satıl",
"repo": "https:\/\/github.com\/Emresatil\/Recycle-Rush-VR\/commits\/feature\/save-manager-and-haptics",
"entries_count": 27,
"snippets": [
"Gün 25 (2026-08-05):\n25. Gün (05.08.2026) Çalışma RaporuAR Mimari Geçişi ve VFX EntegrasyonuBugün, projemizin 2. ay \"Karma Gerçeklik (MR) Planlaması\" doğrultusunda, oyunumuzun temelini VR'dan (Sanal Gerçeklik) AR'a (Karma Gerçeklik) taşımak için kritik mimari değişiklikler ve görsel efekt (VFX) entegrasyonları gerçekleştirdim.1. Proje Yönetimi ve Branch (Dal) YapılandırmasıGüne her zamanki standartlarımıza uyarak başl",
"Gün 26 (2026-08-06):\n26. Gün (06.08.2026) Çalışma Raporu**Konu:** AR Fizik Optimizasyonu, Kapsamlı \"Tunneling\" (İçinden Geçme) Çözümü ve Prefab Mimari TemizliğiBugünkü mesaime, dünkü testlerde gözlemlediğim AR fizik hatalarını ve objelerin zeminden geçme problemlerini çözmek amacıyla GitHub üzerinde **\"AR Physics Stability and Tunneling Bug\"** adında kapsamlı bir Issue (Görev) oluşturarak başladım.İlk olarak Unity AR ",
"Gün 27 (2026-08-07):\n27. Gün (07.08.2026) Çalışma RaporuKonu:AAA Standartlarında Kayıt Mimarisi (SaveManager), Golden Waste Joker Mekaniği ve Dokunsal Geri Bildirim (Haptic) SistemleriBugünkü mesaime, projenin eksik olan temel yapı taşlarını (Core Systems) belirleyip inşa etmek amacıyla GitHub üzerinde **\"Core Systems &amp; Mechanics: Haptics, Save Architecture, and Joker Logic\"** adında kapsamlı bir Issue (Görev) olu"
]
},
{
"name": "Ayşenur Ebrar Gündüz",
"repo": "https:\/\/github.com\/AysenurGunduz\/vantage-ai",
"entries_count": 15,
"snippets": [
"Gün 13 (2026-08-05):\nGüne, her zamanki gibi Daily toplantısında bir önceki günün özetini paylaşarak ve bugünün hedeflerini belirleyerek başladım.Bugünün hedefi, plana göre gecikme riski skorlaması olduğu için önce yeni bir çalışma dalı açtım. Bu branch’i dünküne zincirleme yöntemiyle bağlayarak açtım çünkü dünden kullanmam gereken özellikler vardı.Asıl işe, gecikme riskini hesaplayan bir motor yazarak başladım. Risk s",
"Gün 14 (2026-08-06):\nGüne, her zamanki gibi Daily toplantısında bir önceki günün özetini paylaşarak ve bugünün hedeflerini belirleyerek başladım. Bugünün hedefi, yapay zeka tarafındaki hata yönetimini güçlendirmek olduğu için önce yeni bir çalışma dalı açtım. Bu branch'i de dünküne zincirleme yöntemiyle bağlayarak açtım, çünkü dünkü PR henüz onaylanmamıştı ve bugünkü işler onun üzerine kurulu olacaktı.Asıl işe, modele",
"Gün 15 (2026-08-07):\nGüne, her zamanki gibi Daily toplantısında bir önceki günün özetini paylaşarak ve bugünün hedeflerini belirleyerek başladım. Bugünün hedefi yeni bir özellik eklemek değil, önceki üç günde yazdığım yapay zekâ özelliklerini gerçek senaryolarla test etmek ve demoya hazırlamaktı. Bu yüzden yeni branch'imi dünkü branch'in üzerine zincirleyerek açtım, çünkü test edeceğim şeylerin çoğu tam olarak dünkü d"
]
},
{
"name": "Hakan Üzer",
"repo": "https:\/\/github.com\/Emresatil\/Recycle-Rush-VR\/tree\/feature\/ar-golden-spawner-rewards",
"entries_count": 26,
"snippets": [
"Gün 24 (2026-08-04):\nOpenXR Konfigürasyonu, Scene Understanding Entegrasyonu ve AR Varlık (Asset) Optimizasyonları1. OpenXR Paket ve Özellik Ayarlarının SenkronizasyonuGünün ilk aşamasında, projenin Sanal Gerçeklikten (VR) Karma Gerçekliğe (MR - Passthrough) geçişi kapsamında OpenXR ve Meta XR SDK bağımlılıkları gözden geçirilmiştir. Proje gereksinimlerine uygun olarak OpenXR paket ayarları (OpenXRPackageSettings.asse",
"Gün 25 (2026-08-05):\nBugünkü çalışmalar kapsamında, projemizin VR (Sanal Gerçeklik) ortamından AR (Artırılmış Gerçeklik) ve Karma Gerçeklik (MR) ortamına geçiş sürecinin teknik altyapısı oluşturulmuş, cihaz derleme ayarları yapılandırılmış ve nesne havuzlama ile spawner mimarisi AR ortamına uygun hale getirilmiştir.XR Build Ayarları ve Passthrough Entegrasyonu:Meta Quest cihazlarında çalışacak ilk AR yapısının (Build)",
"Gün 26 (2026-08-06):\nBugünkü çalışmalar kapsamında, AR oyunumuzun atık üretim mekanizmasına seviyeye bağlı nadir obje (Golden Waste) üretim algoritması entegre edilmiş, 3D model ve fizik yapılandırmaları tamamlanmış ve geri dönüşüm kutularının (Bin) oyuncuya skor, Coin ve XP kazandıran event tabanlı ödül sistemi geliştirilmiştir.Golden Waste (Altın Çöp) Mimarisi ve Dinamik RNG Algoritması:PortalSpawner.cs sınıfı üzeri"
]
},
{
"name": "Mustafa emre kaplan",
"repo": "https:\/\/github.com\/mustafaemre027\/securewatch-ai",
"entries_count": 19,
"snippets": [
"Gün 17 (2026-08-05):\nGün 17 – Güvenli Dashboard ve RaporlamaDashboard Backend Servisi ve API EntegrasyonuBugün SecureWatch AI projesinde analiz, güvenlik tespiti ve olay verilerini tek ekranda özetleyen dashboard modülü üzerinde çalıştım. Gerçek veritabanı kayıtlarından analiz durumlarını, tespit sayılarını, risk seviyelerini ve olay bilgilerini hesaplayan backend servisini geliştirdim. Sayım ve gruplandırma işlemleri",
"Gün 18 (2026-08-06):\nGün 18 – Güvenlik Doğrulamaları, Test Regresyonu ve Marka EntegrasyonuBackend Regresyon Testleri ve Sistem BütünlüğüBugün SecureWatch AI projesinde kimlik doğrulama, analiz, saldırı tespiti, olay yönetimi ve dashboard modüllerinin birlikte güvenli çalıştığını doğruladım. Backend tarafında 499 testin tamamı başarıyla geçti. Kaynak kodu, bağımlılıklar ve Alembic migration yapısı kontrol edildi; veri",
"Gün 19 (2026-08-07):\nDocker Ortamı ve Backend KonteynerizasyonuBugün SecureWatch AI projesinin Docker tabanlı çalışma ortamını hazırladım. Docker Desktop ve WSL 2 kurulumlarını doğruladıktan sonra backend servisi için Python 3.12 tabanlı Docker image oluşturdum. FastAPI uygulamasının Uvicorn üzerinden container içinde çalışmasını sağladım ve .dockerignore ile gereksiz ve hassas dosyaların image içerisine alınmasını en"
]
},
{
"name": "Doğukan Kalkan",
"repo": "https:\/\/github.com\/Dogukan-klkn\/StockRoute",
"entries_count": 20,
"snippets": [
"Gün 18 (2026-07-23):\nBugün projenin mobil ayağına başladım. Şimdiye kadar sistem yalnızca web tarayıcısından kullanılabiliyordu; bugünden itibaren saha personelinin telefondan erişebileceği bir uygulama iskeleti oluştu.Başlangıç Durumu ve KurulumMobil klasörü projenin ilk günlerinde temel bir Expo iskeleti olarak oluşturulmuştu, ancak içi büyük ölçüde boştu — navigasyon, tema, kimlik doğrulama ve API bağlantısı yoktu.",
"Gün 19 (2026-07-24):\nBugün mobil uygulamanın iki ana özelliği tamamlandı: barkod tarama ve gelen transferlerin teslim alınması. Barkod işi planlanandan hızlı ilerlediği için, normalde son güne bırakılmış olan transfer teslim ekranı da bugüne çekildi.Barkod TaramaKamera ve izinler. Expo'nun kamera modülü kuruldu. Kamera izni üç ayrı durumda ele alındı: izin henüz istenmemiş, reddedilmiş ama tekrar sorulabilir, kalıcı o",
"Gün 20 (2026-07-27):\nProjenin son geliştirme günü. Bugün iki blok iş yapıldı: mobil uygulamaya gerçek zamanlı senkronizasyon eklendi ve backend tarafında son tutarlılık düzeltmeleri tamamlandı. Ardından tüm sistem sıfırdan uçtan uca doğrulandı.Çalışma SırasıGünü planlarken işleri riskine göre sıraladım. Mobil gerçek zamanlı katman backend'e dokunmuyordu, yani izole bir işti — onu önce yapıp bitirmek güvenliydi. Backen"
]
},
{
"name": "Eren Kara",
"repo": "https:\/\/github.com\/erenkara0\/Smart-E-Commerce-Assistant",
"entries_count": 23,
"snippets": [
"Gün 21 (2026-08-04):\nToday, I implemented an Excel product import API endpoint for the MikroAsistan project. I created issue #84 and a dedicated branch, added multipart file upload support, and developed the POST \/products\/import\/excel endpoint. The endpoint validates .xlsx files, rejects unsupported, empty, or corrupted uploads, and connects the Excel parser with the product import and upsert workflow. I also added a",
"Gün 22 (2026-08-05):\nToday, I migrated the product listing workflow from a JSON-based structure to a database-backed architecture. I created a product repository to retrieve active products from SQLite using SQLAlchemy, added deterministic ordering by product ID, and developed a query service to map database models to the existing API product schema. I updated the GET \/products endpoint to use the database while prese",
"Gün 23 (2026-08-06):\nToday, I migrated the product search workflow from JSON-based indexing to a database-backed vector search architecture. I refactored the in-memory vector store to make it independent from the data source, created a service that retrieves active products from the database, converts them into searchable documents, refreshes the index, and performs product searches. I updated the GET \/products\/search"
]
},
{
"name": "ismet can sezgin",
"repo": "https:\/\/github.com\/ismetcansezgin\/EEG-Flow",
"entries_count": 15,
"snippets": [
"Gün 13 (2026-07-30):\nSubject of Work:&nbsp;Phase 2 Feature Engineering: Signal Epoching Dashboard UI Integration and 3D Tensor VisualizationDetailed Description:&nbsp;Completed the frontend integration of the Signal Epoching Dashboard in&nbsp;frontend\/index.html,&nbsp;frontend\/style.css, and&nbsp;frontend\/app.js. Designed glassmorphic control panels allowing users to adjust window duration (window_size_sec) and slidin",
"Gün 14 (2026-07-31):\nSubject of Work:&nbsp;Feature Engineering Phase: Implementation of Time and Frequency Domain EEG Feature Extraction Engine and Unit TestingDetailed Description:&nbsp;Developed the EEG feature extraction engine in&nbsp;backend\/utils\/features.py&nbsp;to convert 3D epoched signal matrices&nbsp;(n_epochs, n_channels, n_samples)&nbsp;into 2D tabular feature matrices&nbsp;(n_epochs, n_features)&nbsp;for",
"Gün 15 (2026-08-03):\nSubject of Work:&nbsp;Feature Engine REST API Endpoint, Alpha Wave ERD Validation Dashboard, and System Styling IntegrationDetailed Description:&nbsp;Developed the&nbsp;POST \/api\/extract-features&nbsp;REST API endpoint in&nbsp;backend\/main.py&nbsp;to bridge the sliding window epoching and 144-dimensional feature extraction modules. The endpoint processes CSV uploads, validates sliding window param"
]
},
{
"name": "Alesam Baath",
"repo": "https:\/\/github.com\/isambais\/SmartHome-EnergyRL",
"entries_count": 18,
"snippets": [
"Gün 16 (2026-08-04):\nGün 16 — Streamlit BMS Dashboard &amp; Landing Page1. Bugün Ne Yapıldı?Projenin kullanıcıya yönelik katmanı tamamlandı: Streamlit tabanlı tam bir Bina Yönetim Sistemi (BMS) dashboard'u ve projeyi tanıtan bir landing page geliştirildi. Gereksiz klasörler (frontend\/, backend\/) proje ağacından temizlendi; .gitignore'a node_modules\/ eklendi.2. Dashboard Mimarisi2.1 Klasör Yapısıdashboard\/├── app.py&nb",
"Gün 17 (2026-08-05):\nGün 17 — 3D Bina Yenileme &amp; Dashboard UI Redesign1. Bugün Ne Yapıldı?Dün oluşturulan Streamlit dashboard'unun görsel kalitesi ve kullanıcı deneyimi köklü biçimde iyileştirildi. Three.js ile yazılmış 3D bina görselleştirmesi tamamen sıfırdan yeniden yazıldı; gerçekçi mimari detaylar, dinamik gökyüzü sistemi ve tüm bina sistemlerinin 3D yansıması eklendi. Dashboard arayüzü landing page tasarımıy",
"Gün 18 (2026-08-06):\nGün 18 — FastAPI Backend &amp; React Frontend1. Bugün Ne Yapıldı?Projenin ağ katmanı yazıldı. Streamlit prototipinin yerini üretim kalitesinde bir istemci-sunucu mimarisi aldı: FastAPI ile yazılmış bir REST API backend ve React + Vite ile yazılmış 7 sayfalık bir web uygulaması. Backend, daha önceki günlerde geliştirilen simülasyon motorunu (dashboard\/core) yeniden kullanıyor; bu sayede hiçbir simü"
]
},
{
"name": "Faruk Tazeoğlu",
"repo": "https:\/\/github.com\/Faruk-T\/baret",
"entries_count": 17,
"snippets": [
"Gün 15 (2026-07-31):\nBugün Baret projesinin canlı teslim ve kapanış günüydü. Uygulamayı Expo Go QR’sız kullanılabilecek şekilde EAS ile Android APK olarak build aldım (preview profili, com.baret.app). Supabase şema kontrollerini yaptım, test verilerini temizleyip demo hesaplarını yeniden kurdum ve alıcı–satıcı–admin senaryolarını uçtan uca doğruladım (sipariş, teslim kodu, iletişim kilidi, komisyon, lisans).Kullanılab",
"Gün 16 (2026-08-03):\nday-21-esn-interest branch’i üzerinden go-live baseline’a ESN interest milestone commit’i atıldı.Mevcut monetizasyon ve operasyon katmanı gözden geçirildi:Sipariş bazlı flat komisyon modeliAdmin finans \/ tahsilat \/ mağaza sağlığı ekranlarıSatıcı sipariş, stok, lisans ve bildirim akışlarıLanding sayfası + APK indirme hattıKomisyon modelinin ileride operasyonel ve hukuki risk yaratabileceği değerlen",
"Gün 17 (2026-08-04):\nGünün amacıSipariş komisyonunu kaldırıp satıcıları Basic \/ Pro \/ Özel abonelik planlarına geçirmek; admin yönetimi, satıcı paneli, veritabanı kuralları ve web sitesini buna göre güncellemek; APK ile test edilebilir hale getirmek.1) Veritabanı \/ iş kurallarıdocs\/seller-plans-setup.sql hazırlandı ve uygulandı:create_order_commission no-op yapıldı → yeni siparişlerde komisyon satırı oluşmuyor.seller_"
]
},
{
"name": "Barış Paşa",
"repo": "https:\/\/github.com\/baris8138\/UstaFlow_litte",
"entries_count": 8,
"snippets": [
"Gün 6 (2026-07-30):\nGit Commit Mesajları:[16:35] (1b468e1) chore(auth): install authentication dependencies[17:07] (03e51c2) feat(auth): add password hashing service[17:13] (a0c735e) feat(auth): add credentials validation schema[17:19] (f29a04a) feat(auth): add user authentication service[17:29] (bcffb20) feat(auth): configure credentials authentication[17:36] (4301d99) docs(auth): document authentication environment",
"Gün 7 (2026-07-31):\nUstaFlow Lite projesinde kimlik doğrulama altyapısının genel kontrollerini gerçekleştirdim. Açılan Pull Request ve reviewer süreçlerini takip ederek branch yapısını kontrol ettim. Sonraki geliştirme adımı olan gerçek giriş sayfası ve oturum yönlendirme akışı için teknik planlama yaptım.Bunu kutuya yazıp Deftere Kaydet diyebilirsin. Commit olmaması, o gün çalışma yapılmadığı anlamına gelmez.",
"Gün 8 (2026-08-03):\nUstaFlow Lite projesinde güvenli çıkış işlemi ile ADMIN ve TECHNICIAN rollerine göre erişim kontrollerini tamamladım. Yetkisiz erişim, oturum yönlendirmesi ve korumalı sayfa testlerini gerçekleştirdim. Ardından müşteri yönetimi modülüne başlayarak Prisma şemasına Customer modeli ve müşteri türlerini ekledim; migration işlemini uygulayıp TypeScript, lint ve production build kontrollerini başarıyla "
]
}
]
File diff suppressed because one or more lines are too long
+110
View File
@@ -0,0 +1,110 @@
==================================================
İSİM: Emre Satıl | REPO: https://github.com/Emresatil/Recycle-Rush-VR/commits/feature/save-manager-and-haptics
Gün 25 (2026-08-05):
25. Gün (05.08.2026) Çalışma RaporuAR Mimari Geçişi ve VFX EntegrasyonuBugün, projemizin 2. ay "Karma Gerçeklik (MR) Planlaması" doğrultusunda, oyunumuzun temelini VR'dan (Sanal Gerçeklik) AR'a (Karma Gerçeklik) taşımak için kritik mimari değişiklikler ve görsel efekt (VFX) entegrasyonları gerçekleştirdim.1. Proje Yönetimi ve Branch (Dal) YapılandırmasıGüne her zamanki standartlarımıza uyarak başl
-----------------------
Gün 26 (2026-08-06):
26. Gün (06.08.2026) Çalışma Raporu**Konu:** AR Fizik Optimizasyonu, Kapsamlı "Tunneling" (İçinden Geçme) Çözümü ve Prefab Mimari TemizliğiBugünkü mesaime, dünkü testlerde gözlemlediğim AR fizik hatalarını ve objelerin zeminden geçme problemlerini çözmek amacıyla GitHub üzerinde **"AR Physics Stability and Tunneling Bug"** adında kapsamlı bir Issue (Görev) oluşturarak başladım.İlk olarak Unity AR
-----------------------
Gün 27 (2026-08-07):
27. Gün (07.08.2026) Çalışma RaporuKonu:AAA Standartlarında Kayıt Mimarisi (SaveManager), Golden Waste Joker Mekaniği ve Dokunsal Geri Bildirim (Haptic) SistemleriBugünkü mesaime, projenin eksik olan temel yapı taşlarını (Core Systems) belirleyip inşa etmek amacıyla GitHub üzerinde **"Core Systems &amp; Mechanics: Haptics, Save Architecture, and Joker Logic"** adında kapsamlı bir Issue (Görev) olu
-----------------------
==================================================
İSİM: Ayşenur Ebrar Gündüz | REPO: https://github.com/AysenurGunduz/vantage-ai
Gün 13 (2026-08-05):
Güne, her zamanki gibi Daily toplantısında bir önceki günün özetini paylaşarak ve bugünün hedeflerini belirleyerek başladım.Bugünün hedefi, plana göre gecikme riski skorlaması olduğu için önce yeni bir çalışma dalı açtım. Bu branch’i dünküne zincirleme yöntemiyle bağlayarak açtım çünkü dünden kullanmam gereken özellikler vardı.Asıl işe, gecikme riskini hesaplayan bir motor yazarak başladım. Risk s
-----------------------
Gün 14 (2026-08-06):
Güne, her zamanki gibi Daily toplantısında bir önceki günün özetini paylaşarak ve bugünün hedeflerini belirleyerek başladım. Bugünün hedefi, yapay zeka tarafındaki hata yönetimini güçlendirmek olduğu için önce yeni bir çalışma dalı açtım. Bu branch'i de dünküne zincirleme yöntemiyle bağlayarak açtım, çünkü dünkü PR henüz onaylanmamıştı ve bugünkü işler onun üzerine kurulu olacaktı.Asıl işe, modele
-----------------------
Gün 15 (2026-08-07):
Güne, her zamanki gibi Daily toplantısında bir önceki günün özetini paylaşarak ve bugünün hedeflerini belirleyerek başladım. Bugünün hedefi yeni bir özellik eklemek değil, önceki üç günde yazdığım yapay zekâ özelliklerini gerçek senaryolarla test etmek ve demoya hazırlamaktı. Bu yüzden yeni branch'imi dünkü branch'in üzerine zincirleyerek açtım, çünkü test edeceğim şeylerin çoğu tam olarak dünkü d
-----------------------
==================================================
İSİM: Hakan Üzer | REPO: https://github.com/Emresatil/Recycle-Rush-VR/tree/feature/ar-golden-spawner-rewards
Gün 24 (2026-08-04):
OpenXR Konfigürasyonu, Scene Understanding Entegrasyonu ve AR Varlık (Asset) Optimizasyonları1. OpenXR Paket ve Özellik Ayarlarının SenkronizasyonuGünün ilk aşamasında, projenin Sanal Gerçeklikten (VR) Karma Gerçekliğe (MR - Passthrough) geçişi kapsamında OpenXR ve Meta XR SDK bağımlılıkları gözden geçirilmiştir. Proje gereksinimlerine uygun olarak OpenXR paket ayarları (OpenXRPackageSettings.asse
-----------------------
Gün 25 (2026-08-05):
Bugünkü çalışmalar kapsamında, projemizin VR (Sanal Gerçeklik) ortamından AR (Artırılmış Gerçeklik) ve Karma Gerçeklik (MR) ortamına geçiş sürecinin teknik altyapısı oluşturulmuş, cihaz derleme ayarları yapılandırılmış ve nesne havuzlama ile spawner mimarisi AR ortamına uygun hale getirilmiştir.XR Build Ayarları ve Passthrough Entegrasyonu:Meta Quest cihazlarında çalışacak ilk AR yapısının (Build)
-----------------------
Gün 26 (2026-08-06):
Bugünkü çalışmalar kapsamında, AR oyunumuzun atık üretim mekanizmasına seviyeye bağlı nadir obje (Golden Waste) üretim algoritması entegre edilmiş, 3D model ve fizik yapılandırmaları tamamlanmış ve geri dönüşüm kutularının (Bin) oyuncuya skor, Coin ve XP kazandıran event tabanlı ödül sistemi geliştirilmiştir.Golden Waste (Altın Çöp) Mimarisi ve Dinamik RNG Algoritması:PortalSpawner.cs sınıfı üzeri
-----------------------
==================================================
İSİM: Mustafa emre kaplan | REPO: https://github.com/mustafaemre027/securewatch-ai
Gün 17 (2026-08-05):
Gün 17 – Güvenli Dashboard ve RaporlamaDashboard Backend Servisi ve API EntegrasyonuBugün SecureWatch AI projesinde analiz, güvenlik tespiti ve olay verilerini tek ekranda özetleyen dashboard modülü üzerinde çalıştım. Gerçek veritabanı kayıtlarından analiz durumlarını, tespit sayılarını, risk seviyelerini ve olay bilgilerini hesaplayan backend servisini geliştirdim. Sayım ve gruplandırma işlemleri
-----------------------
Gün 18 (2026-08-06):
Gün 18 – Güvenlik Doğrulamaları, Test Regresyonu ve Marka EntegrasyonuBackend Regresyon Testleri ve Sistem BütünlüğüBugün SecureWatch AI projesinde kimlik doğrulama, analiz, saldırı tespiti, olay yönetimi ve dashboard modüllerinin birlikte güvenli çalıştığını doğruladım. Backend tarafında 499 testin tamamı başarıyla geçti. Kaynak kodu, bağımlılıklar ve Alembic migration yapısı kontrol edildi; veri
-----------------------
Gün 19 (2026-08-07):
Docker Ortamı ve Backend KonteynerizasyonuBugün SecureWatch AI projesinin Docker tabanlı çalışma ortamını hazırladım. Docker Desktop ve WSL 2 kurulumlarını doğruladıktan sonra backend servisi için Python 3.12 tabanlı Docker image oluşturdum. FastAPI uygulamasının Uvicorn üzerinden container içinde çalışmasını sağladım ve .dockerignore ile gereksiz ve hassas dosyaların image içerisine alınmasını en
-----------------------
==================================================
İSİM: Doğukan Kalkan | REPO: https://github.com/Dogukan-klkn/StockRoute
Gün 18 (2026-07-23):
Bugün projenin mobil ayağına başladım. Şimdiye kadar sistem yalnızca web tarayıcısından kullanılabiliyordu; bugünden itibaren saha personelinin telefondan erişebileceği bir uygulama iskeleti oluştu.Başlangıç Durumu ve KurulumMobil klasörü projenin ilk günlerinde temel bir Expo iskeleti olarak oluşturulmuştu, ancak içi büyük ölçüde boştu — navigasyon, tema, kimlik doğrulama ve API bağlantısı yoktu.
-----------------------
Gün 19 (2026-07-24):
Bugün mobil uygulamanın iki ana özelliği tamamlandı: barkod tarama ve gelen transferlerin teslim alınması. Barkod işi planlanandan hızlı ilerlediği için, normalde son güne bırakılmış olan transfer teslim ekranı da bugüne çekildi.Barkod TaramaKamera ve izinler. Expo'nun kamera modülü kuruldu. Kamera izni üç ayrı durumda ele alındı: izin henüz istenmemiş, reddedilmiş ama tekrar sorulabilir, kalıcı o
-----------------------
Gün 20 (2026-07-27):
Projenin son geliştirme günü. Bugün iki blok iş yapıldı: mobil uygulamaya gerçek zamanlı senkronizasyon eklendi ve backend tarafında son tutarlılık düzeltmeleri tamamlandı. Ardından tüm sistem sıfırdan uçtan uca doğrulandı.Çalışma SırasıGünü planlarken işleri riskine göre sıraladım. Mobil gerçek zamanlı katman backend'e dokunmuyordu, yani izole bir işti — onu önce yapıp bitirmek güvenliydi. Backen
-----------------------
==================================================
İSİM: Eren Kara | REPO: https://github.com/erenkara0/Smart-E-Commerce-Assistant
Gün 21 (2026-08-04):
Today, I implemented an Excel product import API endpoint for the MikroAsistan project. I created issue #84 and a dedicated branch, added multipart file upload support, and developed the POST /products/import/excel endpoint. The endpoint validates .xlsx files, rejects unsupported, empty, or corrupted uploads, and connects the Excel parser with the product import and upsert workflow. I also added a
-----------------------
Gün 22 (2026-08-05):
Today, I migrated the product listing workflow from a JSON-based structure to a database-backed architecture. I created a product repository to retrieve active products from SQLite using SQLAlchemy, added deterministic ordering by product ID, and developed a query service to map database models to the existing API product schema. I updated the GET /products endpoint to use the database while prese
-----------------------
Gün 23 (2026-08-06):
Today, I migrated the product search workflow from JSON-based indexing to a database-backed vector search architecture. I refactored the in-memory vector store to make it independent from the data source, created a service that retrieves active products from the database, converts them into searchable documents, refreshes the index, and performs product searches. I updated the GET /products/search
-----------------------
==================================================
İSİM: ismet can sezgin | REPO: https://github.com/ismetcansezgin/EEG-Flow
Gün 13 (2026-07-30):
Subject of Work:&nbsp;Phase 2 Feature Engineering: Signal Epoching Dashboard UI Integration and 3D Tensor VisualizationDetailed Description:&nbsp;Completed the frontend integration of the Signal Epoching Dashboard in&nbsp;frontend/index.html,&nbsp;frontend/style.css, and&nbsp;frontend/app.js. Designed glassmorphic control panels allowing users to adjust window duration (window_size_sec) and slidin
-----------------------
Gün 14 (2026-07-31):
Subject of Work:&nbsp;Feature Engineering Phase: Implementation of Time and Frequency Domain EEG Feature Extraction Engine and Unit TestingDetailed Description:&nbsp;Developed the EEG feature extraction engine in&nbsp;backend/utils/features.py&nbsp;to convert 3D epoched signal matrices&nbsp;(n_epochs, n_channels, n_samples)&nbsp;into 2D tabular feature matrices&nbsp;(n_epochs, n_features)&nbsp;for
-----------------------
Gün 15 (2026-08-03):
Subject of Work:&nbsp;Feature Engine REST API Endpoint, Alpha Wave ERD Validation Dashboard, and System Styling IntegrationDetailed Description:&nbsp;Developed the&nbsp;POST /api/extract-features&nbsp;REST API endpoint in&nbsp;backend/main.py&nbsp;to bridge the sliding window epoching and 144-dimensional feature extraction modules. The endpoint processes CSV uploads, validates sliding window param
-----------------------
==================================================
İSİM: Alesam Baath | REPO: https://github.com/isambais/SmartHome-EnergyRL
Gün 16 (2026-08-04):
Gün 16 — Streamlit BMS Dashboard &amp; Landing Page1. Bugün Ne Yapıldı?Projenin kullanıcıya yönelik katmanı tamamlandı: Streamlit tabanlı tam bir Bina Yönetim Sistemi (BMS) dashboard'u ve projeyi tanıtan bir landing page geliştirildi. Gereksiz klasörler (frontend/, backend/) proje ağacından temizlendi; .gitignore'a node_modules/ eklendi.2. Dashboard Mimarisi2.1 Klasör Yapısıdashboard/├── app.py&nb
-----------------------
Gün 17 (2026-08-05):
Gün 17 — 3D Bina Yenileme &amp; Dashboard UI Redesign1. Bugün Ne Yapıldı?Dün oluşturulan Streamlit dashboard'unun görsel kalitesi ve kullanıcı deneyimi köklü biçimde iyileştirildi. Three.js ile yazılmış 3D bina görselleştirmesi tamamen sıfırdan yeniden yazıldı; gerçekçi mimari detaylar, dinamik gökyüzü sistemi ve tüm bina sistemlerinin 3D yansıması eklendi. Dashboard arayüzü landing page tasarımıy
-----------------------
Gün 18 (2026-08-06):
Gün 18 — FastAPI Backend &amp; React Frontend1. Bugün Ne Yapıldı?Projenin ağ katmanı yazıldı. Streamlit prototipinin yerini üretim kalitesinde bir istemci-sunucu mimarisi aldı: FastAPI ile yazılmış bir REST API backend ve React + Vite ile yazılmış 7 sayfalık bir web uygulaması. Backend, daha önceki günlerde geliştirilen simülasyon motorunu (dashboard/core) yeniden kullanıyor; bu sayede hiçbir simü
-----------------------
==================================================
İSİM: Faruk Tazeoğlu | REPO: https://github.com/Faruk-T/baret
Gün 15 (2026-07-31):
Bugün Baret projesinin canlı teslim ve kapanış günüydü. Uygulamayı Expo Go QR’sız kullanılabilecek şekilde EAS ile Android APK olarak build aldım (preview profili, com.baret.app). Supabase şema kontrollerini yaptım, test verilerini temizleyip demo hesaplarını yeniden kurdum ve alıcı–satıcı–admin senaryolarını uçtan uca doğruladım (sipariş, teslim kodu, iletişim kilidi, komisyon, lisans).Kullanılab
-----------------------
Gün 16 (2026-08-03):
day-21-esn-interest branch’i üzerinden go-live baseline’a ESN interest milestone commit’i atıldı.Mevcut monetizasyon ve operasyon katmanı gözden geçirildi:Sipariş bazlı flat komisyon modeliAdmin finans / tahsilat / mağaza sağlığı ekranlarıSatıcı sipariş, stok, lisans ve bildirim akışlarıLanding sayfası + APK indirme hattıKomisyon modelinin ileride operasyonel ve hukuki risk yaratabileceği değerlen
-----------------------
Gün 17 (2026-08-04):
Günün amacıSipariş komisyonunu kaldırıp satıcıları Basic / Pro / Özel abonelik planlarına geçirmek; admin yönetimi, satıcı paneli, veritabanı kuralları ve web sitesini buna göre güncellemek; APK ile test edilebilir hale getirmek.1) Veritabanı / iş kurallarıdocs/seller-plans-setup.sql hazırlandı ve uygulandı:create_order_commission no-op yapıldı → yeni siparişlerde komisyon satırı oluşmuyor.seller_
-----------------------
==================================================
İSİM: Barış Paşa | REPO: https://github.com/baris8138/UstaFlow_litte
Gün 6 (2026-07-30):
Git Commit Mesajları:[16:35] (1b468e1) chore(auth): install authentication dependencies[17:07] (03e51c2) feat(auth): add password hashing service[17:13] (a0c735e) feat(auth): add credentials validation schema[17:19] (f29a04a) feat(auth): add user authentication service[17:29] (bcffb20) feat(auth): configure credentials authentication[17:36] (4301d99) docs(auth): document authentication environment
-----------------------
Gün 7 (2026-07-31):
UstaFlow Lite projesinde kimlik doğrulama altyapısının genel kontrollerini gerçekleştirdim. Açılan Pull Request ve reviewer süreçlerini takip ederek branch yapısını kontrol ettim. Sonraki geliştirme adımı olan gerçek giriş sayfası ve oturum yönlendirme akışı için teknik planlama yaptım.Bunu kutuya yazıp Deftere Kaydet diyebilirsin. Commit olmaması, o gün çalışma yapılmadığı anlamına gelmez.
-----------------------
Gün 8 (2026-08-03):
UstaFlow Lite projesinde güvenli çıkış işlemi ile ADMIN ve TECHNICIAN rollerine göre erişim kontrollerini tamamladım. Yetkisiz erişim, oturum yönlendirmesi ve korumalı sayfa testlerini gerçekleştirdim. Ardından müşteri yönetimi modülüne başlayarak Prisma şemasına Customer modeli ve müşteri türlerini ekledim; migration işlemini uygulayıp TypeScript, lint ve production build kontrollerini başarıyla
-----------------------
File diff suppressed because one or more lines are too long
+73
View File
@@ -0,0 +1,73 @@
<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require_once __DIR__ . '/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$interns = App\Models\CareerApplication::where(function($q) {
$q->where('type', 'internship')->orWhereHas('journalEntries');
})->with(['journalEntries' => function($q) {
$q->orderBy('day_number', 'asc');
}])->get();
$approvedCount = 0;
$report = [];
foreach ($interns as $intern) {
$totalEntries = $intern->journalEntries->count();
$filledEntries = 0;
$onTimeEntries = [];
$retroactiveEntries = [];
$newlyApproved = 0;
$alreadyApproved = 0;
foreach ($intern->journalEntries as $entry) {
$hasContent = !empty(trim($entry->content ?? ''));
if ($hasContent) {
$filledEntries++;
if (!$entry->supervisor_approved) {
$entry->supervisor_approved = true;
if (empty($entry->supervisor_name)) {
$entry->supervisor_name = 'Yönetici Onayı';
}
$entry->save();
$newlyApproved++;
$approvedCount++;
} else {
$alreadyApproved++;
}
if ($entry->is_retroactive) {
$retroactiveEntries[] = [
'day' => $entry->day_number,
'date' => $entry->date,
'content_snippet' => mb_substr(trim(preg_replace('/\s+/', ' ', strip_tags($entry->content))), 0, 60)
];
} else {
$onTimeEntries[] = [
'day' => $entry->day_number,
'date' => $entry->date,
];
}
}
}
$report[] = [
'id' => $intern->id,
'name' => $intern->name,
'email' => $intern->email,
'github' => $intern->github_repo,
'total_entries' => $totalEntries,
'filled_entries' => $filledEntries,
'already_approved' => $alreadyApproved,
'newly_approved' => $newlyApproved,
'on_time_count' => count($onTimeEntries),
'retroactive_count' => count($retroactiveEntries),
'on_time_days' => array_column($onTimeEntries, 'day'),
'retroactive_days' => array_column($retroactiveEntries, 'day'),
'retroactive_details' => $retroactiveEntries,
];
}
file_put_contents(__DIR__ . '/approval_report.json', json_encode(['approved_total' => $approvedCount, 'interns' => $report], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
echo "Processed " . count($interns) . " interns. Newly approved entries: " . $approvedCount . "\n";
+39
View File
@@ -0,0 +1,39 @@
<?php
$json = file_get_contents(__DIR__ . '/intern_data.json');
$interns = json_decode($json, true);
foreach ($interns as $intern) {
echo "========================================\n";
echo "NAME: " . $intern['name'] . "\n";
echo "Email: " . $intern['email'] . "\n";
echo "GitHub Repo: " . ($intern['github_repo'] ?: 'NONE') . "\n";
echo "Start: " . $intern['internship_start_date'] . " | End: " . $intern['internship_end_date'] . "\n";
echo "Total Journal Entries: " . count($intern['journal_entries']) . "\n";
// Group journal entries by week or get recent ones
// Let's filter entries for "this week" (2026-07-10 to 2026-07-17)
$this_week_entries = [];
foreach ($intern['journal_entries'] as $entry) {
if ($entry['date'] >= '2026-07-10' && $entry['date'] <= '2026-07-17') {
$this_week_entries[] = $entry;
}
}
echo "This Week's Entries (" . count($this_week_entries) . "):\n";
foreach ($this_week_entries as $entry) {
echo " - Date: " . $entry['date'] . " | Day: " . $entry['day_number'] . " | Retroactive: " . ($entry['is_retroactive'] ? 'YES' : 'NO') . "\n";
// Show first 200 chars of content
$text = trim(strip_tags($entry['content']));
$text = str_replace(["\r", "\n", "\t"], ' ', $text);
$text = preg_replace('/\s+/', ' ', $text);
echo " Content: " . mb_substr($text, 0, 150) . "...\n";
}
// Also list all entries briefly to understand overall progress
echo "All Entries dates: ";
$dates = [];
foreach ($intern['journal_entries'] as $entry) {
$dates[] = $entry['date'] . ($entry['is_retroactive'] ? '(R)' : '');
}
echo implode(', ', $dates) . "\n";
}
+39
View File
@@ -0,0 +1,39 @@
<?php
$data = json_decode(file_get_contents(__DIR__ . '/approval_report.json'), true);
echo "=== STAJYER DEFTEN ONAY VE ANALİZ RAPORU ===\n";
echo "Toplam Yeni Onaylanan Kayıt Sayısı: " . $data['approved_total'] . "\n\n";
$congratulated = [];
$retroactiveList = [];
$noEntriesList = [];
foreach ($data['interns'] as $i) {
if ($i['filled_entries'] == 0) {
$noEntriesList[] = $i;
continue;
}
if ($i['retroactive_count'] == 0) {
$congratulated[] = $i;
} else {
$retroactiveList[] = $i;
}
}
echo "--- GÜNÜ GÜNÜNE DOLDURANLAR (TEBRİK EDİLENLER) ---\n";
foreach ($congratulated as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ") - Toplam " . $i['filled_entries'] . " gün doldurdu. Hepsi zamanında! (Yeni Onay: " . $i['newly_approved'] . ")\n";
}
echo "\n--- GERİYE DÖNÜK DOLDURANLAR (RAPORLANANLAR) ---\n";
foreach ($retroactiveList as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ")\n";
echo " - Toplam Doldurulan: " . $i['filled_entries'] . " gün (Yeni Onay: " . $i['newly_approved'] . ")\n";
echo " - Günü Gününe: " . $i['on_time_count'] . " gün (" . (count($i['on_time_days']) ? implode(', ', $i['on_time_days']) . ". günler" : "Yok") . ")\n";
echo " - Geriye Dönük: " . $i['retroactive_count'] . " gün (" . implode(', ', $i['retroactive_days']) . ". günler)\n";
}
echo "\n--- DEFTEN DOLDURMAYANLAR / KAYDI BULUNMAYANLAR ---\n";
foreach ($noEntriesList as $i) {
echo "• " . $i['name'] . " (" . $i['email'] . ") - 0 Kayıt\n";
}
+12
View File
@@ -0,0 +1,12 @@
<?php
$data = json_decode(file_get_contents(__DIR__ . '/intern_code_summaries.json'), true);
$out = "";
foreach ($data as $d) {
$out .= "==================================================\n";
$out .= "İSİM: " . $d['name'] . " | REPO: " . $d['repo'] . "\n";
foreach ($d['snippets'] as $s) {
$out .= $s . "\n-----------------------\n";
}
}
file_put_contents(__DIR__ . '/output.txt', $out);
echo "Written to output.txt\n";