Commit Graph

8 Commits (2792a02460d3674c451eb200818471781f8fe08e)

Author SHA1 Message Date
SYED MUSTUFA AHMED NAQVI e59a3f8af6 Update settings screen for backend operations
Updates settings to work through the backend API for cache sync, order posting, backend health checks, backend URL display, and server/client mode configuration.
2026-05-25 16:23:45 +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 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 f19316b04f Database cleanup and production sync improvements
- Remove legacy SQLite tables/columns (Employees, MealRates, TemporaryMealPlanOverrides, etc.)
- Replace scan timeout with granular interval (Days/Hours/Minutes/Seconds)
- Add CSV export for today's records in Order History modal
- Consolidate cooldown alerts with dynamic unit formatting
- Change order items to "Sehri/Iftari"
- Update MySQL sync: remove device_local_row_id, rename columns (scan_date, received_date)
- Add production migration script for schema changes
- Remove MySQL connection string from Settings UI (use appsettings.json)
2026-02-18 16:50:04 +05:00
SYED MUSTUFA AHMED NAQVI 25a808907d feat(settings): add manual sync + secure config template
Add Settings PostDataNow action via ISyncService

Remove hardcoded MySQL fallback; skip sync when not configured

Use production snake_case columns + always run cleanup

Add appsettings.example.json; ignore appsettings.json to avoid secrets

Rename Settings Cancel button to Back
2026-02-11 12:47:53 +05:00
SYED MUSTUFA AHMED NAQVI cb35b6581a Add order history card + view-all modal; improve device id; prep settings post button
- ScannerDashboard: added Order History card under employee panel (shows last 4 orders)
- Added Today’s Order History modal (View All) with overlay close + close button
- Wired modal state + bindings; added TodayOrderHistory collection and loaders
- Fixed modal element naming for code-behind references
- Updated device id storage to use readable machine/device identifier instead of GUID
- Settings: placed Post Data button next to Sync Endpoint and added IsPosting/PostButtonText/CanPostNow state.
2026-02-06 18:06:28 +05:00
SYED MUSTUFA AHMED NAQVI 90380bf4fb feat: admin login audit in SQLite; Settings Admin Card ID from DB; Scanner dashboard UI
Backend / data
- Add AdminLoginRecords table (Username, EmployeeId, LoginTimeUtc); record on each admin login
- Add IAdminAuditService (RecordLoginAsync, GetLastLogin); AdminAuditService implementation
- Settings: Admin Card ID always prefilled from last admin login in DB (AdminLoginRecords.EmployeeId), fallback "ADMIN"
- Wire AdminAuditService in App.xaml.cs; inject into AdminLoginViewModel and SettingsViewModel

UI
- Scanner Dashboard: two-panel layout (left: employee card with photo, name, department, employee ID, order; right: order placement + stats)
- Employee section: larger fonts and spacing, circular profile image, sample data and asset (emppic.jpeg)
- Menu bar: Site / Settings / Logout in WrapPanel for responsive layout; consistent button sizing
- Dashboard and card responsive (ScrollViewer, MinWidth 0, card MinWidth 360 / MaxWidth 1150)
- Scanner status: activity-based only (connected when input received; no hardware detection)
2026-02-04 18:18:17 +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