fixes #5

Merged
mustafa.ahmed merged 5 commits from fixes into main 2026-04-02 05:50:33 +00:00

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.

HRMS lunch_order_item rows after lunch_order / production transaction insert.

Implement meal session filtering in menu lookup.

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. HRMS lunch_order_item rows after lunch_order / production transaction insert. Implement meal session filtering in menu lookup.
mustafa.ahmed added 4 commits 2026-04-02 05:50:04 +00:00
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
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.
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.
mustafa.ahmed added 1 commit 2026-04-02 05:50:14 +00:00
mustafa.ahmed merged commit e2363ed394 into main 2026-04-02 05:50:33 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mustafa.ahmed/Utopia-Canteen-System#5
There is no content yet.