Project

General

Profile

Actions

Feature #355

open
NP NP

Canteen: seed demo data for Coupons

Feature #355: Canteen: seed demo data for Coupons

Added by Navya P. about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/12/2026
Due date:
% Done:

0%

Estimated time:
Resolved By:

Description

CanteenDemoSeeder.SeedCouponBooksAsync adds 4 coupon books, matching the prototype framing of why coupons exist alongside cards -- night duty, blood donor refreshment, a CME event, a guest event. Resolved by department name (ids differ per tenant, same posture as subsidy rules by staff-category name); a department the hospital does not define is skipped. Book numbers are a CP-DEMO- prefix, deliberately distinct from Admin real CP- sequence so a seeded book can never collide with one issued later through the real service. ValidTill is relative to today at seed time (not a fixed date) with one book inside the 7-day expiry window and others well outside it, so Active books and Expiring in 7 days read as different numbers. Program.cs --seed-demo now also resolves departments via GetDepartmentsByHospitalAsync, same pattern as staff categories.

Actions

Also available in: PDF Atom