From 62b83b46a41ec6feba85173ad6978695a5a1531d Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Sat, 25 Apr 2026 12:34:37 +0200 Subject: [PATCH] feat(loyalty): category view mode + mandatory translations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add eye icon to expand read-only view of all translations - View panel shows EN/FR/DE/LB values with "Edit" button to switch to edit mode - All 4 language fields (EN/FR/DE/LB) now mandatory — Save button disabled until all are filled (both add and edit forms) Co-Authored-By: Claude Opus 4.6 (1M context) --- .../admin/js/loyalty-merchant-detail.js | 1 + .../loyalty/admin/merchant-detail.html | 51 +++++++++++++++---- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/app/modules/loyalty/static/admin/js/loyalty-merchant-detail.js b/app/modules/loyalty/static/admin/js/loyalty-merchant-detail.js index e43d4ff1..36210023 100644 --- a/app/modules/loyalty/static/admin/js/loyalty-merchant-detail.js +++ b/app/modules/loyalty/static/admin/js/loyalty-merchant-detail.js @@ -39,6 +39,7 @@ function adminLoyaltyMerchantDetail() { showAddCategory: false, newCategoryName: '', newCategoryTranslations: { fr: '', de: '', lb: '' }, + viewingCategoryId: null, editingCategoryId: null, editCategoryData: { name: '', translations: { fr: '', de: '', lb: '' } }, diff --git a/app/modules/loyalty/templates/loyalty/admin/merchant-detail.html b/app/modules/loyalty/templates/loyalty/admin/merchant-detail.html index d7f120f7..dbcf73a3 100644 --- a/app/modules/loyalty/templates/loyalty/admin/merchant-detail.html +++ b/app/modules/loyalty/templates/loyalty/admin/merchant-detail.html @@ -259,7 +259,7 @@ class="px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600"> {{ _('loyalty.common.cancel') }} - @@ -270,20 +270,17 @@