feat: 회원 관리 페이지에 마일리지 표시 추가
- 환자 목록에 마일리지 잔액 컬럼 추가 - 마일리지가 있는 회원은 돼지저금통 아이콘 표시 - 환자 편집 모달에 마일리지 관리 섹션 추가 - 현재 잔액, 총 적립, 총 사용 표시 - 마일리지 적립/차감 버튼 (추후 구현 예정) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
f3f1efd8c2
commit
ee15d8e45e
@ -148,6 +148,7 @@ $(document).ready(function() {
|
||||
|
||||
response.data.forEach(patient => {
|
||||
const compoundCount = compoundCounts[patient.patient_id] || 0;
|
||||
const mileageBalance = patient.mileage_balance || 0;
|
||||
|
||||
tbody.append(`
|
||||
<tr>
|
||||
@ -158,6 +159,10 @@ $(document).ready(function() {
|
||||
<td>
|
||||
<span class="badge bg-primary">${compoundCount}회</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-primary fw-bold">${mileageBalance.toLocaleString()}P</span>
|
||||
${mileageBalance > 0 ? '<i class="bi bi-piggy-bank-fill text-warning ms-1"></i>' : ''}
|
||||
</td>
|
||||
<td>${patient.notes || '-'}</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-outline-info view-patient-compounds"
|
||||
|
||||
@ -217,6 +217,7 @@
|
||||
<th>성별</th>
|
||||
<th>생년월일</th>
|
||||
<th width="80">처방 횟수</th>
|
||||
<th width="100">마일리지</th>
|
||||
<th>메모</th>
|
||||
<th width="180">작업</th>
|
||||
</tr>
|
||||
@ -1428,6 +1429,34 @@
|
||||
<label class="form-label">메모</label>
|
||||
<textarea class="form-control" id="patientNotes" rows="2"></textarea>
|
||||
</div>
|
||||
|
||||
<!-- 마일리지 관리 섹션 (편집 시에만 표시) -->
|
||||
<div id="mileageSection" style="display: none;">
|
||||
<hr>
|
||||
<h6 class="text-primary"><i class="bi bi-piggy-bank"></i> 마일리지 관리</h6>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">현재 잔액</label>
|
||||
<input type="number" class="form-control" id="patientMileageBalance" readonly>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">총 적립</label>
|
||||
<input type="number" class="form-control" id="patientMileageEarned" readonly>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">총 사용</label>
|
||||
<input type="number" class="form-control" id="patientMileageUsed" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<button type="button" class="btn btn-sm btn-outline-success" id="addMileageBtn">
|
||||
<i class="bi bi-plus-circle"></i> 마일리지 적립
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-outline-danger" id="useMileageBtn">
|
||||
<i class="bi bi-dash-circle"></i> 마일리지 차감
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user