Some checks failed
Standardize naming (Program for view/edit, Analytics for stats), create shared read-only program-view partial, fix admin edit field population bug (14 missing fields), add store Program menu item, and rename merchant Overview→Program, Settings→Analytics. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
43 lines
1.5 KiB
HTML
43 lines
1.5 KiB
HTML
{# app/modules/loyalty/templates/loyalty/merchant/program-edit.html #}
|
|
{% extends "merchant/base.html" %}
|
|
{% from 'shared/macros/headers.html' import page_header_flex %}
|
|
{% from 'shared/macros/alerts.html' import loading_state, error_state %}
|
|
{% from 'shared/macros/modals.html' import confirm_modal %}
|
|
|
|
{% block title %}Loyalty Settings{% endblock %}
|
|
|
|
{% block alpine_data %}merchantLoyaltySettings(){% endblock %}
|
|
|
|
{% block content %}
|
|
{% call page_header_flex(title='Loyalty Program Settings', subtitle='Configure your loyalty program') %}{% endcall %}
|
|
|
|
{{ loading_state('Loading settings...') }}
|
|
{{ error_state('Error loading settings') }}
|
|
|
|
<div x-show="!loading">
|
|
<form @submit.prevent="saveSettings">
|
|
{% set show_delete = true %}
|
|
{% set show_status = true %}
|
|
{% set cancel_url = '/merchants/loyalty/program' %}
|
|
{% include "loyalty/shared/program-form.html" %}
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Delete Confirmation Modal -->
|
|
{{ confirm_modal(
|
|
'deleteProgramModal',
|
|
'Delete Loyalty Program',
|
|
'This will permanently delete your loyalty program and all associated data (cards, transactions, rewards). This action cannot be undone.',
|
|
'deleteProgram()',
|
|
'showDeleteModal',
|
|
'Delete Program',
|
|
'Cancel',
|
|
'danger'
|
|
) }}
|
|
{% endblock %}
|
|
|
|
{% block extra_scripts %}
|
|
<script defer src="{{ url_for('loyalty_static', path='shared/js/loyalty-program-form.js') }}"></script>
|
|
<script defer src="{{ url_for('loyalty_static', path='merchant/js/loyalty-settings.js') }}"></script>
|
|
{% endblock %}
|