feat: GUI 칼럼 설정 저장, 010 전화번호 UX 개선, 품목 상세 조회
- GUI: SALES_COLUMNS 상수 정의, 칼럼 폭/윈도우 위치 gui_settings.json에 저장 - 전화번호 입력: 적립페이지/마이페이지에서 010 고정 + 뒷번호만 입력 - 적립페이지: MSSQL SALE_SUB에서 구매 품목 조회 및 토글 표시 - 마이페이지: 적립 내역 탭 시 품목 상세 AJAX 조회 (캐시 적용) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -149,11 +149,17 @@
|
||||
<form method="GET" action="/my-page">
|
||||
<div class="form-group">
|
||||
<label for="phone">전화번호</label>
|
||||
<input type="tel" id="phone" name="phone"
|
||||
placeholder="010-0000-0000"
|
||||
pattern="[0-9-]*"
|
||||
autocomplete="tel"
|
||||
required>
|
||||
<div style="display: flex; align-items: center; gap: 8px;">
|
||||
<span style="font-size: 18px; font-weight: 600; color: #495057; white-space: nowrap; padding: 16px 0 16px 4px;">010 -</span>
|
||||
<input type="tel" id="phoneInput"
|
||||
placeholder="0000-0000"
|
||||
inputmode="numeric"
|
||||
maxlength="9"
|
||||
autocomplete="tel"
|
||||
required
|
||||
style="flex: 1;">
|
||||
<input type="hidden" id="phone" name="phone">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn-submit">
|
||||
@@ -165,19 +171,26 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 전화번호 자동 하이픈
|
||||
const phoneInput = document.getElementById('phone');
|
||||
// 뒷번호 자동 하이픈 (010 고정)
|
||||
const phoneInput = document.getElementById('phoneInput');
|
||||
const phoneHidden = document.getElementById('phone');
|
||||
|
||||
phoneInput.addEventListener('input', function(e) {
|
||||
let value = e.target.value.replace(/[^0-9]/g, '');
|
||||
|
||||
if (value.length <= 3) {
|
||||
if (value.length <= 4) {
|
||||
e.target.value = value;
|
||||
} else if (value.length <= 7) {
|
||||
e.target.value = value.slice(0, 3) + '-' + value.slice(3);
|
||||
} else {
|
||||
e.target.value = value.slice(0, 3) + '-' + value.slice(3, 7) + '-' + value.slice(7, 11);
|
||||
e.target.value = value.slice(0, 4) + '-' + value.slice(4, 8);
|
||||
}
|
||||
});
|
||||
|
||||
// 제출 시 010 합쳐서 hidden 필드에 전달
|
||||
phoneInput.closest('form').addEventListener('submit', function() {
|
||||
const raw = phoneInput.value.replace(/[^0-9]/g, '');
|
||||
phoneHidden.value = '010' + raw;
|
||||
});
|
||||
|
||||
phoneInput.focus();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user