Ryo_Shimano Claude Sonnet 4.6 commited on
Commit ·
6ab87d2
1
Parent(s): e898ec4
シフト表画面のUI/UX改善(複数箇所)
Browse files- 確定済みシフトのセルクリック時に confirm() を廃止しBootstrapモーダルに統一
- グリッド上部にコンパクト凡例を追加(H/K/希の意味を最初から表示)
- 予約客数・メモセルにホバーヒント(薄青枠)を追加し編集可能と分かるよう改善
- .cell-half のパディングを拡大しモバイルでのタップ操作を改善
- 担当編集モーダルのポジションボタンホバー色を中立色に変更
- textarea のハードコードされた暗色スタイルをCSSカスタムプロパティ経由に変更
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- templates/schedule/index.html +54 -17
templates/schedule/index.html
CHANGED
|
@@ -161,7 +161,7 @@
|
|
| 161 |
/* 希望提出済みだが未アサイン */
|
| 162 |
.chip-unassigned { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); border-radius: 4px; padding: 1px 5px; font-size: .75rem; }
|
| 163 |
/* 1セル内に朝食・ディナーを上下に並べて表示 */
|
| 164 |
-
.cell-half { display: block; padding:
|
| 165 |
.cell-half:hover { background: rgba(148, 163, 184, 0.08); }
|
| 166 |
.cell-half + .cell-half { border-top: 1px dashed var(--border); margin-top: 2px; padding-top: 2px; border-radius: 0 0 4px 4px; }
|
| 167 |
.cell-half-na { color: var(--text-muted); cursor: default; font-size: .7rem; }
|
|
@@ -213,7 +213,7 @@
|
|
| 213 |
border-radius: 10px; padding: .65rem .4rem; font-size: .82rem;
|
| 214 |
transition: all var(--transition); cursor: pointer;
|
| 215 |
}
|
| 216 |
-
.asgn-pos-btn:hover { background:
|
| 217 |
.asgn-pos-btn.hall { background: #1d4ed8; border-color: #1d4ed8; color: white; }
|
| 218 |
.asgn-pos-btn.kitchen{ background: #15803d; border-color: #15803d; color: white; }
|
| 219 |
.reinf-time {
|
|
@@ -244,6 +244,20 @@
|
|
| 244 |
.time-mode-opt input[type=radio] { margin-top: 3px; accent-color: #38bdf8; flex-shrink: 0; }
|
| 245 |
.time-mode-title { font-size: .88rem; font-weight: 600; color: var(--text); line-height: 1.3; }
|
| 246 |
.time-mode-sub { font-size: .73rem; color: var(--text-muted); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
</style>
|
| 248 |
{% endblock %}
|
| 249 |
{% block content %}
|
|
@@ -427,6 +441,15 @@
|
|
| 427 |
{% endfor %}
|
| 428 |
</div>
|
| 429 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 430 |
<!-- シフトグリッド(朝食・ディナーを1つの表にまとめて表示) -->
|
| 431 |
<div class="sched-grid {{ 'sched-locked' if period.status == 'confirmed' else '' }}">
|
| 432 |
<table class="table table-bordered table-sm mb-0">
|
|
@@ -481,7 +504,7 @@
|
|
| 481 |
{% set res_b = reservation_counts.get(ds, {}).get('breakfast', 0) %}
|
| 482 |
{% set res_d = reservation_counts.get(ds, {}).get('dinner', 0) %}
|
| 483 |
<td class="text-center {{ day_cls }} {{ 'today-col' if ds == today else '' }}" style="font-size:.7rem;line-height:1.3;color:#94a3b8">
|
| 484 |
-
<div class="res-cell"
|
| 485 |
data-date="{{ ds }}" data-b="{{ res_b }}" data-d="{{ res_d }}"
|
| 486 |
onclick="editReservation(this)">
|
| 487 |
<div><i class="bi bi-sunrise"></i> <span class="res-b">{{ res_b if res_b else '—' }}</span></div>
|
|
@@ -500,7 +523,7 @@
|
|
| 500 |
{% set is_holiday = ds in holidays %}
|
| 501 |
{% set day_cls = 'sun' if (dow == 6 or is_holiday) else 'sat' if dow == 5 else '' %}
|
| 502 |
<td class="text-center {{ day_cls }}" style="min-width:70px">
|
| 503 |
-
<span class="note-cell
|
| 504 |
data-date="{{ ds }}" data-period="{{ period.id }}" data-endpoint="note"
|
| 505 |
onclick="editNote(this)">{{ notes.get(ds, '') or '' }}</span>
|
| 506 |
</td>
|
|
@@ -515,7 +538,7 @@
|
|
| 515 |
{% set is_holiday = ds in holidays %}
|
| 516 |
{% set day_cls = 'sun' if (dow == 6 or is_holiday) else 'sat' if dow == 5 else '' %}
|
| 517 |
<td class="text-center {{ day_cls }}" style="min-width:70px">
|
| 518 |
-
<span class="note-cell
|
| 519 |
data-date="{{ ds }}" data-period="{{ period.id }}" data-endpoint="staff_note"
|
| 520 |
onclick="editNote(this)">{{ staff_notes.get(ds, '') or '' }}</span>
|
| 521 |
</td>
|
|
@@ -600,15 +623,10 @@
|
|
| 600 |
</table>
|
| 601 |
</div>
|
| 602 |
|
| 603 |
-
<!-- 凡例 -->
|
| 604 |
<div class="d-flex gap-3 mt-2 small text-muted flex-wrap">
|
| 605 |
-
<span><i class="bi bi-sunrise me-1"></i>上段=朝食 <i class="bi bi-moon-stars ms-2 me-1"></i>下段=ディナー</span>
|
| 606 |
-
<span><span class="chip-hall">H</span> ホール出勤</span>
|
| 607 |
-
<span><span class="chip-kitchen">K</span> キッチン出勤</span>
|
| 608 |
-
<span><span class="chip-unassigned">希</span> 希望提出済み・未アサイン</span>
|
| 609 |
<span><span class="chip-hall">H<sup style="font-size:.6rem">変</sup></span> 希望時間から変更</span>
|
| 610 |
<span><span class="chip-hall opacity-75">H<sup style="font-size:.6rem">応</sup></span> 希望にない応援</span>
|
| 611 |
-
<span class="text-secondary">— 該当なし</span>
|
| 612 |
<span class="ms-auto">表示中:{{ 'ホール' if pos == 'hall' else 'キッチン' }}</span>
|
| 613 |
</div>
|
| 614 |
{% endif %}
|
|
@@ -706,7 +724,7 @@
|
|
| 706 |
<div class="asgn-section-label">コメント(任意)</div>
|
| 707 |
<textarea id="cell-note-input" rows="2" maxlength="100"
|
| 708 |
class="form-control form-control-sm"
|
| 709 |
-
style="
|
| 710 |
placeholder="初日・オムレツ担当・休憩15:00〜 など(100文字以内)"
|
| 711 |
maxlength="100"></textarea>
|
| 712 |
</div>
|
|
@@ -932,9 +950,7 @@ function openConfirmDialog() {
|
|
| 932 |
|
| 933 |
function openAssignModal(cell) {
|
| 934 |
if (IS_CONFIRMED) {
|
| 935 |
-
|
| 936 |
-
document.getElementById('unconfirm-form').submit();
|
| 937 |
-
}
|
| 938 |
return;
|
| 939 |
}
|
| 940 |
_cell = cell;
|
|
@@ -1195,8 +1211,7 @@ function editNote(el) {
|
|
| 1195 |
function save() {
|
| 1196 |
const note = input.value.trim();
|
| 1197 |
const span = document.createElement('span');
|
| 1198 |
-
span.className = 'note-cell
|
| 1199 |
-
span.style.cssText = 'cursor:pointer;min-height:18px';
|
| 1200 |
span.dataset.date = date;
|
| 1201 |
span.dataset.period = periodId;
|
| 1202 |
span.dataset.endpoint = endpoint;
|
|
@@ -1240,6 +1255,28 @@ function editNote(el) {
|
|
| 1240 |
</div>
|
| 1241 |
</div>
|
| 1242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1243 |
<!-- 変更履歴モーダル -->
|
| 1244 |
<div class="modal fade" id="historyModal" tabindex="-1">
|
| 1245 |
<div class="modal-dialog modal-dialog-scrollable">
|
|
|
|
| 161 |
/* 希望提出済みだが未アサイン */
|
| 162 |
.chip-unassigned { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); border-radius: 4px; padding: 1px 5px; font-size: .75rem; }
|
| 163 |
/* 1セル内に朝食・ディナーを上下に並べて表示 */
|
| 164 |
+
.cell-half { display: block; padding: 4px; cursor: pointer; border-radius: 4px; transition: background var(--transition); min-height: 26px; }
|
| 165 |
.cell-half:hover { background: rgba(148, 163, 184, 0.08); }
|
| 166 |
.cell-half + .cell-half { border-top: 1px dashed var(--border); margin-top: 2px; padding-top: 2px; border-radius: 0 0 4px 4px; }
|
| 167 |
.cell-half-na { color: var(--text-muted); cursor: default; font-size: .7rem; }
|
|
|
|
| 213 |
border-radius: 10px; padding: .65rem .4rem; font-size: .82rem;
|
| 214 |
transition: all var(--transition); cursor: pointer;
|
| 215 |
}
|
| 216 |
+
.asgn-pos-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: white; }
|
| 217 |
.asgn-pos-btn.hall { background: #1d4ed8; border-color: #1d4ed8; color: white; }
|
| 218 |
.asgn-pos-btn.kitchen{ background: #15803d; border-color: #15803d; color: white; }
|
| 219 |
.reinf-time {
|
|
|
|
| 244 |
.time-mode-opt input[type=radio] { margin-top: 3px; accent-color: #38bdf8; flex-shrink: 0; }
|
| 245 |
.time-mode-title { font-size: .88rem; font-weight: 600; color: var(--text); line-height: 1.3; }
|
| 246 |
.time-mode-sub { font-size: .73rem; color: var(--text-muted); }
|
| 247 |
+
|
| 248 |
+
/* ── インライン編集ヒント ─────────────────────────────────── */
|
| 249 |
+
.res-cell { cursor: pointer; transition: all var(--transition); border-radius: 4px; }
|
| 250 |
+
.res-cell:hover { background: rgba(14,165,233,.08); outline: 1px dashed rgba(14,165,233,.3); }
|
| 251 |
+
.note-cell { cursor: pointer; min-height: 18px; transition: all var(--transition); border-radius: 4px; display: block; }
|
| 252 |
+
.note-cell:hover { background: rgba(14,165,233,.08); outline: 1px dashed rgba(14,165,233,.3); }
|
| 253 |
+
|
| 254 |
+
/* ── モーダル内フォームコントロール(CSSカスタムプロパティで自動ダーク) ── */
|
| 255 |
+
.asgn-modal-content .form-control,
|
| 256 |
+
.asgn-modal-content .form-control:focus {
|
| 257 |
+
background: var(--bg-card);
|
| 258 |
+
border-color: var(--border);
|
| 259 |
+
color: var(--text);
|
| 260 |
+
}
|
| 261 |
</style>
|
| 262 |
{% endblock %}
|
| 263 |
{% block content %}
|
|
|
|
| 441 |
{% endfor %}
|
| 442 |
</div>
|
| 443 |
|
| 444 |
+
<!-- コンパクト凡例 -->
|
| 445 |
+
<div class="d-flex gap-3 mb-1 small text-muted flex-wrap">
|
| 446 |
+
<span><i class="bi bi-sunrise me-1"></i>上段=朝食 <i class="bi bi-moon-stars ms-1 me-1"></i>下段=ディナー</span>
|
| 447 |
+
<span><span class="chip-hall px-1">H</span> ホール</span>
|
| 448 |
+
<span><span class="chip-kitchen px-1">K</span> キッチン</span>
|
| 449 |
+
<span><span class="chip-unassigned px-1">希</span> 希望提出・未アサイン</span>
|
| 450 |
+
<span class="text-secondary">— 対象外</span>
|
| 451 |
+
</div>
|
| 452 |
+
|
| 453 |
<!-- シフトグリッド(朝食・ディナーを1つの表にまとめて表示) -->
|
| 454 |
<div class="sched-grid {{ 'sched-locked' if period.status == 'confirmed' else '' }}">
|
| 455 |
<table class="table table-bordered table-sm mb-0">
|
|
|
|
| 504 |
{% set res_b = reservation_counts.get(ds, {}).get('breakfast', 0) %}
|
| 505 |
{% set res_d = reservation_counts.get(ds, {}).get('dinner', 0) %}
|
| 506 |
<td class="text-center {{ day_cls }} {{ 'today-col' if ds == today else '' }}" style="font-size:.7rem;line-height:1.3;color:#94a3b8">
|
| 507 |
+
<div class="res-cell" title="クリックで予約客数を編集(朝食見込・夜予約欄に印字されます)"
|
| 508 |
data-date="{{ ds }}" data-b="{{ res_b }}" data-d="{{ res_d }}"
|
| 509 |
onclick="editReservation(this)">
|
| 510 |
<div><i class="bi bi-sunrise"></i> <span class="res-b">{{ res_b if res_b else '—' }}</span></div>
|
|
|
|
| 523 |
{% set is_holiday = ds in holidays %}
|
| 524 |
{% set day_cls = 'sun' if (dow == 6 or is_holiday) else 'sat' if dow == 5 else '' %}
|
| 525 |
<td class="text-center {{ day_cls }}" style="min-width:70px">
|
| 526 |
+
<span class="note-cell small text-muted"
|
| 527 |
data-date="{{ ds }}" data-period="{{ period.id }}" data-endpoint="note"
|
| 528 |
onclick="editNote(this)">{{ notes.get(ds, '') or '' }}</span>
|
| 529 |
</td>
|
|
|
|
| 538 |
{% set is_holiday = ds in holidays %}
|
| 539 |
{% set day_cls = 'sun' if (dow == 6 or is_holiday) else 'sat' if dow == 5 else '' %}
|
| 540 |
<td class="text-center {{ day_cls }}" style="min-width:70px">
|
| 541 |
+
<span class="note-cell small text-muted"
|
| 542 |
data-date="{{ ds }}" data-period="{{ period.id }}" data-endpoint="staff_note"
|
| 543 |
onclick="editNote(this)">{{ staff_notes.get(ds, '') or '' }}</span>
|
| 544 |
</td>
|
|
|
|
| 623 |
</table>
|
| 624 |
</div>
|
| 625 |
|
| 626 |
+
<!-- 凡例(補足のみ) -->
|
| 627 |
<div class="d-flex gap-3 mt-2 small text-muted flex-wrap">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 628 |
<span><span class="chip-hall">H<sup style="font-size:.6rem">変</sup></span> 希望時間から変更</span>
|
| 629 |
<span><span class="chip-hall opacity-75">H<sup style="font-size:.6rem">応</sup></span> 希望にない応援</span>
|
|
|
|
| 630 |
<span class="ms-auto">表示中:{{ 'ホール' if pos == 'hall' else 'キッチン' }}</span>
|
| 631 |
</div>
|
| 632 |
{% endif %}
|
|
|
|
| 724 |
<div class="asgn-section-label">コメント(任意)</div>
|
| 725 |
<textarea id="cell-note-input" rows="2" maxlength="100"
|
| 726 |
class="form-control form-control-sm"
|
| 727 |
+
style="resize:none;font-size:.82rem"
|
| 728 |
placeholder="初日・オムレツ担当・休憩15:00〜 など(100文字以内)"
|
| 729 |
maxlength="100"></textarea>
|
| 730 |
</div>
|
|
|
|
| 950 |
|
| 951 |
function openAssignModal(cell) {
|
| 952 |
if (IS_CONFIRMED) {
|
| 953 |
+
new bootstrap.Modal(document.getElementById('unconfirmDialog')).show();
|
|
|
|
|
|
|
| 954 |
return;
|
| 955 |
}
|
| 956 |
_cell = cell;
|
|
|
|
| 1211 |
function save() {
|
| 1212 |
const note = input.value.trim();
|
| 1213 |
const span = document.createElement('span');
|
| 1214 |
+
span.className = 'note-cell small text-muted';
|
|
|
|
| 1215 |
span.dataset.date = date;
|
| 1216 |
span.dataset.period = periodId;
|
| 1217 |
span.dataset.endpoint = endpoint;
|
|
|
|
| 1255 |
</div>
|
| 1256 |
</div>
|
| 1257 |
|
| 1258 |
+
<!-- 確定解除確認ダイアログ -->
|
| 1259 |
+
<div class="modal fade" id="unconfirmDialog" tabindex="-1">
|
| 1260 |
+
<div class="modal-dialog modal-dialog-centered modal-sm">
|
| 1261 |
+
<div class="modal-content">
|
| 1262 |
+
<div class="modal-body p-4 text-center">
|
| 1263 |
+
<i class="bi bi-lock-fill text-warning d-block mb-2" style="font-size:2.2rem"></i>
|
| 1264 |
+
<div class="fw-semibold mb-1">確定済みシフトです</div>
|
| 1265 |
+
<div style="color:var(--text-muted);font-size:.85rem;margin-bottom:1.25rem">
|
| 1266 |
+
確定を解除して編集しますか?
|
| 1267 |
+
</div>
|
| 1268 |
+
<div class="d-flex gap-2">
|
| 1269 |
+
<button class="btn btn-secondary flex-grow-1" data-bs-dismiss="modal">キャンセル</button>
|
| 1270 |
+
<button type="button" class="btn btn-warning flex-grow-1"
|
| 1271 |
+
onclick="document.getElementById('unconfirm-form').submit()">
|
| 1272 |
+
<i class="bi bi-lock-fill me-1"></i>確定解除
|
| 1273 |
+
</button>
|
| 1274 |
+
</div>
|
| 1275 |
+
</div>
|
| 1276 |
+
</div>
|
| 1277 |
+
</div>
|
| 1278 |
+
</div>
|
| 1279 |
+
|
| 1280 |
<!-- 変更履歴モーダル -->
|
| 1281 |
<div class="modal fade" id="historyModal" tabindex="-1">
|
| 1282 |
<div class="modal-dialog modal-dialog-scrollable">
|