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.

NP Updated by Navya P. about 1 month ago Actions #1

  • Status changed from New to Resolved
  • Resolved By set to Navya P.

Done. Caught and fixed a real data-mismatch bug: the first department names chosen (Nursing, Administration, General Medicine) do not exist in Admin real department master for these hospitals -- every book was silently skipped. Switched to real departments confirmed present on hospitals 1 and 9 (Radiology, Pediatrics, Cardiology, Outpatient). Re-ran --seed-demo --hospital 9: 4 coupon books written. 563 unit + 835/837 integration (2 pre-existing unrelated failures). nuvita-canteen-management@cd6c6f9, pushed to integration/canteen-v1.

NP Updated by Navya P. about 1 month ago Actions #2

  • Assignee set to Navya P.
Actions

Also available in: PDF Atom