Compare commits
4 Commits
f1a579c8ee
...
64a997f3c3
| Author | SHA1 | Date | |
|---|---|---|---|
| 64a997f3c3 | |||
| b9a069b905 | |||
| a2fe9e136b | |||
| ff3e084222 |
@@ -27,6 +27,8 @@ use Illuminate\Support\Str;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
use Filament\Forms\Components\Radio;
|
||||
|
||||
class InternApplicationResource extends Resource
|
||||
{
|
||||
protected static ?string $model = CareerApplication::class;
|
||||
@@ -77,21 +79,28 @@ class InternApplicationResource extends Resource
|
||||
->label(__('career.phone'))
|
||||
->disabled(),
|
||||
|
||||
Select::make('status')
|
||||
->label(__('career.status'))
|
||||
->options([
|
||||
'pending' => __('career.pending'),
|
||||
'reviewed' => __('career.reviewed'),
|
||||
'rejected' => __('career.rejected'),
|
||||
'accepted' => __('career.accepted'),
|
||||
'waiting_document' => __('career.waiting_document'),
|
||||
])
|
||||
->required(),
|
||||
|
||||
Textarea::make('message')
|
||||
->label(__('career.message'))
|
||||
->disabled()
|
||||
->columnSpanFull(),
|
||||
->disabled(),
|
||||
|
||||
Radio::make('status')
|
||||
->label('Stajyer Başvuru & İlerleme Aşaması')
|
||||
->options([
|
||||
'pending' => '1. Aşama: Başvuru Alındı (Beklemede)',
|
||||
'reviewed' => '2. Aşama: Ön Değerlendirme Yapıldı (İncelendi)',
|
||||
'waiting_document' => '3. Aşama: Staj Formu Bekleniyor (Stajyer Form Yükleyecek)',
|
||||
'accepted' => '4. Aşama: Kabul Edildi & Staj Aktif (İmzalı Form Onaylandı)',
|
||||
'rejected' => 'Reddedildi (Başvuru İptal / Olumsuz)',
|
||||
])
|
||||
->descriptions([
|
||||
'pending' => 'Stajyer yeni başvurdu. CV ve başvuru bilgileri incelenmeyi bekliyor.',
|
||||
'reviewed' => 'CV ve ön başvuru incelendi, uygunluk değerlendirmesi tamamlandı.',
|
||||
'waiting_document' => 'Stajyer kabul sürecine alındı. Okulundan alacağı staj formunu ve tarihlerini panelinden yüklemesi bekleniyor.',
|
||||
'accepted' => 'İmzalı staj formu sisteme yüklendi/onaylandı ve staj defteri doldurma süreci başladı.',
|
||||
'rejected' => 'Başvuru kriterlere uymadığı için olumsuz sonuçlandırıldı.',
|
||||
])
|
||||
->columnSpanFull()
|
||||
->required(),
|
||||
])->columns(2),
|
||||
|
||||
Tab::make('Staj Belgeleri & Giriş Bilgileri')
|
||||
@@ -477,11 +486,11 @@ class InternApplicationResource extends Resource
|
||||
SelectFilter::make('status')
|
||||
->label(__('career.status'))
|
||||
->options([
|
||||
'pending' => __('career.pending'),
|
||||
'reviewed' => __('career.reviewed'),
|
||||
'rejected' => __('career.rejected'),
|
||||
'accepted' => __('career.accepted'),
|
||||
'waiting_document' => __('career.waiting_document'),
|
||||
'pending' => '1. Aşama: Beklemede',
|
||||
'reviewed' => '2. Aşama: İncelendi',
|
||||
'waiting_document' => '3. Aşama: Staj Formu Bekleniyor',
|
||||
'accepted' => '4. Aşama: Kabul Edildi',
|
||||
'rejected' => 'Reddedildi',
|
||||
]),
|
||||
])
|
||||
->actions([
|
||||
|
||||
@@ -56,7 +56,7 @@ class BlogController extends Controller
|
||||
}
|
||||
|
||||
$posts = $query
|
||||
? $query->latest('published_at')->paginate(12)
|
||||
? $query->orderByRaw('COALESCE(published_at, created_at) DESC')->paginate(12)
|
||||
: collect();
|
||||
|
||||
// Blog sayfa ayarlarını bul (varsa)
|
||||
|
||||
@@ -53,7 +53,7 @@ class CareerApplication extends Model
|
||||
*/
|
||||
public function blogs()
|
||||
{
|
||||
return $this->hasMany(Blog::class, 'career_application_id');
|
||||
return $this->hasMany(Blog::class, 'career_application_id')->orderBy('created_at', 'desc');
|
||||
}
|
||||
|
||||
protected static function booted()
|
||||
|
||||
+4
-4
@@ -80,11 +80,11 @@ return [
|
||||
'intent_letter' => 'Niyet Mektubu',
|
||||
|
||||
// Statuses
|
||||
'pending' => 'Beklemede',
|
||||
'reviewed' => 'İncelendi',
|
||||
'pending' => '1. Aşama: Beklemede',
|
||||
'reviewed' => '2. Aşama: İncelendi',
|
||||
'waiting_document' => '3. Aşama: Staj Formu Bekleniyor',
|
||||
'accepted' => '4. Aşama: Kabul Edildi',
|
||||
'rejected' => 'Reddedildi',
|
||||
'accepted' => 'Kabul Edildi',
|
||||
'waiting_document' => 'İmzalı Staj Formu Bekleniyor',
|
||||
|
||||
// Wizard and Mermaid
|
||||
'step_1_title' => '1. Şartlar & Koşullar',
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -16,8 +16,8 @@
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="canonical" href="https://truncgil.com/b2b/" />
|
||||
<script type="module" crossorigin src="/b2b/assets/index-N3G3oxTn.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/b2b/assets/index-DQzscTbE.css">
|
||||
<script type="module" crossorigin src="/b2b/assets/index-BNuOtgqi.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/b2b/assets/index-DvC9QfaH.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#1D4ED8"/>
|
||||
<stop offset="0.55" stop-color="#2563EB"/>
|
||||
<stop offset="1" stop-color="#22D3EE"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="ring" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stop-color="#22D3EE" stop-opacity="0.9"/>
|
||||
<stop offset="1" stop-color="#67E8F9" stop-opacity="0.5"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="512" height="512" rx="112" fill="url(#bg)"/>
|
||||
<circle cx="256" cy="256" r="168" fill="none" stroke="url(#ring)" stroke-width="10" opacity="0.85"/>
|
||||
<text x="256" y="292" text-anchor="middle" font-family="Plus Jakarta Sans, Segoe UI, system-ui, sans-serif" font-size="148" font-weight="800" fill="#FFFFFF" letter-spacing="-4">B2B</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 898 B |
Binary file not shown.
|
After Width: | Height: | Size: 508 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
@@ -3,7 +3,7 @@
|
||||
$blogs = \App\Models\Blog::with(['category', 'author', 'careerApplication'])
|
||||
->withCount('comments')
|
||||
->published()
|
||||
->latest('published_at')
|
||||
->orderByRaw('COALESCE(published_at, created_at) DESC')
|
||||
->limit(6)
|
||||
->get();
|
||||
@endphp
|
||||
|
||||
@@ -660,11 +660,11 @@
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label for="internship_start_date" class="block text-xs font-extrabold text-slate-500 uppercase tracking-wider mb-1.5">Staj Başlangıç Tarihi</label>
|
||||
<input type="date" name="internship_start_date" id="internship_start_date" onchange="calculateEndDateFrontend()" oninput="calculateEndDateFrontend()" required value="{{ $intern->internship_start_date }}" @if($intern->status !== 'pending') disabled @endif class="w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 focus:outline-none text-sm font-semibold text-slate-700 bg-white transition-all disabled:bg-slate-50 disabled:text-slate-500 disabled:cursor-not-allowed" />
|
||||
<input type="date" name="internship_start_date" id="internship_start_date" onchange="calculateEndDateFrontend()" oninput="calculateEndDateFrontend()" required value="{{ $intern->internship_start_date }}" @if(!in_array($intern->status, ['pending', 'waiting_document', 'reviewed'])) disabled @endif class="w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 focus:outline-none text-sm font-semibold text-slate-700 bg-white transition-all disabled:bg-slate-50 disabled:text-slate-500 disabled:cursor-not-allowed" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="internship_total_days" class="block text-xs font-extrabold text-slate-500 uppercase tracking-wider mb-1.5">Staj Süresi (İş Günü)</label>
|
||||
<input type="number" name="internship_total_days" id="internship_total_days" onchange="calculateEndDateFrontend()" oninput="calculateEndDateFrontend()" min="1" required value="{{ $intern->internship_total_days }}" placeholder="Örn: 20" @if($intern->status !== 'pending') disabled @endif class="w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 focus:outline-none text-sm font-semibold text-slate-700 bg-white transition-all disabled:bg-slate-50 disabled:text-slate-500 disabled:cursor-not-allowed" />
|
||||
<input type="number" name="internship_total_days" id="internship_total_days" onchange="calculateEndDateFrontend()" oninput="calculateEndDateFrontend()" min="1" required value="{{ $intern->internship_total_days }}" placeholder="Örn: 20" @if(!in_array($intern->status, ['pending', 'waiting_document', 'reviewed'])) disabled @endif class="w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-400 focus:ring-1 focus:ring-blue-400 focus:outline-none text-sm font-semibold text-slate-700 bg-white transition-all disabled:bg-slate-50 disabled:text-slate-500 disabled:cursor-not-allowed" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -673,7 +673,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($intern->status === 'pending')
|
||||
@if(in_array($intern->status, ['pending', 'waiting_document', 'reviewed']))
|
||||
<div class="relative border-2 border-dashed border-slate-200 hover:border-blue-400 rounded-2xl p-6 transition-all bg-white flex flex-col items-center justify-center text-center cursor-pointer group">
|
||||
<input type="file" name="internship_form" id="internship_form" accept=".pdf,.docx,.jpg,.png,.jpeg" onchange="handleFileSelected(this)" class="absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10" />
|
||||
<i class="uil uil-cloud-upload text-4xl text-slate-400 group-hover:text-blue-500 transition-colors mb-2"></i>
|
||||
@@ -690,7 +690,7 @@
|
||||
</div>
|
||||
@else
|
||||
<div class="p-4 bg-slate-50 border border-slate-100 rounded-2xl text-center text-xs text-slate-500 font-semibold">
|
||||
<i class="uil uil-lock-alt text-base mr-1"></i> Başvurunuz bekleme aşamasında (beklemede) olmadığı için staj bilgilerinizi ve dosyanızı güncelleyemezsiniz.
|
||||
<i class="uil uil-lock-alt text-base mr-1"></i> Başvurunuz kabul veya ret durumunda olduğu için staj formunuzu ve tarihlerinizi güncelleyemezsiniz.
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
@@ -970,7 +970,7 @@
|
||||
|
||||
<!-- Progress Bar -->
|
||||
@php
|
||||
$userBlogs = $blogs ?? collect();
|
||||
$userBlogs = ($blogs ?? collect())->sortByDesc('created_at');
|
||||
$publishedBlogs = $userBlogs->where('status', 'published');
|
||||
$publishedCount = $publishedBlogs->count();
|
||||
$progressPercent = min(100, round(($publishedCount / 3) * 100));
|
||||
@@ -1325,21 +1325,24 @@
|
||||
<script>
|
||||
|
||||
|
||||
let quill;
|
||||
let quill = null;
|
||||
|
||||
// Tab Switch Logic
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Initialize Quill editor
|
||||
quill = new Quill('#editor-content-quill', {
|
||||
theme: 'snow',
|
||||
modules: {
|
||||
toolbar: [
|
||||
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
||||
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
|
||||
['clean'] // remove formatting button
|
||||
]
|
||||
}
|
||||
});
|
||||
// Initialize Quill editor if container exists
|
||||
const editorElement = document.getElementById('editor-content-quill');
|
||||
if (editorElement) {
|
||||
quill = new Quill('#editor-content-quill', {
|
||||
theme: 'snow',
|
||||
modules: {
|
||||
toolbar: [
|
||||
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
||||
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
|
||||
['clean'] // remove formatting button
|
||||
]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const tabButtons = document.querySelectorAll('.tab-btn');
|
||||
const tabPanels = document.querySelectorAll('.tab-panel');
|
||||
@@ -1379,8 +1382,10 @@
|
||||
// Handle initial state of date logic
|
||||
calculateEndDateFrontend();
|
||||
|
||||
// Select first day of the notebook workspace on load
|
||||
selectNotebookDay(0);
|
||||
// Select first day of the notebook workspace on load if exists
|
||||
if (document.getElementById('btn-day-0')) {
|
||||
selectNotebookDay(0);
|
||||
}
|
||||
});
|
||||
|
||||
const githubRepoUrl = @json($intern->github_repo);
|
||||
@@ -1496,6 +1501,7 @@
|
||||
}
|
||||
|
||||
function renderCommitsToEditor(commitsList) {
|
||||
if (!quill) return;
|
||||
if (commitsList.length === 0) {
|
||||
alert("Bu yazar için seçilen güne ait commit bulunamadı.");
|
||||
return;
|
||||
@@ -1575,6 +1581,7 @@
|
||||
}
|
||||
|
||||
function appendCommitToQuill(sha, time, msg) {
|
||||
if (!quill) return;
|
||||
const escapedMsg = msg.replace(/</g, "<").replace(/>/g, ">");
|
||||
const commitHtml = `<li><strong>[${time}]</strong> (<em>${sha}</em>) ${escapedMsg}</li>`;
|
||||
|
||||
@@ -1622,48 +1629,59 @@
|
||||
const savedContent = newBtn.getAttribute('data-saved-content');
|
||||
const isApproved = newBtn.getAttribute('data-approved') === '1';
|
||||
|
||||
document.getElementById('editor-day-title').textContent = `${dayNum}. Gün`;
|
||||
document.getElementById('editor-day-date').textContent = dateFormatted;
|
||||
const editorDayTitle = document.getElementById('editor-day-title');
|
||||
if (editorDayTitle) editorDayTitle.textContent = `${dayNum}. Gün`;
|
||||
const editorDayDate = document.getElementById('editor-day-date');
|
||||
if (editorDayDate) editorDayDate.textContent = dateFormatted;
|
||||
|
||||
quill.setContents([]);
|
||||
if (savedContent) {
|
||||
quill.clipboard.dangerouslyPasteHTML(savedContent);
|
||||
if (quill) {
|
||||
quill.setContents([]);
|
||||
if (savedContent) {
|
||||
quill.clipboard.dangerouslyPasteHTML(savedContent);
|
||||
}
|
||||
}
|
||||
document.getElementById('save-status').textContent = '';
|
||||
const saveStatus = document.getElementById('save-status');
|
||||
if (saveStatus) saveStatus.textContent = '';
|
||||
hideFallbackCommits();
|
||||
|
||||
const hasSaved = savedContent && savedContent.trim() !== '' && savedContent !== '<p><br></p>';
|
||||
updateEditorStatusBadge(isApproved, hasSaved);
|
||||
|
||||
// Future validation
|
||||
const dateParts = dateVal.split('-');
|
||||
const selectedDate = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
|
||||
const today = new Date();
|
||||
today.setHours(0,0,0,0);
|
||||
if (dateVal) {
|
||||
const dateParts = dateVal.split('-');
|
||||
const selectedDate = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]);
|
||||
const today = new Date();
|
||||
today.setHours(0,0,0,0);
|
||||
|
||||
const isFuture = selectedDate > today;
|
||||
const warningBlock = document.getElementById('future-warning');
|
||||
const saveBtn = document.getElementById('save-btn');
|
||||
const gitBtn = document.querySelector('button[onclick="fillFromGithub()"]');
|
||||
const isFuture = selectedDate > today;
|
||||
const warningBlock = document.getElementById('future-warning');
|
||||
const saveBtn = document.getElementById('save-btn');
|
||||
const gitBtn = document.querySelector('button[onclick="fillFromGithub()"]');
|
||||
|
||||
if (isFuture) {
|
||||
warningBlock.classList.remove('hidden');
|
||||
quill.enable(false);
|
||||
saveBtn.disabled = true;
|
||||
saveBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
if (gitBtn) {
|
||||
gitBtn.disabled = true;
|
||||
gitBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
} else {
|
||||
warningBlock.classList.add('hidden');
|
||||
quill.enable(true);
|
||||
saveBtn.disabled = false;
|
||||
saveBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
||||
if (gitBtn) {
|
||||
gitBtn.disabled = false;
|
||||
gitBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
if (isFuture) {
|
||||
if (warningBlock) warningBlock.classList.remove('hidden');
|
||||
if (quill) quill.enable(false);
|
||||
if (saveBtn) {
|
||||
saveBtn.disabled = true;
|
||||
saveBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
if (gitBtn) {
|
||||
gitBtn.disabled = true;
|
||||
gitBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
} else {
|
||||
if (warningBlock) warningBlock.classList.add('hidden');
|
||||
if (quill) quill.enable(true);
|
||||
if (saveBtn) {
|
||||
saveBtn.disabled = false;
|
||||
saveBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
if (gitBtn) {
|
||||
gitBtn.disabled = false;
|
||||
gitBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1837,7 +1855,7 @@
|
||||
|
||||
function saveActiveDay() {
|
||||
const btn = document.getElementById(`btn-day-${activeDayIdx}`);
|
||||
if (!btn) return;
|
||||
if (!btn || !quill) return;
|
||||
|
||||
const dayNum = btn.getAttribute('data-day-num');
|
||||
const dateVal = btn.getAttribute('data-date');
|
||||
@@ -1846,9 +1864,10 @@
|
||||
contentVal = '';
|
||||
}
|
||||
const statusText = document.getElementById('save-status');
|
||||
|
||||
statusText.textContent = "Kaydediliyor...";
|
||||
statusText.className = "text-xs font-semibold text-slate-400 animate-pulse";
|
||||
if (statusText) {
|
||||
statusText.textContent = "Kaydediliyor...";
|
||||
statusText.className = "text-xs font-semibold text-slate-400 animate-pulse";
|
||||
}
|
||||
|
||||
fetch("{{ route('intern.save-journal') }}", {
|
||||
method: "POST",
|
||||
@@ -1865,8 +1884,10 @@
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success) {
|
||||
statusText.textContent = "Başarıyla kaydedildi.";
|
||||
statusText.className = "text-xs font-semibold text-green-600";
|
||||
if (statusText) {
|
||||
statusText.textContent = "Başarıyla kaydedildi.";
|
||||
statusText.className = "text-xs font-semibold text-green-600";
|
||||
}
|
||||
|
||||
btn.setAttribute('data-saved-content', contentVal);
|
||||
btn.setAttribute('data-approved', '0');
|
||||
@@ -1885,20 +1906,25 @@
|
||||
|
||||
updateEditorStatusBadge(false, hasContent);
|
||||
} else {
|
||||
statusText.textContent = data.message || "Kaydedilemedi.";
|
||||
statusText.className = "text-xs font-semibold text-red-600";
|
||||
if (statusText) {
|
||||
statusText.textContent = data.message || "Kaydedilemedi.";
|
||||
statusText.className = "text-xs font-semibold text-red-600";
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
statusText.textContent = "Bağlantı hatası oluştu.";
|
||||
statusText.className = "text-xs font-semibold text-red-600";
|
||||
if (statusText) {
|
||||
statusText.textContent = "Bağlantı hatası oluştu.";
|
||||
statusText.className = "text-xs font-semibold text-red-600";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function openPrintModal() {
|
||||
const modal = document.getElementById('print-modal');
|
||||
const card = document.getElementById('print-modal-card');
|
||||
if (!modal || !card) return;
|
||||
modal.classList.remove('hidden');
|
||||
setTimeout(() => {
|
||||
card.classList.remove('scale-95', 'opacity-0');
|
||||
@@ -1909,6 +1935,7 @@
|
||||
function closePrintModal() {
|
||||
const modal = document.getElementById('print-modal');
|
||||
const card = document.getElementById('print-modal-card');
|
||||
if (!modal || !card) return;
|
||||
card.classList.remove('scale-100', 'opacity-100');
|
||||
card.classList.add('scale-95', 'opacity-0');
|
||||
setTimeout(() => {
|
||||
@@ -1925,18 +1952,24 @@
|
||||
if (fileSizeMB > 50) {
|
||||
alert('Dosya boyutu 50MB\'ı aşamaz.');
|
||||
input.value = '';
|
||||
fileNameElement.textContent = '';
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
if (fileNameElement) fileNameElement.textContent = '';
|
||||
if (submitBtn) {
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
return;
|
||||
}
|
||||
fileNameElement.textContent = 'Seçilen dosya: ' + file.name + ' (' + fileSizeMB.toFixed(2) + ' MB)';
|
||||
submitBtn.disabled = false;
|
||||
submitBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
||||
if (fileNameElement) fileNameElement.textContent = 'Seçilen dosya: ' + file.name + ' (' + fileSizeMB.toFixed(2) + ' MB)';
|
||||
if (submitBtn) {
|
||||
submitBtn.disabled = false;
|
||||
submitBtn.classList.remove('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
} else {
|
||||
fileNameElement.textContent = '';
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
if (fileNameElement) fileNameElement.textContent = '';
|
||||
if (submitBtn) {
|
||||
submitBtn.disabled = true;
|
||||
submitBtn.classList.add('opacity-50', 'cursor-not-allowed');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1976,10 +2009,15 @@
|
||||
}
|
||||
|
||||
function calculateEndDateFrontend() {
|
||||
const startDateVal = document.getElementById('internship_start_date').value;
|
||||
const totalDaysVal = document.getElementById('internship_total_days').value;
|
||||
const startDateEl = document.getElementById('internship_start_date');
|
||||
const totalDaysEl = document.getElementById('internship_total_days');
|
||||
const endDateInput = document.getElementById('internship_end_date');
|
||||
|
||||
if (!startDateEl || !totalDaysEl || !endDateInput) return;
|
||||
|
||||
const startDateVal = startDateEl.value;
|
||||
const totalDaysVal = totalDaysEl.value;
|
||||
|
||||
if (!startDateVal || !totalDaysVal || totalDaysVal <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user