BarRedemption.vue β

Bar redemption β Beerman only, mobile-first white page. Colour-codes header and drink card by member/drink type matching physical cards.
Used by β
Used Stores β
Functions β
startScan β
Starts the Html5Qrcode camera scanner and attaches it to the #bar-qr-reader element.
stopScan β
Stops and clears the active camera scanner. Safe to call when no scanner is running.
handleScan β
Validates the scanned card UID and either populates scannedCard or sets scanError. Rejects unknown UIDs, inactive cards, and member cards whose owner is not yet registered for the run.
Parameters:
cardUid: - Thecard_uiddecoded from the QR code.
submitManualUid β
Dev-only: submits the manually typed card UID as if it had been scanned.
redeem β
Posts a drink redemption for the current card, drink type, and quantity. Shows a snackbar with the result. If the guest's last entitlement was just used, shows the recollect prompt instead of resetting immediately.
acknowledgeRecollect β
Dismisses the guest card recollect prompt and resets back to scan-ready state.
acknowledgeScanError β
Dismisses the scan error overlay, allowing the Beerman to scan again.
reset β
Resets the component to its initial scan-ready state without navigating away.
Reactivity β
cardLabel (computed) β
Display name for the scanned card β member alias or 'Honored Guest' for guest cards.
cardNumber (computed) β
Formatted card number matching the physical card (e.g. B0042, S0007, G0003).
headerColor (computed) β
Header band colour β matches the physical card colour scheme (Beer/Non-Beer/Guest).
isNonBeer (computed) β
true when the scanned card belongs to a Non-Beer member β drives Softie-only UI.
isGuest (computed) β
true when the scanned card is a guest card.
displayValues (computed) β
Remaining, redeemed, and total entitlement for the current card and selected drink type. Applies the beerβsoftie conversion ratio from redemptionStore.limits so that switching between Beer and Softie tabs shows the correct shared-unit balance. Returns null when no card is scanned.
drinkCardColor (computed) β
Background colour of the drink stats card β cyan for Softie/Non-Beer, orange for Beer.
remainingBoxColor (computed) β
Colour of the "Remaining" counter box β red when exhausted (<= 0), green otherwise.
entitlement (computed) β
Result of redemptionStore.checkEntitlement for the current card, drink type, and quantity. Drives the Collect button disabled state and the entitlement warning message.
