fix: remove duplicate showToast declaration causing JavaScript error
Root cause: admin_pricing.html declared 'const showToast' while base.html already defined 'function showToast', causing SyntaxError that prevented all JavaScript from executing on the admin pricing page. Changes: - Removed duplicate showToast declaration from admin_pricing.html (lines 206-210) - Removed debug logging added in previous commit - Kept immediate function calls in base.html to ensure early initialization This fixes the issue where username and "Администратор цен" link disappeared when navigating to /admin/pricing. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -203,12 +203,6 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Fallback showToast function for cases where base.html isn't loaded properly
|
||||
const showToast = window.showToast || function(msg, type) {
|
||||
// Simple fallback: just alert the message
|
||||
alert(`${type ? type + ': ' : ''}${msg}`);
|
||||
};
|
||||
|
||||
let currentTab = 'alerts';
|
||||
let currentPage = 1;
|
||||
let totalPages = 1;
|
||||
|
||||
Reference in New Issue
Block a user