KTVManager_UI/templates/config_dashboard.html

47 lines
1.6 KiB
HTML
Raw Normal View History

2025-07-19 08:56:13 +01:00
{% extends "base.html" %}
{% block title %}Config Dashboard{% endblock %}
{% block content %}
<div class="container">
<h2>Configuration Dashboard</h2>
<p>Welcome to the configuration page.</p>
<button id="send-test-notification-btn" class="btn btn-primary">Send Test Notification</button>
2025-07-19 09:05:28 +01:00
<button id="check-expiring-accounts-btn" class="btn btn-info">Check Expiring Accounts</button>
2025-07-19 08:56:13 +01:00
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script>
document.getElementById('send-test-notification-btn').addEventListener('click', function() {
fetch('{{ url_for("send_test_notification") }}', {
method: 'POST'
}).then(response => {
if (response.ok) {
alert('Test notification sent successfully!');
} else {
alert('Failed to send test notification.');
}
}).catch(err => {
console.error('Error sending test notification:', err);
alert('An error occurred while sending the test notification.');
});
});
2025-07-19 09:05:28 +01:00
document.getElementById('check-expiring-accounts-btn').addEventListener('click', function() {
fetch('{{ url_for("check_expiring_accounts") }}', {
method: 'POST'
}).then(response => {
if (response.ok) {
alert('Expiring accounts check triggered successfully!');
} else {
alert('Failed to trigger expiring accounts check.');
}
}).catch(err => {
console.error('Error triggering expiring accounts check:', err);
alert('An error occurred while triggering the expiring accounts check.');
});
});
2025-07-19 08:56:13 +01:00
</script>
{% endblock %}