feat: loyalty feature provider, admin data fixes, storefront mobile menu
Some checks failed
CI / ruff (push) Successful in 9s
CI / pytest (push) Failing after 37m24s
CI / validate (push) Failing after 22s
CI / dependency-scanning (push) Successful in 31s
CI / docs (push) Has been skipped
CI / deploy (push) Has been skipped

- Add LoyaltyFeatureProvider with 11 BINARY/MERCHANT features for billing
  feature gating, wired into loyalty module definition
- Fix subscription-tiers admin page showing 0 features by populating
  feature_codes from tier relationship in all admin tier endpoints
- Fix merchants admin page showing 0 stores and N/A owner by adding
  store_count and owner_email to MerchantResponse and eager-loading owner
- Add "no tiers" warning with link in subscription creation modal when
  platform has no configured tiers
- Add missing mobile menu panel to storefront base template so hamburger
  toggle actually shows navigation links

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 18:59:24 +01:00
parent 2c710ad416
commit a8b29750a5
10 changed files with 350 additions and 13 deletions

View File

@@ -331,12 +331,20 @@
<!-- Tier Selector -->
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Subscription Tier</label>
<select x-model="createForm.tier_code"
class="w-full px-3 py-2 text-sm border border-gray-300 rounded-lg dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-500">
<template x-for="tier in tiers" :key="tier.code">
<option :value="tier.code" x-text="tier.name + ' — ' + formatTierPrice(tier)"></option>
</template>
</select>
<template x-if="tiers.length > 0">
<select x-model="createForm.tier_code"
class="w-full px-3 py-2 text-sm border border-gray-300 rounded-lg dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300 focus:outline-none focus:ring-2 focus:ring-purple-500">
<template x-for="tier in tiers" :key="tier.code">
<option :value="tier.code" x-text="tier.name + ' — ' + formatTierPrice(tier)"></option>
</template>
</select>
</template>
<template x-if="tiers.length === 0">
<div class="p-3 text-sm text-amber-700 bg-amber-50 border border-amber-200 rounded-lg dark:text-amber-300 dark:bg-amber-900/20 dark:border-amber-800">
No tiers configured for this platform.
<a href="/admin/subscription-tiers" class="underline font-medium hover:text-amber-900 dark:hover:text-amber-100">Create a tier first</a>.
</div>
</template>
</div>
<!-- Status -->
@@ -372,7 +380,7 @@
Cancel
</button>
<button @click="createSubscription()"
:disabled="creatingSubscription"
:disabled="creatingSubscription || tiers.length === 0"
class="px-4 py-2 text-sm font-medium text-white bg-purple-600 rounded-lg hover:bg-purple-700 disabled:opacity-50 disabled:cursor-not-allowed">
<span x-show="!creatingSubscription">Create</span>
<span x-show="creatingSubscription">Creating...</span>