Commit Graph

73 Commits (bf1f8accd1ff877b9e7297eedbd5c067cba51030)

Author SHA1 Message Date
SYED MUSTUFA AHMED NAQVI bf1f8accd1 Split server and client configuration handling
Adds client-safe configuration storage, backend base URL support, shared connection string fallback logic, and updated config path handling for separate backend/client deployments.
2026-05-23 12:55:06 +05:00
SYED MUSTUFA AHMED NAQVI 891ddc9175 Add backend API client and remove old client RFID service
Adds a reusable backend API client for scanner and settings operations, replacing the older ClientRfidService with a broader HTTP client abstraction.
2026-05-23 12:51:45 +05:00
SYED MUSTUFA AHMED NAQVI 8bc0e215f7 Add central canteen backend host
Replaces the RFID-only local API host with a broader canteen backend host and adds DTO mapping for scan, stats, cache, sync, employee, and schedule API responses.
2026-05-23 12:50:27 +05:00
SYED MUSTUFA AHMED NAQVI 280811eda4 Add shared canteen API contracts
Adds shared DTOs for backend/client communication, including scan requests, scan responses, health checks, stats, cache status, manual sync responses, employee data, meal schedules, and recent scan records.
2026-05-23 12:48:43 +05:00
SYED MUSTUFA AHMED NAQVI 2abd38cfcc Wire server/client mode and cache sync settings
Adds Server and Client application modes, central server URL settings, and local API listen URL settings.

Wires startup so server mode hosts the RFID API and cache sync timers, while client mode sends scans to the central server. Updates settings UI to save mode and manually sync cache data.
2026-05-21 09:33:17 +05:00
SYED MUSTUFA AHMED NAQVI b2c99017c9 Add central RFID API and client scanner service
Adds a local HTTP API for the central canteen server to accept RFID scans and expose scan dashboard data.

Adds a client RFID service so scanner PCs can forward scans to the central server with device, site, and IP context.
2026-05-21 09:32:33 +05:00
SYED MUSTUFA AHMED NAQVI 37f52bc3c6 Use offline cache for RFID employee, session, and menu lookup
Switches RFID employee lookup, meal session resolution, and menu lookup from live HRMS queries to the local SQLite cache.

Adds cache availability checks and shared site ID normalization for scan validation.
2026-05-21 09:31:10 +05:00
SYED MUSTUFA AHMED NAQVI 1d427b6e18 Add offline HRMS cache schema and sync services
Adds local SQLite cache tables for employee RFID tags, meal schedules, lunch menu weeks, lunch menu items, and menu items.

