UX: Удалено поле "Примечание" из виджета оплаты в POS
Убрано лишнее поле "Примечание" из PaymentWidget: - Удалено HTML-поле для ввода примечания - Убраны все обращения к notesInput в коде - Примечания теперь передаются как пустая строка Для POS-терминала это поле избыточно и только замедляет процесс оплаты. Интерфейс стал проще и быстрее. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -71,15 +71,6 @@ export class PaymentWidget {
|
||||
<small class="text-muted" id="${this.containerId}-hint"></small>
|
||||
</div>
|
||||
|
||||
<!-- Примечание -->
|
||||
<div class="mb-2">
|
||||
<label class="form-label small mb-1">Примечание</label>
|
||||
<input type="text"
|
||||
class="form-control form-control-sm"
|
||||
id="${this.containerId}-notes"
|
||||
placeholder="Опционально">
|
||||
</div>
|
||||
|
||||
<!-- Кнопка добавить (только для mixed mode) -->
|
||||
${this.mode === 'mixed' ? `
|
||||
<div class="d-flex gap-2">
|
||||
@@ -186,7 +177,6 @@ export class PaymentWidget {
|
||||
}
|
||||
|
||||
const amountInput = document.getElementById(`${this.containerId}-amount`);
|
||||
const notesInput = document.getElementById(`${this.containerId}-notes`);
|
||||
|
||||
const amount = parseFloat(amountInput.value);
|
||||
|
||||
@@ -208,7 +198,7 @@ export class PaymentWidget {
|
||||
method_code: this.selectedMethod.code,
|
||||
method_name: this.selectedMethod.name,
|
||||
amount: amount,
|
||||
notes: notesInput.value.trim()
|
||||
notes: '' // Примечания не используются в POS
|
||||
});
|
||||
|
||||
// Обновляем UI
|
||||
@@ -217,7 +207,6 @@ export class PaymentWidget {
|
||||
// Сбрасываем форму
|
||||
const remaining = this.order.amount_due - this.getTotalPayments();
|
||||
amountInput.value = remaining > 0 ? remaining.toFixed(2) : '0.00';
|
||||
notesInput.value = '';
|
||||
|
||||
// Снимаем выделение способа
|
||||
document.querySelectorAll(`#${this.containerId}-methods .payment-method-btn`).forEach(b => {
|
||||
@@ -256,7 +245,6 @@ export class PaymentWidget {
|
||||
<div style="font-size: 0.9rem;">
|
||||
<strong>${p.method_name}</strong>
|
||||
<span class="text-success ms-2">${p.amount.toFixed(2)} руб.</span>
|
||||
${p.notes ? `<br><small class="text-muted">${p.notes}</small>` : ''}
|
||||
</div>
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-danger remove-payment-btn"
|
||||
@@ -340,19 +328,18 @@ export class PaymentWidget {
|
||||
if (this.mode === 'single') {
|
||||
// Одиночная оплата
|
||||
const amountInput = document.getElementById(`${this.containerId}-amount`);
|
||||
const notesInput = document.getElementById(`${this.containerId}-notes`);
|
||||
|
||||
paymentsData = [{
|
||||
payment_method: this.selectedMethod.code,
|
||||
amount: parseFloat(amountInput.value),
|
||||
notes: notesInput.value.trim()
|
||||
notes: ''
|
||||
}];
|
||||
} else {
|
||||
// Смешанная оплата
|
||||
paymentsData = this.payments.map(p => ({
|
||||
payment_method: p.method_code,
|
||||
amount: p.amount,
|
||||
notes: p.notes
|
||||
notes: p.notes || ''
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user