transport info

This commit is contained in:
Dobromir Popov
2025-04-10 01:49:03 +03:00
parent 5bcb943761
commit 13c1f46360

View File

@ -197,12 +197,22 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
//check if the day is thursday
const dayOfWeek = common.getDayOfWeekNameEnEnumForDate(shift.date);
if (dayOfWeek == "Thursday") {
shift.notes = `<a href="#" onclick="document.getElementById('cart-image-modal').style.display='block'; return false;" class="text-blue-600 hover:underline">Специален текст с линк към снимка</a>
// For Thursday, use the regular transport text (if any) but add a special note indicator
let originalNotes = shift.notes || "";
shift.notes = `${originalNotes} <a href="#" onclick="document.getElementById('cart-image-modal').style.display='block'; return false;" class="text-blue-600 hover:underline">[Специални инструкции]</a>
<div id="cart-image-modal" style="display: none;">
<div class="fixed inset-0 flex items-center justify-center z-50">
<div style="background-color: white; padding: 16px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); position: relative; max-width: fit-content;">
<span onclick="document.getElementById('cart-image-modal').style.display='none'" style="position: absolute; right: 10px; top: 5px; cursor: pointer; font-size: 24px; color: #6b7280;">&times;</span>
<img src="/images/cart_EN.jpg" style="max-height: 80vh; object-fit: contain;" />
<div style="display: flex; gap: 20px; align-items: start;">
<img src="/images/cart_EN.jpg" style="max-height: 60vh; object-fit: contain;" />
<div style="max-width: 300px;">
<h3 style="font-weight: bold; margin-bottom: 10px;">Специални инструкции за четвъртък:</h3>
<p><strong>"четвъртък сутрин"</strong> - зареди брошури и плакати на английски</p>
<p><strong>"вечер"</strong> - подготви количките за следващия ден на български</p>
<p>направи го извън склада, в който ги съграняваме</p>
</div>
</div>
</div>
<div class="fixed inset-0 bg-black opacity-50" onclick="document.getElementById('cart-image-modal').style.display='none'"></div>
</div>