Commit Graph

4 Commits (fixes)

Author SHA1 Message Date
SYED MUSTUFA AHMED NAQVI 0d6732ad2e Added site mismatch check to block employees from scanning on different sites
- Implemented a check to validate the employee's LocationSiteId against the current site.

- If the employee is from a different site, the scan is blocked and an error message is shown.

- Site mismatch message displays the correct site IDs and prevents scanning for employees registered on a different site.

- Ensured the scan only proceeds for employees registered on the current site.
2026-03-17 14:07:02 +05:00
SYED MUSTUFA AHMED NAQVI e496445b35 Persist per-scan meal details and fix order history state across restarts
Store meal/session label, menu items, total price, department, and department type on each ScanRecord in SQLite so every scan keeps its own metadata.
Add lightweight schema upgrades for lunch_order_transactions to include MealLabel, MealItems, TotalPrice, Department, and DepartmentType.
Update RfidService to populate these new fields and expose UpdateLastScanMealInfo for post-scan enrichment.
Fix dashboard startup logic to restore last scanned employee (ID, name, department, department type, meal) from the last ScanRecord.
Refactor order history and “View All” modal to read Meal/Items and Price from each row’s stored values instead of a global in-memory label.
Include Meal and Price columns in the CSV export, using per-record data.
Remove unused local MealSchedules/OrderItems SQLite tables and ensure they are dropped as legacy schema.
2026-03-02 15:04:33 +05:00
SYED MUSTUFA AHMED NAQVI 888c692764 Use employee RFID site id for menu lookup
Add LocationSiteId to HrmsEmployeeInfo populated from employee_rfid_tag.location_site_id.

Update EmployeeLookupService query to select and map the site id.

Change ScannerDashboardViewModel to load lunch_menu_week using the site id from the scanned employee’s RFID tag instead of only config.
2026-02-24 13:27:50 +05:00
SYED MUSTUFA AHMED NAQVI 113b22f344 Initial commit: admin login + scanner flow + sqlite persistence + sync service 2026-01-31 16:53:32 +05:00