Loyalty Card updates
1. Card title fix: The "top-right text" feature was renamed and repositioned to be the actual card title (top-left, replacing the hardcoded "Loyalty Card"), matching what you asked for. This included a proper database migration (cardTopRightText → cardTitleText, etc., using CHANGE COLUMN so any already-configured value is preserved, not dropped) and updates through every layer — schema, service, owner form, and both the owner preview and customer-facing card. Verified live: typed "VIP Rewards" into the new "Card title" field and confirmed it renders top-left on both the owner's live preview and the real customer loyalty page, with the member number staying in its own badge top-right. 2. Tabs: The long "Card Appearance" control list is now split into Colours / Stamp / Text tabs (using the same Tabs component used elsewhere in the app), exactly as you suggested — Colours holds every colour + the background image, Stamp holds just the icon picker, Text holds the title, font, size, and terms line. Along the way, while running full E2E regression, I found 6 test failures — but traced them via git stash to prove they're pre-existing bugs unrelated to this change (a booking/appointments-list bug), so I reverted-then-confirmed before restoring my work, and filed a separate follow-up task for them rather than mixing it into this change. Both fixes are typechecked, linted, verified with the full unit (253) and integration (185) suites, confirmed live in a real browser end-to-end, and deployed to your running Docker container — the migration applied cleanly against your real database with no data loss.
This commit is contained in:
12 files changed
+143
-126
No files matched your search
@@ -0,0 +1,9 @@
|
||||
-- Phase 11: the loyalty card's owner-configurable text now replaces the
|
||||
-- hardcoded "Loyalty Card" title (top-left), not a secondary badge next to
|
||||
-- the member number (top-right) — renamed to match, using CHANGE COLUMN so
|
||||
-- any value an owner already configured (e.g. a custom title) survives the
|
||||
-- rename instead of being dropped.
|
||||
ALTER TABLE `LoyaltyProgramme`
|
||||
CHANGE COLUMN `cardTopRightText` `cardTitleText` VARCHAR(191) NULL,
|
||||
CHANGE COLUMN `cardTopRightTextSize` `cardTitleTextSize` ENUM('SM', 'MD', 'LG') NOT NULL DEFAULT 'MD',
|
||||
CHANGE COLUMN `cardTopRightTextColor` `cardTitleTextColor` VARCHAR(191) NULL;
|
||||
+12
-13
@@ -1214,19 +1214,18 @@ model LoyaltyProgramme {
|
||||
stampIcon String?
|
||||
termsLine String?
|
||||
|
||||
/// Phase 10 — free text shown in the card's top-right area, above the
|
||||
/// member number. Separate from the member number itself (always
|
||||
/// shown, has its own colour below) — null/empty means nothing renders
|
||||
/// there beyond the member number, same as today.
|
||||
cardTopRightText String?
|
||||
/// Card-wide — applies to all card text, not just the top-right text.
|
||||
/// See LoyaltyCardFont's doc comment for why this is card-wide rather
|
||||
/// than a control per element.
|
||||
cardFont LoyaltyCardFont @default(SANS)
|
||||
cardTopRightTextSize LoyaltyCardTextSize @default(MD)
|
||||
cardTopRightTextColor String?
|
||||
cardBorderColor String?
|
||||
cardMemberNumberColor String?
|
||||
/// Phase 11 — replaces the hardcoded "Loyalty Card" title shown top-left
|
||||
/// on the card. Null/empty falls back to "Loyalty Card", same as before
|
||||
/// this was configurable.
|
||||
cardTitleText String?
|
||||
/// Card-wide — applies to all card text, not just the title. See
|
||||
/// LoyaltyCardFont's doc comment for why this is card-wide rather than a
|
||||
/// control per element.
|
||||
cardFont LoyaltyCardFont @default(SANS)
|
||||
cardTitleTextSize LoyaltyCardTextSize @default(MD)
|
||||
cardTitleTextColor String?
|
||||
cardBorderColor String?
|
||||
cardMemberNumberColor String?
|
||||
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
|
||||
Reference in new issue
Block a user