Sell a set of tickets together for one price (e.g. 5 Adult + 3 Child for R500). Bundles apply automatically, as many times as a registration's tickets allow, and only when cheaper than the prices actually charged. Coupons come off afterwards. - EventBundle/EventBundleItem/RegistrationBundle models and Registration.bundleDiscount - Supervisor "Bundle deals" page, quote endpoint, bundle lines on invoices, receipts, emails, WhatsApp and Yoco checkout, Discounts report rows - Register form shows started bundles with "Complete bundle" and "+" buttons - Demo: Family Fun Day sells a Family deal bundle instead of the Family pass ticket Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
667 B
JavaScript
15 lines
667 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const { listBundles, createBundle, updateBundle, deleteBundle, quoteBundles } = require('../controllers/bundleController');
|
|
const { protect, supervisor, optionalAuth } = require('../middleware/authMiddleware');
|
|
|
|
// What a basket gets off before registering (guests included)
|
|
router.post('/quote', optionalAuth, quoteBundles);
|
|
|
|
router.get('/event/:eventId', protect, supervisor, listBundles);
|
|
router.post('/event/:eventId', protect, supervisor, createBundle);
|
|
router.put('/:id', protect, supervisor, updateBundle);
|
|
router.delete('/:id', protect, supervisor, deleteBundle);
|
|
|
|
module.exports = router;
|