Adds sync services that pull HRMS RFID/menu data into the local cache and track the last cache sync time.
2026-05-21 09:26:43 +05:00
SYED MUSTUFA AHMED NAQVI b3087f08a2 Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-05-13 17:56:13 +05:00
SYED MUSTUFA AHMED NAQVI 33c37d153b uto to local 2026-05-13 17:34:42 +05:00
SYED MUSTUFA AHMED NAQVI 30a81a2a06 Merge branch 'main' into fixes 2026-05-09 09:44:29 +00:00
SYED MUSTUFA AHMED NAQVI 505d11cfdf fix/ replace UTC with localtime for excell sheet 2026-05-09 14:43:12 +05:00
SYED MUSTUFA AHMED NAQVI 3758738210 Merge pull request 'fixes-department added in sheet' (#11) from fixes into main
Reviewed-on: #11
2026-04-24 06:45:24 +00:00
SYED MUSTUFA AHMED NAQVI 9db32c0d20 Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-04-24 11:44:27 +05:00
SYED MUSTUFA AHMED NAQVI ebc64ac17d department added in excell sheet 2026-04-24 11:44:18 +05:00
SYED MUSTUFA AHMED NAQVI 29f0130ca1 Merge pull request 'fixes' (#10) from fixes into main
Reviewed-on: #10
2026-04-23 12:45:35 +00:00
SYED MUSTUFA AHMED NAQVI 213779c695 Merge branch 'main' into fixes 2026-04-23 12:45:22 +00:00
SYED MUSTUFA AHMED NAQVI 2252112e35 Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-04-23 17:44:18 +05:00
SYED MUSTUFA AHMED NAQVI 3b7b4f7b79 adding name and employee id in excell sheet 2026-04-23 17:43:53 +05:00
SYED MUSTUFA AHMED NAQVI bda42b2a84 Merge pull request 'fixes' (#9) from fixes into main
Reviewed-on: #9
2026-04-20 12:10:41 +00:00
SYED MUSTUFA AHMED NAQVI 78feb65d4f Merge branch 'main' into fixes 2026-04-20 12:10:34 +00:00
SYED MUSTUFA AHMED NAQVI 9abc066cad Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-04-20 16:52:48 +05:00
SYED MUSTUFA AHMED NAQVI a22562cb59 Implement session-based duplicate meal guard with optional auto-sync control
Added a configurable SyncServiceEnabled flag in app config and wired startup to run the background sync timer only when enabled. Updated scan processing to enforce production duplicate checks by employee_serial_number + order_date + meal_name + location_site_id, blocking same-session repeat scans with “Meal already taken” while still allowing different meals on the same day. Improved offline/online behavior by saving locally first and attempting immediate sync when production is reachable, and enhanced manual sync to treat production duplicates as success by marking local IsSynced=1 instead of retrying forever.
2026-04-20 16:51:58 +05:00
SYED MUSTUFA AHMED NAQVI fe36ba60e0 Merge pull request 'fixes' (#8) from fixes into main
Reviewed-on: #8
2026-04-09 06:46:29 +00:00
SYED MUSTUFA AHMED NAQVI 974ca733d9 Merge branch 'main' into fixes 2026-04-09 06:45:53 +00:00
SYED MUSTUFA AHMED NAQVI 316f463962 Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-04-09 11:42:54 +05:00
SYED MUSTUFA AHMED NAQVI b1a86196e8 add a fallback flow for the menu items. 2026-04-09 11:42:37 +05:00
SYED MUSTUFA AHMED NAQVI 29bbbe480c Merge pull request 'fixes' (#7) from fixes into main
Reviewed-on: #7
2026-04-08 08:40:08 +00:00
SYED MUSTUFA AHMED NAQVI 291b381cda Merge branch 'main' into fixes 2026-04-08 08:39:29 +00:00
SYED MUSTUFA AHMED NAQVI 82c899f9fa Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-04-08 13:26:47 +05:00
SYED MUSTUFA AHMED NAQVI 679b0a053e updated the mysqlconnectionstring with preload string to load when app is deployed 2026-04-08 13:26:26 +05:00
SYED MUSTUFA AHMED NAQVI f17c282369 Merge pull request 'fixes' (#6) from fixes into main
Reviewed-on: #6
2026-04-08 07:42:40 +00:00
SYED MUSTUFA AHMED NAQVI 01ddc0310c Merge branch 'main' into fixes 2026-04-07 12:35:13 +00:00
SYED MUSTUFA AHMED NAQVI 937bcc50d3 Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-04-07 17:33:09 +05:00
SYED MUSTUFA AHMED NAQVI cdc610a635 Enforce employee-specific menu authorization via employee_menu_item_tag
Add IsMenuItemAuthorizedForRfidAsync to IEmployeeLookupService / EmployeeLookupService to validate menu access by joining employee_rfid_tag and employee_menu_item_tag. Update RfidService.ProcessScanDetailed to filter HRMS menu items against this authorization, block scans when no authorized item remains, and return a clear "No menu item selected." message while logging failures. This ensures only menu items explicitly tagged for a given RFID can be ordered, and prevents unauthorized or unmapped items from creating transactions.
2026-04-07 17:32:51 +05:00
SYED MUSTUFA AHMED NAQVI e2363ed394 Merge pull request 'fixes' (#5) from fixes into main
Reviewed-on: #5
2026-04-02 05:50:32 +00:00
SYED MUSTUFA AHMED NAQVI 17bc973c8d Merge branch 'main' into fixes 2026-04-02 05:50:12 +00:00
SYED MUSTUFA AHMED NAQVI 0e171af1fa Updated the grade mapping logic in HrmsMenuItemForMapping.cs to map Contractual and MTO/TE/Intern to MANAGEMENT and Unassigned (and empty values) to NON_MANAGEMENT.
The FromGradeType method in HrmsMenuItemForMapping was modified to handle the new mapping rules, ensuring that menu items and lunch order items align with the updated grade-to-menu mapping:
Contractual and MTO/TE/Intern are now mapped to MANAGEMENT menu.

Unassigned and empty values are mapped to NON_MANAGEMENT.
2026-04-02 10:34:52 +05:00
SYED MUSTUFA AHMED NAQVI 4cdac8b4be HRMS lunch_order_item rows after lunch_order / production transaction insert
Extend SyncService so each unsynced SQLite scan still posts to production lunch_order_transactions and upserts HRMS lunch_order, then creates matching lunch_order_item rows. Item lines are derived from SQLite MealItems (split on +); each name is resolved via lunch_menu_week → lunch_menu_item → menu_item using site, menu date, meal name, and optional item_for from grade_type, with a fallback lookup if the meal filter misses. Inserts use lunch_order_id, lunch_menu_item_id, quantity (1), price_at_order_time, item_name, and item_type from HRMS, and skips duplicates for the same order and menu item.
2026-04-02 09:44:16 +05:00
SYED MUSTUFA AHMED NAQVI 0fd22cc1d5 Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-04-01 11:53:47 +05:00
SYED MUSTUFA AHMED NAQVI 92cdbc004b Implement meal session filtering in menu lookup
- Added mealName parameter to IMenuLookupService.GetMenuItemsForSiteAndDateAsync

- Updated SQL query to filter by li.meal_name in MenuLookupService
- Added meal_name to SELECT and result mapping

- Updated RfidService to pass mealLabel from resolved session

- Maintained backward compatibility with existing method
2026-04-01 11:53:18 +05:00
SYED MUSTUFA AHMED NAQVI e467831cfb Merge pull request 'fixes' (#4) from fixes into main
Reviewed-on: #4
2026-03-31 14:30:18 +00:00
SYED MUSTUFA AHMED NAQVI fd6f9ea9ce Merge branch 'main' into fixes 2026-03-31 14:27:17 +00:00
SYED MUSTUFA AHMED NAQVI 3498b7be43 Merge branch 'fixes' of https://git.utopiadeals.com/mustafa.ahmed/Utopia-Canteen-System into fixes 2026-03-31 19:25:15 +05:00
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 131676754b Merge pull request 'Change in Method to fetch the lcoation side id right after the login from admin credentials' (#3) from fixes into main
Reviewed-on: #3
2026-03-30 11:28:19 +00:00
SYED MUSTUFA AHMED NAQVI 4e1a6cf8e6 Merge branch 'main' into fixes 2026-03-30 11:28:07 +00:00
SYED MUSTUFA AHMED NAQVI 1c43c3d25a Change in Method to fetch the lcoation side id right after the login from admin credentials 2026-03-30 16:20:41 +05:00
SYED MUSTUFA AHMED NAQVI 390361ce83 Merge pull request 'fixes' (#2) from fixes into main
Reviewed-on: #2
2026-03-18 08:42:20 +00:00
SYED MUSTUFA AHMED NAQVI fc762456a4 Implemented dynamic site filter logic for meal schedules view. Updated the site selection filter to ensure proper normalization of site IDs from the config and database, allowing accurate display of meal schedules based on the selected site. 2026-03-18 13:38:09 +05:00