+
+
- @if($intern->github_repo)
-
- @endif
+
+ @if($intern->github_repo)
+
+ @endif
+
+
+
@@ -900,6 +915,29 @@
}
}
+ function updateEditorStatusBadge(isApproved, hasSaved) {
+ const statusSpan = document.getElementById('editor-day-status');
+ if (!statusSpan) return;
+
+ if (isApproved) {
+ statusSpan.textContent = 'ONAYLANDI';
+ statusSpan.className = 'inline-flex px-2 py-0.5 rounded-full text-[10px] font-extrabold uppercase bg-green-500 text-white border border-green-600 ml-2';
+ } else if (hasSaved) {
+ statusSpan.textContent = 'ONAY BEKLİYOR';
+ statusSpan.className = 'inline-flex px-2 py-0.5 rounded-full text-[10px] font-extrabold uppercase bg-amber-50 text-amber-700 border border-amber-200 ml-2';
+ } else {
+ statusSpan.textContent = '';
+ statusSpan.className = 'hidden';
+ }
+ }
+
+ function printActiveDay() {
+ const btn = document.getElementById(`btn-day-${activeDayIdx}`);
+ if (!btn) return;
+ const dayNum = btn.getAttribute('data-day-num');
+ window.open(`{{ route('intern.print-journal') }}?size=a4&day=${dayNum}`, '_blank');
+ }
+
function appendCommitToQuill(sha, time, msg) {
const escapedMsg = msg.replace(//g, ">");
const commitHtml = `
[${time}] (${sha}) ${escapedMsg}`;
@@ -946,6 +984,7 @@
const dateVal = newBtn.getAttribute('data-date');
const dateFormatted = newBtn.getAttribute('data-formatted-date');
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;
@@ -956,6 +995,9 @@
}
document.getElementById('save-status').textContent = '';
hideFallbackCommits();
+
+ const hasSaved = savedContent && savedContent.trim() !== '' && savedContent !== '
';
+ updateEditorStatusBadge(isApproved, hasSaved);
// Future validation
const dateParts = dateVal.split('-');
@@ -1185,17 +1227,21 @@
statusText.className = "text-xs font-semibold text-green-600";
btn.setAttribute('data-saved-content', contentVal);
+ btn.setAttribute('data-approved', '0');
const badge = document.getElementById(`badge-day-${activeDayIdx}`);
+ const hasContent = contentVal.trim() !== '' && contentVal !== '
';
if (badge) {
- if (contentVal.trim() !== '') {
+ if (hasContent) {
badge.textContent = 'DOLU';
- badge.className = "inline-flex px-2 py-0.5 rounded-lg text-[9px] font-extrabold uppercase bg-green-50 text-green-700 border border-green-200";
+ badge.className = "inline-flex px-2 py-0.5 rounded-lg text-[9px] font-extrabold uppercase bg-amber-50 text-amber-700 border border-amber-200";
} else {
badge.textContent = 'BOŞ';
badge.className = "inline-flex px-2 py-0.5 rounded-lg text-[9px] font-extrabold uppercase bg-slate-50 text-slate-400 border border-slate-200";
}
}
+
+ updateEditorStatusBadge(false, hasContent);
} else {
statusText.textContent = data.message || "Kaydedilemedi.";
statusText.className = "text-xs font-semibold text-red-600";
diff --git a/resources/views/front/career/print.blade.php b/resources/views/front/career/print.blade.php
index 50ba1a6..4712f50 100644
--- a/resources/views/front/career/print.blade.php
+++ b/resources/views/front/career/print.blade.php
@@ -331,8 +331,8 @@
Panele Dön
-
A4 Boyutu
-
A5 Boyutu
+
A4 Boyutu
+
A5 Boyutu