Supervisor update 2

This commit is contained in:
hayano
2024-10-29 00:56:12 +00:00
parent a6b816c9f2
commit b872f377b2
11 changed files with 61 additions and 9 deletions

Binary file not shown.

View File

@ -257,8 +257,8 @@
tr.innerHTML = `
<td class="px-6 py-4">${checkin.path_order}</td>
<td class="px-6 py-4">
${location.photos ?
`<img src="${checkin.photos}" class="h-20 w-20 object-cover rounded">` : ''}
${checkin.photos ?
`<img src="/media/compressed/${checkin.photos}" class="h-20 w-20 object-cover rounded" onclick="showLargeImage(this.src)">` : ''}
<div class="text-sm">${checkin.photos}</div>
</td>
<td class="px-6 py-4">
@ -424,7 +424,21 @@
calculateTotalPoints();
});
}
// 画像拡大表示用のモーダル関数
function showLargeImage(src) {
const modal = document.createElement('div');
modal.classList.add('fixed', 'inset-0', 'bg-black', 'bg-opacity-75', 'flex', 'items-center', 'justify-center', 'z-50');
const img = document.createElement('img');
img.src = src;
img.classList.add('max-w-3xl', 'max-h-[90vh]', 'object-contain');
modal.appendChild(img);
modal.onclick = () => modal.remove();
document.body.appendChild(modal);
}
// 新規CP追加用のモーダル
function showAddCPModal() {
const modal = document.createElement('div');