Commit Graph

8 Commits (e467831cfb06e1bec3c7ab975e37f04e1ac8c242)

Author SHA1 Message Date
SYED MUSTUFA AHMED NAQVI cb5f91a5da Fix:
- Updated `item_for` column in `menu_item` table to reflect correct values based on employee grade type (Management/NonManagement).
  - Added 'MANAGEMENT' to items with id 51 and 53.
  - Added 'NON_MANAGEMENT' to item with id 54.
- Modified the employee photo fetching logic to use the external link instead of the database for fetching employee photos.
- Added missing fields in the `lunch_order_transactions` table to ensure no fields are left blank or null during the scan process.
2026-03-31 19:24:49 +05:00
SYED MUSTUFA AHMED NAQVI a42f43b2cc Sync scans to lunch_order and enforce per-session daily scans
Extend HRMS RFID lookup to include uind_serial, function_id, department_id, created_by, and tag created timestamp
Persist new tag fields + meal session code in SQLite scan records; auto-migrate schema and drop deprecated EmployeeDbId column
Enforce “once per meal session per local day” scan rule (keep short per-card debounce; remove global cooldown)
Enhance sync: insert scans into production lunch_order_transactions (MySqlConnectionString) and into HRMS/local lunch_order (HrmsLookupConnectionString) with duplicate guard; include location_site_id from SQLite SiteId
2026-03-09 13:01:08 +05:00
SYED MUSTUFA AHMED NAQVI a1ff310afb Show HRMS employee photo in dashboard and order history
Add EmployeePhotoService to load and decode hrms.employee_photo blobs (data URI or raw bytes) using parent_document_id

Wire ScannerDashboardViewModel to load photos after RFID scan and on app restart, binding to EmployeeProfileImage

Display employee photos in left panel and order-history rows with graceful placeholder fallback

Store ParentDocumentId in scan records and expose it through HrmsEmployeeInfo / ScanRecord / OrderHistoryItem for photo lookups

Use employee.concatenated_name from HRMS for full employee name in lookups

Add CRUD support for meal schedules backed by hrms.meal_schedule (Add New + Save creates/updates schedules for a site and session)
2026-03-03 13:47:43 +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 35161336d0 feat: MySQL direct sync, IP tracking, and SiteId normalization
- Replace API sync with direct MySQL database insert
- Add IP address capture and storage (SQLite + MySQL)
- Normalize SiteId to 2-digit format (e.g., "02" instead of "SITE : 2")
- Mark records as synced instead of deleting after sync
- Add day-end cleanup for old synced rows
- Rename table to lunch_order_transactions
- Add MySqlConnector package and connection string config
2026-02-09 18:08:13 +05:00
SYED MUSTUFA AHMED NAQVI 7bc5ffc77e Scanner dashboard & sync updates
- Add SiteId/DeviceId to scan pipeline (config, SQLite, sync payload, schema upgrade)
- Canteen wording: orders/place order, Today’s Orders, Total Orders (today only), scanner connectivity status
- Menu: site left, Settings/Logout right; fix focus for site input and when closing menu
- Cooldown: prominent on-screen alert to ask customer to rescan after countdown
- Sync: post to production every 15 minutes (was 3 hours)
- UI: remove “Utopia Canteen System” heading, larger logo, single menu row layout
2026-02-03 18:26:39 +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