Add database-backed manual order grid with automatic cell saving
This commit is contained in:
+26
-1
@@ -17,6 +17,7 @@
|
||||
/>
|
||||
<link rel="stylesheet" href="{{ root_path }}/static/css/cs_records.css?v=21" />
|
||||
<link rel="stylesheet" href="{{ root_path }}/static/css/return_filters.css?v=1" />
|
||||
<link rel="stylesheet" href="{{ root_path }}/static/css/manual_grid.css?v=1" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
|
||||
<script>
|
||||
// 서브경로 호스팅 정보 — JS 가 fetch 시 prefix 로 사용한다.
|
||||
@@ -1428,6 +1429,28 @@
|
||||
class="tab-content"
|
||||
style="padding: 0"
|
||||
>
|
||||
{% if manual_orders_backend == 'postgres' %}
|
||||
<div id="manual-grid-panel" class="manual-grid-panel">
|
||||
<div class="manual-grid-toolbar">
|
||||
<div><strong>수동발주</strong> <span id="manual-row-count" class="manual-muted"></span></div>
|
||||
<div class="manual-grid-actions">
|
||||
<button type="button" id="manual-add-row" class="btn btn-secondary">+ 행 추가</button>
|
||||
<button type="button" id="manual-delete-rows" class="btn btn-secondary">선택 행 삭제</button>
|
||||
<button type="button" id="manual-refresh" class="btn btn-secondary">새로고침</button>
|
||||
<button type="button" id="manual-download" class="btn btn-primary">엑셀로 저장</button>
|
||||
<details id="manual-exports"><summary>다운로드 기록</summary><ul id="manual-export-list"></ul></details>
|
||||
</div>
|
||||
</div>
|
||||
<div class="manual-grid-info"><span>셀을 클릭해 입력하세요 · Enter ↓ · Tab → · 여러 셀 붙여넣기</span>
|
||||
<span id="manual-save-status" role="status" aria-live="polite">불러오는 중…</span>
|
||||
<button type="button" id="manual-save-retry" hidden>다시 시도</button>
|
||||
</div>
|
||||
<div class="manual-grid-scroll" id="manual-grid-scroll" tabindex="-1">
|
||||
<table id="manual-grid" class="manual-grid" aria-label="수동발주 편집 표"><thead></thead><tbody></tbody></table>
|
||||
<p id="manual-grid-empty" hidden>등록된 발주가 없습니다. 발주를 입력하거나 행을 추가하세요.</p>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="padding: 10px 10px 0 10px; display: flex; justify-content: flex-end">
|
||||
<a
|
||||
href="https://docs.google.com/spreadsheets/d/1QxFtjDurPPZd8NmtXBy4XEUIzkf93aXD5Mlx5kB33xw/edit?gid=0#gid=0"
|
||||
@@ -1467,6 +1490,7 @@
|
||||
style="border: none; border-radius: 8px; box-shadow: var(--card-shadow)"
|
||||
></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
<!-- =========================
|
||||
GIFT SETTINGS TAB
|
||||
@@ -4006,7 +4030,8 @@
|
||||
{% include 'version_history.html' %}
|
||||
</main>
|
||||
</div>
|
||||
<script src="{{ root_path }}/static/js/app.js?v=72"></script>
|
||||
<script src="{{ root_path }}/static/js/app.js?v=73"></script>
|
||||
<script src="{{ root_path }}/static/js/manual_grid.js?v=1"></script>
|
||||
<script src="{{ root_path }}/static/js/cs_records.js?v=19"></script>
|
||||
<script src="{{ root_path }}/static/js/mall_event.js?v=7"></script>
|
||||
<script src="{{ root_path }}/static/js/milkrun_gsheet.js?v=8"></script>
|
||||
|
||||
Reference in New Issue
Block a user