Updated the export so the downloaded CSV now includes a separate MealSession column populated from MealLabel

fixes
SYED MUSTUFA AHMED NAQVI 2026-06-16 17:46:38 +05:00
parent 5651f3e6cf
commit 7a76516bd8
1 changed files with 3 additions and 1 deletions

View File

@ -933,7 +933,7 @@ public partial class ScannerDashboardViewModel : ObservableObject
private static string BuildCsvFromScanRecords(IReadOnlyList<ScanRecord> records)
{
var sb = new StringBuilder();
sb.AppendLine("Id,CardId,ScanTime,IsSynced,SiteId,DeviceId,IpAddress,EmployeeId,EmployeeName,Department,GradeType,Designation,Meal,Price");
sb.AppendLine("Id,CardId,ScanTime,IsSynced,SiteId,DeviceId,IpAddress,EmployeeId,EmployeeName,Department,GradeType,Designation,MealSession,Meal,Price");
foreach (var r in records)
{
var localScanTime = r.ScanTime.ToLocalTime();
@ -962,6 +962,8 @@ public partial class ScannerDashboardViewModel : ObservableObject
sb.Append(',');
sb.Append(EscapeCsv(r.Designation ?? string.Empty));
sb.Append(',');
sb.Append(EscapeCsv(r.MealLabel ?? string.Empty));
sb.Append(',');
sb.Append(EscapeCsv(r.MealItems ?? string.Empty));
sb.Append(',');
sb.Append(r.TotalPrice.ToString("0.##", CultureInfo.InvariantCulture));