feat(ui): replace alert notifications with toast messages
Add toast notification functionality using Bootstrap Toasts and update checkout success/error handling to use toast messages instead of alert boxes. **Changes:** - Add `showToast` function to `terminal.js` - Add toast container and templates to `terminal.html` - Replace alert() calls in handleCheckoutSubmit with showToast()
This commit is contained in:
@@ -729,6 +729,28 @@
|
||||
|
||||
<!-- Модалка редактирования товара в корзине -->
|
||||
{% include 'pos/components/edit_cart_item_modal.html' %}
|
||||
|
||||
<!-- Toast Container для уведомлений -->
|
||||
<div class="toast-container position-fixed top-0 end-0 p-3" style="z-index: 1060;">
|
||||
<div id="orderSuccessToast" class="toast align-items-center border-0" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="d-flex">
|
||||
<div class="toast-body">
|
||||
<i class="bi bi-check-circle-fill text-success me-2 fs-5"></i>
|
||||
<span id="toastMessage"></span>
|
||||
</div>
|
||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close" style="display: none;"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="orderErrorToast" class="toast align-items-center border-0" role="alert" aria-live="assertive" aria-atomic="true">
|
||||
<div class="d-flex">
|
||||
<div class="toast-body">
|
||||
<i class="bi bi-exclamation-circle-fill text-danger me-2 fs-5"></i>
|
||||
<span id="errorMessage"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
|
||||
Reference in New Issue
Block a user