better styling and tone

This commit is contained in:
Dobromir Popov
2025-04-10 01:50:08 +03:00
parent 13c1f46360
commit 6f5166254b

View File

@ -196,10 +196,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
// if day is thursday, change the note to "Специален текст с линк към снимка" : public/images/cart_EN.jpg - opened in a popup modal
//check if the day is thursday
const dayOfWeek = common.getDayOfWeekNameEnEnumForDate(shift.date);
if (dayOfWeek == "Thursday") {
if (dayOfWeek == "Thursday" && shift.requiresTransport) {
// 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>
shift.notes = `<a href="#" onclick="document.getElementById('cart-image-modal').style.display='block'; return false;" style="color: #2563eb; text-decoration: underline; cursor: pointer; font-weight: bold; padding: 2px 6px; border: 1px solid #2563eb; border-radius: 4px; background-color: #eff6ff; display: inline-block;">Специални инструкции</a>
${originalNotes}
<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;">
@ -208,9 +209,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
<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>
<ul style="list-style-type: disc; padding-left: 20px;">
<li style="margin-bottom: 8px; color: #e53e3e;"><strong>ВАЖНО:</strong> Моля, извършете всички дейности извън склада, в който се съхраняват количките.</li>
<li style="margin-bottom: 8px;"><strong>Четвъртък сутрин:</strong> Заредете брошури и плакати на английски език.</li>
<li style="margin-bottom: 8px;"><strong>Четвъртък вечер:</strong> Подгответе количките за следващия ден с български материали.</li>
</ul>
</div>
</div>
</div>