m1m02530125 Claude Sonnet 4.6 commited on
Commit
8434e44
·
1 Parent(s): 1580659

fix: シフト表のフィルターボタンをスマホで横スクロールが出ないよう2行レイアウトに変更

Browse files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. templates/schedule/index.html +35 -34
templates/schedule/index.html CHANGED
@@ -211,42 +211,43 @@
211
  </div>
212
  {% else %}
213
 
214
- <!-- 期間セレクター -->
215
- <div class="d-flex gap-2 mb-3 align-items-center flex-nowrap overflow-x-auto pb-2" style="-webkit-overflow-scrolling:touch">
216
- <select class="form-select form-select-sm flex-shrink-0" style="max-width:220px; width:auto;"
217
- onchange="location.href='/schedule/'+this.value">
218
- {% for p in periods %}
219
- <option value="{{ p.id }}" {{ 'selected' if p.id == period.id else '' }}>
220
- {{ p.start_date }} 〜 {{ p.end_date }}
221
- </option>
222
- {% endfor %}
223
- </select>
224
-
225
- <!-- 朝食/ディナー タブ -->
226
- <div class="btn-group btn-group-sm flex-shrink-0">
227
- <a href="?slot=breakfast&pos={{ pos }}" class="btn {{ 'btn-primary' if slot == 'breakfast' else 'btn-outline-secondary' }}">朝食</a>
228
- <a href="?slot=dinner&pos={{ pos }}" class="btn {{ 'btn-primary' if slot == 'dinner' else 'btn-outline-secondary' }}">ディナー</a>
 
 
 
 
 
 
229
  </div>
230
-
231
- <!-- ホール/キッチン タブ -->
232
- <div class="btn-group btn-group-sm flex-shrink-0">
233
- <a href="?slot={{ slot }}&pos=hall" class="btn {{ 'btn-success' if pos == 'hall' else 'btn-outline-secondary' }}">
234
- <i class="bi bi-people me-1"></i>ホール
235
- </a>
236
- <a href="?slot={{ slot }}&pos=kitchen" class="btn {{ 'btn-success' if pos == 'kitchen' else 'btn-outline-secondary' }}">
237
- <i class="bi bi-egg-fried me-1"></i>キッチン
238
- </a>
 
 
 
 
 
239
  </div>
240
-
241
- {% if period.status == 'draft' %}
242
- <form method="post" action="{{ url_for('schedule.confirm', period_id=period.id) }}" class="flex-shrink-0">
243
- <button class="btn btn-success btn-sm">
244
- <i class="bi bi-check-lg"></i> 確定
245
- </button>
246
- </form>
247
- {% else %}
248
- <span class="badge bg-success flex-shrink-0">確定済</span>
249
- {% endif %}
250
  </div>
251
 
252
  {% if not employees %}
 
211
  </div>
212
  {% else %}
213
 
214
+ <!-- コントロール:2行レイアウト(スマホ対応) -->
215
+ <div class="d-flex flex-column gap-2 mb-3">
216
+ <!-- 1行目:期間セレクタ + 確定ボタン -->
217
+ <div class="d-flex gap-2 align-items-center">
218
+ <select class="form-select form-select-sm" style="max-width:240px;"
219
+ onchange="location.href='/schedule/'+this.value">
220
+ {% for p in periods %}
221
+ <option value="{{ p.id }}" {{ 'selected' if p.id == period.id else '' }}>
222
+ {{ p.start_date }} 〜 {{ p.end_date }}
223
+ </option>
224
+ {% endfor %}
225
+ </select>
226
+ {% if period.status == 'draft' %}
227
+ <form method="post" action="{{ url_for('schedule.confirm', period_id=period.id) }}" class="flex-shrink-0">
228
+ <button class="btn btn-success btn-sm">
229
+ <i class="bi bi-check-lg"></i> 確定
230
+ </button>
231
+ </form>
232
+ {% else %}
233
+ <span class="badge bg-success flex-shrink-0">確定済</span>
234
+ {% endif %}
235
  </div>
236
+ <!-- 2行目:朝食/ディナー + ホール/キッチン -->
237
+ <div class="d-flex gap-2 align-items-center flex-wrap">
238
+ <div class="btn-group btn-group-sm">
239
+ <a href="?slot=breakfast&pos={{ pos }}" class="btn {{ 'btn-primary' if slot == 'breakfast' else 'btn-outline-secondary' }}">朝食</a>
240
+ <a href="?slot=dinner&pos={{ pos }}" class="btn {{ 'btn-primary' if slot == 'dinner' else 'btn-outline-secondary' }}">ディナー</a>
241
+ </div>
242
+ <div class="btn-group btn-group-sm">
243
+ <a href="?slot={{ slot }}&pos=hall" class="btn {{ 'btn-success' if pos == 'hall' else 'btn-outline-secondary' }}">
244
+ <i class="bi bi-people me-1"></i>ホール
245
+ </a>
246
+ <a href="?slot={{ slot }}&pos=kitchen" class="btn {{ 'btn-success' if pos == 'kitchen' else 'btn-outline-secondary' }}">
247
+ <i class="bi bi-egg-fried me-1"></i>キッチン
248
+ </a>
249
+ </div>
250
  </div>
 
 
 
 
 
 
 
 
 
 
251
  </div>
252
 
253
  {% if not employees %}