special text for thursday

This commit is contained in:
Dobromir Popov
2025-04-09 14:59:45 +03:00
parent 1cb82a43d2
commit 178cf9e6dc
3 changed files with 16 additions and 1 deletions

View File

@ -192,6 +192,21 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
shift.notes = "Прибира количка в Склад Сердика -"; // Update the last shift in the last time slot shift.notes = "Прибира количка в Склад Сердика -"; // Update the last shift in the last time slot
} }
} }
// 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") {
shift.notes = `<a href="#" onclick="document.getElementById('imageModal').style.display='block'; return false;" style="color: blue; text-decoration: underline; cursor: pointer;">Специален текст с линк към снимка</a>
<div id="imageModal" style="display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7);">
<div style="position: relative; margin: auto; padding: 20px; width: 90%; height: 90%; max-width: 90vw; max-height: 90vh; background-color: white; border-radius: 5px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column;">
<span onclick="document.getElementById('imageModal').style.display='none'" style="position: absolute; right: 10px; top: 10px; color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer;">&times;</span>
<div style="flex: 1; display: flex; justify-content: center; align-items: center; overflow: hidden;">
<img src="/images/cart_EN.jpg" style="max-width: 100%; max-height: 100%; object-fit: contain;" />
</div>
</div>
</div>`;
}
} }
} }

BIN
public/images/cart_EN.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

View File

@ -160,7 +160,7 @@
<tr> <tr>
<td class="col1 block sm:table-cell">{{time}}</td> <td class="col1 block sm:table-cell">{{time}}</td>
<td class="col2 block sm:table-cell">{{names}}</td> <td class="col2 block sm:table-cell">{{names}}</td>
<td class="col3 hidden sm:table-cell">{{notes}}<strong>{{notes_bold}}</strong></td> <td class="col3 hidden sm:table-cell">{{{notes}}}<strong>{{notes_bold}}</strong></td>
</tr> </tr>
{{/each}} {{/each}}
</tbody> </tbody>